mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-02 10:35:08 -05:00
[node operator] Prepare for packaging as dockerfile and deployment withing k8s
Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
2860fe4eec
commit
bce83c493b
@ -13,6 +13,7 @@ RUN go mod download
|
|||||||
COPY main.go main.go
|
COPY main.go main.go
|
||||||
COPY api/ api/
|
COPY api/ api/
|
||||||
COPY controllers/ controllers/
|
COPY controllers/ controllers/
|
||||||
|
COPY internal/ internal/
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
|
||||||
|
@ -25,7 +25,7 @@ spec:
|
|||||||
control-plane: controller-manager
|
control-plane: controller-manager
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
runAsUser: 0 # required to read etcd certs and keys from /etc/kubernetes/pki
|
||||||
containers:
|
containers:
|
||||||
- command:
|
- command:
|
||||||
- /manager
|
- /manager
|
||||||
@ -47,6 +47,9 @@ spec:
|
|||||||
port: 8081
|
port: 8081
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/kubernetes/pki/etcd
|
||||||
|
name: etcd-certs
|
||||||
# TODO(user): Configure the resources accordingly based on the project requirements.
|
# TODO(user): Configure the resources accordingly based on the project requirements.
|
||||||
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||||
resources:
|
resources:
|
||||||
@ -56,5 +59,19 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 64Mi
|
memory: 64Mi
|
||||||
|
volumes:
|
||||||
|
- name: etcd-certs
|
||||||
|
hostPath:
|
||||||
|
path: /etc/kubernetes/pki/etcd
|
||||||
|
type: Directory
|
||||||
|
nodeSelector:
|
||||||
|
node-role.kubernetes.io/control-plane: ""
|
||||||
|
tolerations:
|
||||||
|
- effect: NoSchedule
|
||||||
|
key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
- effect: NoSchedule
|
||||||
|
key: node-role.kubernetes.io/master
|
||||||
|
operator: Exists
|
||||||
serviceAccountName: controller-manager
|
serviceAccountName: controller-manager
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user