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



##########
File path: chart/templates/_helpers.yaml
##########
@@ -616,3 +615,50 @@ Create the name of the cleanup service account to use
   {{- end -}}
   {{- $kubeVersion -}}
 {{- end -}}
+
+{{/*
+Set the default value for securityContext
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to global uid and gid
+*/}}
+{{- define "globalSecurityContext" -}}
+  {{- $ := index . 0 -}}
+  {{- with index . 1 }}
+    {{- if .securityContext -}}
+{{ toYaml .securityContext | print }}
+    {{- else if $.Values.securityContext -}}
+{{ toYaml $.Values.securityContext | print }}
+    {{- else -}}
+runAsUser: {{ $.Values.uid }}
+fsGroup: {{ $.Values.gid }}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+Set the default value for securityContext
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to UID in the local node
+*/}}
+{{- define "localSecurityContext" -}}
+  {{- if .securityContext -}}
+{{ toYaml .securityContext | print }}
+  {{- else -}}
+runAsUser: {{ .uid }}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+Set the default value for workers chown for persistent storage
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to global uid and gid

Review comment:
       ```suggestion
   If no value is passed for securityContext or <node>.securityContext, 
defaults to global uid and gid
   ```

##########
File path: chart/templates/_helpers.yaml
##########
@@ -616,3 +615,50 @@ Create the name of the cleanup service account to use
   {{- end -}}
   {{- $kubeVersion -}}
 {{- end -}}
+
+{{/*
+Set the default value for securityContext
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to global uid and gid
+*/}}
+{{- define "globalSecurityContext" -}}
+  {{- $ := index . 0 -}}
+  {{- with index . 1 }}
+    {{- if .securityContext -}}
+{{ toYaml .securityContext | print }}
+    {{- else if $.Values.securityContext -}}
+{{ toYaml $.Values.securityContext | print }}
+    {{- else -}}
+runAsUser: {{ $.Values.uid }}
+fsGroup: {{ $.Values.gid }}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
+
+{{/*
+Set the default value for securityContext
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to UID in the local node

Review comment:
       ```suggestion
   If no value is passed for securityContext or <node>.securityContext, 
defaults to UID in the local node
   ```

##########
File path: chart/templates/_helpers.yaml
##########
@@ -616,3 +615,50 @@ Create the name of the cleanup service account to use
   {{- end -}}
   {{- $kubeVersion -}}
 {{- end -}}
+
+{{/*
+Set the default value for securityContext
+If no value is passed for secirityContext or <node>.securityContext, defaults 
to global uid and gid

Review comment:
       ```suggestion
   If no value is passed for securityContext or <node>.securityContext, 
defaults to global uid and gid
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to