jedcunningham commented on a change in pull request #18249:
URL: https://github.com/apache/airflow/pull/18249#discussion_r708827609



##########
File path: chart/values.schema.json
##########
@@ -70,6 +70,332 @@
             "default": "2.1.3",
             "x-docsSection": "Common"
         },
+        "podSecurity": {
+            "description": "Set security contexts for certain containers",
+            "type": "object",
+            "x-docsSection": "Kubernetes",
+            "additionalProperties": false,
+            "properties": {
+                "default": {
+                    "description": "Default global security context.",
+                    "type": "object",
+                    "additionalProperties": false,
+                    "properties": {
+                        "securityContext": {
+                            "description": "Global Pod security context as 
defined in 
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core";,
+                            "type": "object",
+                            "default": "See values.yaml",

Review comment:
       ```suggestion
                               "default": {"runAsUser": 50000, "fsGroup": 0, 
"runAsGroup": 0},
   ```
   
   I think we should bring the actual defaults into the docs instead.

##########
File path: chart/files/pod-template-file.kubernetes-helm-yaml
##########
@@ -45,6 +45,7 @@ spec:
   {{- end }}
   containers:
     - args: []
+      securityContext: {{- omit 
.Values.podSecurity.pod_template.containerSecurityContext "enabled" | default 
(.Values.podSecurity.default.containerSecurityContext) | toYaml | nindent 8 }}

Review comment:
       Instead of this `omit` pattern, would this work instead? I think it will 
and is more intuitive imo.
   
   values.yaml:
   ```
   podSecurity.pod_template.containerSecurityContext: {}
   ```
   
   and:
   
   ```suggestion
         securityContext: {{- 
.Values.podSecurity.pod_template.containerSecurityContext | default 
(.Values.podSecurity.default.containerSecurityContext) | toYaml | nindent 8 }}
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to