Просмотр исходного кода

Merge pull request #1914 from daniwk/daniwk-add-securitycontext

(fix) added securityContext to the OpenCost backend container
Matt Ray 2 лет назад
Родитель
Сommit
aa1030f381
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      kubernetes/opencost.yaml

+ 8 - 0
kubernetes/opencost.yaml

@@ -159,6 +159,14 @@ spec:
             - name: CLUSTER_ID
               value: "cluster-one" # Default cluster ID to use if cluster_id is not set in Prometheus metrics.
           imagePullPolicy: Always
+          securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsUser: 1001
         - image: quay.io/kubecost1/opencost-ui:latest
           name: opencost-ui
           resources: