Skip to content

Commit 79d2e73

Browse files
committed
update ci image address and version
1 parent 80ac43a commit 79d2e73

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

ci/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ cd ../ci
99
cp -r ../script .
1010

1111
cat > Dockerfile <<EOF
12-
FROM registry.aliyuncs.com/wangbs/netdia:latest
12+
FROM alpine:3.8
1313
COPY script/ /bin/
14-
RUN apk --update add ipset bash && chmod +x /bin/traffic && chmod +x /bin/policyinit.sh && rm -f /var/cache/apk/*
14+
RUN apk --update add curl ipset bash iproute2 ethtool bridge-utils && chmod +x /bin/traffic && chmod +x /bin/policyinit.sh && rm -f /var/cache/apk/*
1515
RUN curl -sSL -o /bin/calico-felix https://docker-plugin.oss-cn-shanghai.aliyuncs.com/calico-felix && chmod +x /bin/calico-felix
1616
COPY terwayd terway /usr/bin/
1717
ENTRYPOINT ["/usr/bin/terwayd"]
1818
EOF
19-
docker build --no-cache -t acs/terway:1.0-$GIT_SHA .
19+
docker build --no-cache -t acs/terway:v0.1.0-$GIT_SHA .

deviceplugin/eni.go

+11-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type EniDevicePlugin struct {
3030
socket string
3131
server *grpc.Server
3232
count int
33-
stop chan struct{}
33+
stop chan struct{}
3434
sync.Locker
3535
}
3636

@@ -78,7 +78,6 @@ func (m *EniDevicePlugin) Start() error {
7878
m.server = grpc.NewServer([]grpc.ServerOption{}...)
7979
pluginapi.RegisterDevicePluginServer(m.server, m)
8080

81-
8281
m.stop = make(chan struct{}, 1)
8382
go m.server.Serve(sock)
8483

@@ -178,7 +177,7 @@ func (m *EniDevicePlugin) cleanup() error {
178177

179178
for _, preSock := range preSocks {
180179
log.Debugf("device plugin file info: %+v", preSock)
181-
if eniServerSockRegex.Match([]byte(preSock.Name())) && preSock.Mode() & os.ModeSocket != 0 {
180+
if eniServerSockRegex.Match([]byte(preSock.Name())) && preSock.Mode()&os.ModeSocket != 0 {
182181
if err = syscall.Unlink(path.Join(pluginapi.DevicePluginPath, preSock.Name())); err != nil {
183182
log.Errorf("error on clean up previous device plugin listens, %+v", err)
184183
}
@@ -228,8 +227,8 @@ func (m *EniDevicePlugin) watchKubeletRestart() {
228227
}
229228
err = m.Register(
230229
pluginapi.RegisterRequest{
231-
Version: pluginapi.Version,
232-
Endpoint: path.Base(m.socket),
230+
Version: pluginapi.Version,
231+
Endpoint: path.Base(m.socket),
233232
ResourceName: DefaultResourceName,
234233
},
235234
)
@@ -239,7 +238,7 @@ func (m *EniDevicePlugin) watchKubeletRestart() {
239238
return
240239
}
241240
log.Fatalf("error stat socket: %+v", err)
242-
}, time.Second * 30, make(chan struct{}, 1), )
241+
}, time.Second*30, make(chan struct{}, 1))
243242
}
244243

245244
// Serve starts the gRPC server and register the device plugin to Kubelet
@@ -253,12 +252,12 @@ func (m *EniDevicePlugin) Serve(resourceName string) error {
253252
log.Infof("Starting to serve on %s", m.socket)
254253

255254
err = m.Register(
256-
pluginapi.RegisterRequest{
257-
Version: pluginapi.Version,
258-
Endpoint: path.Base(m.socket),
259-
ResourceName: resourceName,
260-
},
261-
)
255+
pluginapi.RegisterRequest{
256+
Version: pluginapi.Version,
257+
Endpoint: path.Base(m.socket),
258+
ResourceName: resourceName,
259+
},
260+
)
262261
if err != nil {
263262
log.Errorf("Could not register device plugin: %v", err)
264263
m.Stop()

deviceplugin/eni_capability.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,4 @@ var ecsEniMatix = map[string]int{
457457
"ecs.gn5e-c11g1.11xlarge": 8,
458458
"ecs.gn5e-c11g1.22xlarge": 8,
459459
"ecs.ebmg5ne.24xlarge": 1,
460-
}
460+
}

script/policyinit.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
export DATASTORE_TYPE=kubernetes
3-
export FELIX_LOGSEVERITYSYS=info
3+
export FELIX_LOGSEVERITYSYS=none
44
export CALICO_NETWORKING_BACKEND=none
55
export CLUSTER_TYPE=k8s,canal
66
export CALICO_DISABLE_FILE_LOGGING=true
@@ -11,6 +11,7 @@ export WAIT_FOR_DATASTORE=true
1111
export IP=""
1212
export FELIX_DEFAULTENDPOINTTOHOSTACTION=ACCEPT
1313
export FELIX_HEALTHENABLED=true
14+
export FELIX_LOGFILEPATH=/dev/null
1415
exec 2>&1
1516
if [ ! -z $NODENAME ]; then
1617
export FELIX_FELIXHOSTNAME=$NODENAME

terway.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ spec:
113113
hostNetwork: true
114114
initContainers:
115115
- name: terway-init
116-
image: registry.cn-hangzhou.aliyuncs.com/wangbs/terway:latest
116+
image: registry.aliyuncs.com/acs/terway:v0.1.0
117117
imagePullPolicy: Always
118118
securityContext:
119119
privileged: true
@@ -129,7 +129,7 @@ spec:
129129
name: lib-modules
130130
containers:
131131
- name: terway
132-
image: registry.cn-hangzhou.aliyuncs.com/wangbs/terway:latest
132+
image: registry.aliyuncs.com/acs/terway:v0.1.0
133133
imagePullPolicy: Always
134134
securityContext:
135135
privileged: true
@@ -152,7 +152,7 @@ spec:
152152
- mountPath: /var/lib/kubelet/device-plugins
153153
name: device-plugin-path
154154
- name: policy
155-
image: registry.aliyuncs.com/wangbs/terway
155+
image: registry.aliyuncs.com/acs/terway:v0.1.0
156156
command: ["/bin/policyinit.sh"]
157157
env:
158158
- name: NODENAME

types/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Configure struct {
1010
MinPoolSize int `yaml:"min_pool_size" json:"min_pool_size"`
1111
Prefix string `yaml:"prefix" json:"prefix"`
1212
SecurityGroup string `yaml:"security_group" json:"security_group"`
13-
HotPlug string `yaml:"hot_plug" json:"hot_plug"`
13+
HotPlug string `yaml:"hot_plug" json:"hot_plug"`
1414
}
1515

1616
type PoolConfig struct {

version/spec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "github.com/containernetworking/cni/pkg/version"
1010
// * VERSION
1111
// Refer to https://github.com/containernetworking/cni/blob/master/SPEC.md
1212
// for details
13-
var specVersionSupported = version.PluginSupports( "0.3.0")
13+
var specVersionSupported = version.PluginSupports("0.3.0")
1414

1515
// GetSpecVersionSupported gets the version of the CNI spec that's supported
1616
// by the ENI plugin

0 commit comments

Comments
 (0)