-
Notifications
You must be signed in to change notification settings - Fork 213
Description
Not able to pass Container Security Context from CR. Since zookeeper container is auto created, defining container in CR is giving duplicate container error. Can you let me know how to do this?
apiVersion: zookeeper.pravega.io/v1beta1
kind: ZookeeperCluster
metadata:
name: {{ .Values.platform_name }}
namespace: {{ .Values.appName }}zk
spec:
replicas: {{ .Values.replicas }}
maxUnavailableReplicas: 1
image:
repository: {{ .Values.repository }}
tag: "{{ .Values.tag }}"
pod:
securityContext:
readOnlyRootFilesystem: true
seccompProfile:
type: RuntimeDefault
containers:
- name: zookeeper
image: "{{ .Values.repository }}:{{ .Values.tag }}"
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
config:
initLimit: {{ .Values.initLimit }}
tickTime: {{ .Values.tickTime }}
syncLimit: {{ .Values.syncLimit }}
maxSessionTimeout: {{ .Values.maxSessionTimeout }}
minSessionTimeout: {{ .Values.minSessionTimeout }}
maxClientCnxns: {{ .Values.maxClientCnxns }}
quorumListenOnAllIPs: {{ .Values.quorumListenOnAllIPs }}
storageType: {{ .Values.storageType }}
persistence:
reclaimPolicy: {{ .Values.reclaimPolicy }}
spec:
storageClassName: {{ .Values.storageClassName }}
resources:
requests:
storage: {{ .Values.storage }}
Error: create Pod zookeeper-1 in StatefulSet zookeeper failed error: Pod "zookeeper-1" is invalid: spec.containers[1].name: Duplicate value: "zookeeper"