diff options
| author | Armin Schlegel <armin.schlegel@gmx.de> | 2021-09-03 13:33:53 +0200 |
|---|---|---|
| committer | Armin Schlegel <armin.schlegel@gmx.de> | 2021-09-03 13:33:53 +0200 |
| commit | 438c46972f501c8979926392a3d6ddf0165dd8d4 (patch) | |
| tree | ed1f6b38420a66cc8241436de047960068807a97 /build/cloud | |
| parent | Merge pull request #3120 from orangegzx/fix/fmtError (diff) | |
| download | kubeedge-438c46972f501c8979926392a3d6ddf0165dd8d4.tar.gz | |
added iptables to Dockerfile and made cloudcore privileged
Signed-off-by: Armin Schlegel <armin.schlegel@gmx.de>
Diffstat (limited to 'build/cloud')
| -rw-r--r-- | build/cloud/07-deployment.yaml | 67 | ||||
| -rw-r--r-- | build/cloud/Dockerfile | 6 | ||||
| -rw-r--r-- | build/cloud/ha/03-ha-deployment.yaml.example | 2 |
3 files changed, 41 insertions, 34 deletions
diff --git a/build/cloud/07-deployment.yaml b/build/cloud/07-deployment.yaml index 778297c8a..54ad5b9a7 100644 --- a/build/cloud/07-deployment.yaml +++ b/build/cloud/07-deployment.yaml @@ -19,40 +19,41 @@ spec: spec: hostNetwork: true containers: - - name: cloudcore - image: kubeedge/cloudcore:v1.3.1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 10000 - name: cloudhub - protocol: TCP - resources: - limits: - cpu: 200m - memory: 1Gi - requests: - cpu: 100m - memory: 512Mi - volumeMounts: - - name: conf - mountPath: /etc/kubeedge/config - - name: certs - mountPath: /etc/kubeedge - - name: sock - mountPath: /var/lib/kubeedge + - name: cloudcore + image: kubeedge/cloudcore:v1.3.1 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 10000 + name: cloudhub + protocol: TCP + resources: + limits: + cpu: 200m + memory: 1Gi + requests: + cpu: 100m + memory: 512Mi + volumeMounts: + - name: conf + mountPath: /etc/kubeedge/config + - name: certs + mountPath: /etc/kubeedge + - name: sock + mountPath: /var/lib/kubeedge + securityContext: + privileged: true restartPolicy: Always serviceAccount: cloudcore serviceAccountName: cloudcore volumes: - - name: conf - configMap: - name: cloudcore - - name: certs - hostPath: - path: /etc/kubeedge - type: DirectoryOrCreate - - name: sock - hostPath: - path: /var/lib/kubeedge - type: DirectoryOrCreate - + - name: conf + configMap: + name: cloudcore + - name: certs + hostPath: + path: /etc/kubeedge + type: DirectoryOrCreate + - name: sock + hostPath: + path: /var/lib/kubeedge + type: DirectoryOrCreate diff --git a/build/cloud/Dockerfile b/build/cloud/Dockerfile index 08d241fd5..6989468d1 100644 --- a/build/cloud/Dockerfile +++ b/build/cloud/Dockerfile @@ -5,11 +5,15 @@ ARG GO_LDFLAGS COPY . /go/src/github.com/kubeedge/kubeedge RUN CGO_ENABLED=0 go build -v -o /usr/local/bin/cloudcore -ldflags "$GO_LDFLAGS -w -s" \ -github.com/kubeedge/kubeedge/cloud/cmd/cloudcore + github.com/kubeedge/kubeedge/cloud/cmd/cloudcore FROM alpine:3.11 COPY --from=builder /usr/local/bin/cloudcore /usr/local/bin/cloudcore +RUN apk add --update-cache \ + iptables \ + && rm -rf /var/cache/apk/* + ENTRYPOINT ["cloudcore"] diff --git a/build/cloud/ha/03-ha-deployment.yaml.example b/build/cloud/ha/03-ha-deployment.yaml.example index c1de03663..2165611c9 100644 --- a/build/cloud/ha/03-ha-deployment.yaml.example +++ b/build/cloud/ha/03-ha-deployment.yaml.example @@ -43,6 +43,8 @@ spec: - name: cloudcore image: kubeedge/cloudcore:{tag} imagePullPolicy: IfNotPresent + securityContext: + privileged: true ports: - containerPort: 10000 name: cloudhub |
