diff --git a/argos_k3s/argos/argos-configmap.yaml b/argos_k3s/argos/argos-configmap.yaml new file mode 100644 index 0000000..00b22a1 --- /dev/null +++ b/argos_k3s/argos/argos-configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: tcp-services + namespace: ingress-nginx +data: + 9000: "clickhouse/clickhouse-pv-log:9000" \ No newline at end of file diff --git a/argos_k3s/argos/argos-deployment.yaml b/argos_k3s/argos/argos-deployment.yaml new file mode 100644 index 0000000..5de7df8 --- /dev/null +++ b/argos_k3s/argos/argos-deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: argos-dep + namespace: argos + labels: + app: argos +spec: + # serviceName: argos + replicas: 1 + selector: + matchLabels: + app: argos + template: + metadata: + labels: + app: argos + spec: + serviceAccountName: argos-service-account + containers: + - name: argos + image: cachengo/argos:1.0.0 + imagePullPolicy: Always + ports: + - containerPort: 8080 + env: + - name: DVR_DATA_DIR + value: "/raft-storage" + - name: DVR_DB_PASSWORD + value: "" + - name: DVR_DB_USERNAME + value: default + - name: DVR_DATABASE_URL + value: chi-pv-log-deployment-pv-0-0.clickhouse:9000,chi-pv-log-deployment-pv-1-0.clickhouse:9000 + - name: DVR_DB_NAME + value: argos + - name: DVR_MINIO_ENDPOINT + value: minio-service.minio:9000 + - name: DVR_MINIO_ACCESS_KEY + value: minioadmin + - name: DVR_MINIO_SECRET + value: minioadmin + - name: DVR_PROCESS_SUPERVISOR + value: kube + volumeMounts: + - name: argos-pvc + mountPath: /raft-storage/videos + volumes: + - name: argos-pvc + persistentVolumeClaim: + claimName: argos-pvc \ No newline at end of file diff --git a/argos_k3s/argos/argos-ingress.yaml b/argos_k3s/argos/argos-ingress.yaml new file mode 100644 index 0000000..fa478ba --- /dev/null +++ b/argos_k3s/argos/argos-ingress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: argos-ingress + namespace: argos + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: argos.mybento.local + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: argos-service + port: + number: 8080 \ No newline at end of file diff --git a/argos_k3s/argos/argos-namespace.yaml b/argos_k3s/argos/argos-namespace.yaml new file mode 100644 index 0000000..bc264d6 --- /dev/null +++ b/argos_k3s/argos/argos-namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: argos # Change this value if you want a different namespace name + labels: + name: argos # Change this value to match metadata.name \ No newline at end of file diff --git a/argos_k3s/argos/argos-pvc.yaml b/argos_k3s/argos/argos-pvc.yaml new file mode 100644 index 0000000..dbed058 --- /dev/null +++ b/argos_k3s/argos/argos-pvc.yaml @@ -0,0 +1,12 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: argos-pvc + namespace: argos +spec: + storageClassName: longhorn + accessModes: + - ReadWriteMany + resources: + requests: + storage: 30Gi \ No newline at end of file diff --git a/argos_k3s/argos/argos-role.yaml b/argos_k3s/argos/argos-role.yaml new file mode 100644 index 0000000..f64d5b8 --- /dev/null +++ b/argos_k3s/argos/argos-role.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: argos-service-account + namespace: argos +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: argos + name: camera-deployer +rules: +- apiGroups: ["apps"] # "" indicates the core API group + resources: ["deployments", "pods"] + verbs: ["get", "list", "create", "delete"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +# This role binding allows "jane" to read pods in the "default" namespace. +# You need to already have a Role named "pod-reader" in that namespace. +kind: RoleBinding +metadata: + name: deploy-cameras-binding + namespace: argos +roleRef: + # "roleRef" specifies the binding to a Role / ClusterRole + apiGroup: rbac.authorization.k8s.io + kind: Role #this must be Role or ClusterRole + name: camera-deployer # this must match the name of the Role or ClusterRole you wish to bind to +subjects: +# You can specify more than one "subject" +- namespace: argos + kind: ServiceAccount + name: argos-service-account # "name" is case sensitive + # apiGroup: rbac.authorization.k8s.io diff --git a/argos_k3s/argos/argos-service.yaml b/argos_k3s/argos/argos-service.yaml new file mode 100644 index 0000000..1cdf4cf --- /dev/null +++ b/argos_k3s/argos/argos-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: argos-service + namespace: argos +spec: + selector: + app: argos + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 + nodePort: 32401 + type: NodePort \ No newline at end of file diff --git a/argos_k3s/argos_install.sh b/argos_k3s/argos_install.sh new file mode 100755 index 0000000..f582ec3 --- /dev/null +++ b/argos_k3s/argos_install.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +function do_install { + cachengo-cli updateInstallStatus $APPID "Installing" + # zookeeper + echo "Installing Zookeeper into k3s cluster" + kubectl create ns zookeeper + kubectl apply -f argos_k3s/zookeeper/zookeeper.yaml + + # nginx + echo "Creating nginx ingress" + ./argos_k3s/nginx/create-nginx.sh + + # minio + echo "Installing minio" + kubectl apply -f argos_k3s/minio/minio-namespace.yaml -f argos_k3s/minio/minio-service.yaml -f argos_k3s/minio/minio-pvc.yaml -f argos_k3s/minio/minio-api-ingress.yaml -f minio-console-ingress.yaml -f argos_k3s/minio/minio-deployment.yaml + + # clickhouse + ./argos_k3s/clickhouse/create-clickhouse.sh + + # kubectl -n clickhouse exec chi-pv-log-deployment-pv-0-0-0 -- clickhouse-client --query "create database argos on cluster 'deployment-pv';" + + #argos + kubectl apply -f argos_k3s/argos/argos-namespace.yaml -f argos_k3s/argos/argos-ingress.yaml -f argos_k3s/argos/argos-pvc.yaml -f argos_k3s/argos/argos-role.yaml -f argos_k3s/argos/argos-service.yaml -f argos_k3s/argos/argos-deployment.yaml + + + + cachengo-cli updateInstallStatus $APPID "Installed" +} + +function do_uninstall { + cachengo-cli updateInstallStatus $APPID "Uninstalling" + kubectl delete -f argos_k3s/zookeeper/zookeeper.yaml + kubectl delete ns zookeeper + kubectl delete -f argos_k3s/minio/minio-deployment.yaml -f argos_k3s/minio/minio-service.yaml -f argos_k3s/minio/minio-pvc.yaml -f argos_k3s/minio/minio-api-ingress.yaml -f minio-console-ingress.yaml -f argos_k3s/minio/minio-namespace.yaml + kubectl delete -f argos_k3s/clickhouse/clickhouse-deployment.yaml + kubectl -n clickhouse delete deployment clickhouse-operator + kubectl -n clickhouse delete svc clickhouse-operator-metrics + kubectl -n clickhouse delete ns clickhouse + kubectl delete -f argos_k3s/argos/argos-deployment.yaml -f argos_k3s/argos/argos-ingress.yaml -f argos_k3s/argos/argos-pvc.yaml -f argos_k3s/argos/argos-role.yaml -f argos_k3s/argos/argos-service.yaml -f argos_k3s/argos/argos-namespace.yaml + cachengo-cli updateInstallStatus $APPID "Uninstalled" +} + +case "$1" in + install) do_install ;; + uninstall) do_uninstall ;; +esac diff --git a/argos_k3s/clickhouse/clickhouse-deployment.yaml b/argos_k3s/clickhouse/clickhouse-deployment.yaml new file mode 100644 index 0000000..9ea5583 --- /dev/null +++ b/argos_k3s/clickhouse/clickhouse-deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: "clickhouse.altinity.com/v1" +kind: "ClickHouseInstallation" +metadata: + name: "pv-log" + namespace: clickhouse +spec: + configuration: + users: + default/networks/ip: "::/0" + zookeeper: + nodes: + - host: zk-cs.zookeeper.svc.cluster.local + clusters: + - name: "deployment-pv" + # Templates are specified for this cluster explicitly + templates: + podTemplate: pod-template-with-volumes + layout: + shardsCount: 2 + replicasCount: 0 + + + templates: + podTemplates: + - name: pod-template-with-volumes + spec: + containers: + - name: clickhouse + image: clickhouse/clickhouse-server:22.3 + volumeMounts: + - name: data-storage-vc-template + mountPath: /var/lib/clickhouse + - name: log-storage-vc-template + mountPath: /var/log/clickhouse-server + + volumeClaimTemplates: + - name: data-storage-vc-template + spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 3Gi + - name: log-storage-vc-template + spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi \ No newline at end of file diff --git a/argos_k3s/clickhouse/clickhouse-ingress.yaml b/argos_k3s/clickhouse/clickhouse-ingress.yaml new file mode 100644 index 0000000..1f0ca26 --- /dev/null +++ b/argos_k3s/clickhouse/clickhouse-ingress.yaml @@ -0,0 +1,29 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: clickhouse-client + namespace: clickhouse + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: clickhouse.mybento.local + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: clickhouse-pv-log + port: + number: 8123 + - host: clickhouse-client.mybento.local + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: clickhouse-pv-log + port: + number: 9000 \ No newline at end of file diff --git a/argos_k3s/clickhouse/create-clickhouse.sh b/argos_k3s/clickhouse/create-clickhouse.sh new file mode 100755 index 0000000..bbf8774 --- /dev/null +++ b/argos_k3s/clickhouse/create-clickhouse.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +kubectl create ns clickhouse +sudo apt-get install gettext-base +curl -s https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/deploy/operator-web-installer/clickhouse-operator-install.sh | OPERATOR_NAMESPACE=clickhouse bash +kubectl apply -f argos_k3s/clickhouse/clickhouse-deployment.yaml \ No newline at end of file diff --git a/argos_k3s/dev/argos-pv.yaml b/argos_k3s/dev/argos-pv.yaml new file mode 100644 index 0000000..08fd153 --- /dev/null +++ b/argos_k3s/dev/argos-pv.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: argos-pv + namespace: argos +spec: + capacity: + storage: 10Gi + hostPath: + path: /tmp/videos + type: DirectoryOrCreate + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Delete + storageClassName: local-storage + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - minikube \ No newline at end of file diff --git a/argos_k3s/dev/argos-pvc.yaml b/argos_k3s/dev/argos-pvc.yaml new file mode 100644 index 0000000..fd0233e --- /dev/null +++ b/argos_k3s/dev/argos-pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: argos-pvc + namespace: argos +spec: + storageClassName: local-storage + volumeName: argos-pv + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/argos_k3s/dev/local-pv.yaml b/argos_k3s/dev/local-pv.yaml new file mode 100644 index 0000000..3946f8b --- /dev/null +++ b/argos_k3s/dev/local-pv.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: local-pv + namespace: argos +spec: + capacity: + storage: 10Gi + hostPath: + path: /data/localpv + type: DirectoryOrCreate + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Delete + storageClassName: local-storage + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - minikube \ No newline at end of file diff --git a/argos_k3s/dev/mariadb-storage-local.yaml b/argos_k3s/dev/mariadb-storage-local.yaml new file mode 100644 index 0000000..8e98b48 --- /dev/null +++ b/argos_k3s/dev/mariadb-storage-local.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mariadb-pvc + namespace: argos +spec: + storageClassName: local-storage + volumeName: local-pv + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/argos_k3s/dev/minio-pv.yaml b/argos_k3s/dev/minio-pv.yaml new file mode 100644 index 0000000..830542b --- /dev/null +++ b/argos_k3s/dev/minio-pv.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: minio-pvc + namespace: argos +spec: + capacity: + storage: 10Gi + hostPath: + path: /data/miniolocalpv + type: DirectoryOrCreate + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Delete + storageClassName: local-storage + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - minikube \ No newline at end of file diff --git a/argos_k3s/dev/minio-pvc.yaml b/argos_k3s/dev/minio-pvc.yaml new file mode 100644 index 0000000..a642156 --- /dev/null +++ b/argos_k3s/dev/minio-pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: minio-pvc + namespace: minio +spec: + storageClassName: local-storage + volumeName: minio-pvc + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/argos_k3s/minio/minio-api-ingress.yaml b/argos_k3s/minio/minio-api-ingress.yaml new file mode 100644 index 0000000..24a9ba6 --- /dev/null +++ b/argos_k3s/minio/minio-api-ingress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: minio + namespace: minio + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: argos-minio-api.mybento.local + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: minio-service + port: + number: 9001 \ No newline at end of file diff --git a/argos_k3s/minio/minio-console-ingress.yaml b/argos_k3s/minio/minio-console-ingress.yaml new file mode 100644 index 0000000..66f4074 --- /dev/null +++ b/argos_k3s/minio/minio-console-ingress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: minio + namespace: minio + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: argos-minio.mybento.local + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: minio-service + port: + number: 9001 \ No newline at end of file diff --git a/argos_k3s/minio/minio-deployment.yaml b/argos_k3s/minio/minio-deployment.yaml new file mode 100644 index 0000000..4700382 --- /dev/null +++ b/argos_k3s/minio/minio-deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 +kind: Deployment +metadata: + # This name uniquely identifies the Deployment + name: minio-deployment + namespace: minio +spec: + selector: + matchLabels: + app: minio + strategy: + type: Recreate + template: + metadata: + labels: + # Label is used as selector in the service. + app: minio + spec: + # Refer to the PVC created earlier + volumes: + - name: storage + persistentVolumeClaim: + # Name of the PVC created earlier + claimName: minio-pvc + containers: + - name: minio + # Pulls the default Minio image from Docker Hub + image: minio/minio:latest + args: + - server + - /storage + - --console-address + - :9001 + env: + # Minio access key and secret key + - name: MINIO_ACCESS_KEY + value: "minioadmin" + - name: MINIO_SECRET_KEY + value: "minioadmin" + ports: + - containerPort: 9000 + hostPort: 9000 + - containerPort: 9001 + hostPort: 9001 + # Mount the volume into the pod + volumeMounts: + - name: storage # must match the volume name, above + mountPath: "/storage" \ No newline at end of file diff --git a/argos_k3s/minio/minio-namespace.yaml b/argos_k3s/minio/minio-namespace.yaml new file mode 100644 index 0000000..6a3ad07 --- /dev/null +++ b/argos_k3s/minio/minio-namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: minio # Change this value if you want a different namespace name + labels: + name: minio # Change this value to match metadata.name \ No newline at end of file diff --git a/argos_k3s/minio/minio-pvc.yaml b/argos_k3s/minio/minio-pvc.yaml new file mode 100644 index 0000000..f422e56 --- /dev/null +++ b/argos_k3s/minio/minio-pvc.yaml @@ -0,0 +1,12 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: minio-pvc + namespace: minio +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 30Gi \ No newline at end of file diff --git a/argos_k3s/minio/minio-service.yaml b/argos_k3s/minio/minio-service.yaml new file mode 100644 index 0000000..cc0d40d --- /dev/null +++ b/argos_k3s/minio/minio-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: minio-service + namespace: minio +spec: + type: NodePort + sessionAffinity: None + ports: + - port: 9000 + protocol: TCP + name: minio + - port: 9001 + protocol: TCP + name: minio-console + selector: + app: minio \ No newline at end of file diff --git a/argos_k3s/nginx/create-nginx.sh b/argos_k3s/nginx/create-nginx.sh new file mode 100755 index 0000000..c499f72 --- /dev/null +++ b/argos_k3s/nginx/create-nginx.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +export KUBECONFIG=/etc/rancher/k3s/k3s.yaml + +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +chmod 700 get_helm.sh +./get_helm.sh + +helm upgrade ingress-nginx ingress-nginx --install --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace --set controller.hostNetwork=true --set controller.dnsPolicy=ClusterFirstWithHostNet --set controller.kind=DaemonSet +sleep 60 +kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission diff --git a/argos_k3s/package.json b/argos_k3s/package.json new file mode 100644 index 0000000..8c17f7b --- /dev/null +++ b/argos_k3s/package.json @@ -0,0 +1,35 @@ +{ + "name": "argos-k3s", + "display_name": "ArgOS on K3S", + "description": "ArgOS camera monitoring system", + "parameters": [ + { + "name": "ARGOS_VERSION", + "display_name": "ArgOS Version", + "description": "Desired version of ArgOS to install", + "type": "string", + "required": false + } + ], + "main": "argos_k3s/argos_install.sh", + "dependencies": [ + "argos_k3s/argos_install.sh", + "argos_k3s/argos/argos-deployment.yaml", + "argos_k3s/argos/argos-ingress.yaml", + "argos_k3s/argos/argos-namespace.yaml", + "argos_k3s/argos/argos-pvc.yaml", + "argos_k3s/argos/argos-role.yaml", + "argos_k3s/argos/argos-service.yaml", + "argos_k3s/clickhouse/clickhouse-deployment.yaml", + "argos_k3s/clickhouse/clickhouse-ingress.yaml", + "argos_k3s/clickhouse/create-clickhouse.sh", + "argos_k3s/minio/minio-deployment.yaml", + "argos_k3s/minio/minio-console-ingress.yaml", + "argos_k3s/minio/minio-api-ingress.yaml", + "argos_k3s/minio/minio-namespace.yaml", + "argos_k3s/minio/minio-pvc.yaml", + "argos_k3s/minio/minio-service.yaml", + "argos_k3s/nginx/create-nginx.sh", + "argos_k3s/zookeeper/zookeeper.yaml" + ] + } \ No newline at end of file diff --git a/argos_k3s/zookeeper/zookeeper.yaml b/argos_k3s/zookeeper/zookeeper.yaml new file mode 100644 index 0000000..1b0dd08 --- /dev/null +++ b/argos_k3s/zookeeper/zookeeper.yaml @@ -0,0 +1,127 @@ +apiVersion: v1 +kind: Service +metadata: + namespace: zookeeper + name: zk-hs + labels: + app: zk +spec: + ports: + - port: 2888 + name: server + - port: 3888 + name: leader-election + clusterIP: None + selector: + app: zk +--- +apiVersion: v1 +kind: Service +metadata: + namespace: zookeeper + name: zk-cs + labels: + app: zk +spec: + ports: + - port: 2181 + name: client + selector: + app: zk +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + namespace: zookeeper + name: zk-pdb +spec: + selector: + matchLabels: + app: zk + maxUnavailable: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: zk + namespace: zookeeper +spec: + selector: + matchLabels: + app: zk + serviceName: zk-hs + replicas: 1 + updateStrategy: + type: RollingUpdate + podManagementPolicy: OrderedReady + template: + metadata: + labels: + app: zk + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: "app" + operator: In + values: + - zk + topologyKey: "kubernetes.io/hostname" + initContainers: + - command: + - /bin/bash + - -c + - |- + set -ex; + mkdir -p /data; + if [[ ! -f "/data/myid" ]]; then + hostindex=$HOSTNAME; let zooid=${hostindex: -1: 1}+1; echo $zooid > "/data/myid" + echo "Zookeeper MyId: " $zooid + fi + env: + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: metadata.name + image: zookeeper:3.8.0 + name: zookeeper-init + securityContext: + runAsUser: 1000 + volumeMounts: + - name: zk-data + mountPath: "/data" + containers: + - name: zookeeper + image: "zookeeper:3.8.0" + env: + - name: ZOO_SERVERS + value: "server.1=zk-0.zk-hs.zookeeper.svc.cluster.local:2888:3888;2181" + - name: ZOO_STANDALONE_ENABLED + value: "false" + - name: ZOO_4LW_COMMANDS_WHITELIST + value: "srvr,mntr" + ports: + - containerPort: 2181 + name: client + - containerPort: 2888 + name: server + - containerPort: 3888 + name: leader-election + volumeMounts: + - name: zk-data + mountPath: "/data" + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + volumeClaimTemplates: + - metadata: + name: zk-data + spec: + storageClassName: longhorn + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 10Gi