From 8f2afb427bf6ad3f99654bbf5cf14162c3afbe59 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Mon, 28 Nov 2022 17:19:43 -0500 Subject: [PATCH] fix indentation and try templating the privileged field --- .../ci/launcher-advanced-values.yaml | 1 - .../rstudio-connect/templates/deployment.yaml | 23 ++++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/rstudio-connect/ci/launcher-advanced-values.yaml b/charts/rstudio-connect/ci/launcher-advanced-values.yaml index 5318e6d6..f91f1bff 100644 --- a/charts/rstudio-connect/ci/launcher-advanced-values.yaml +++ b/charts/rstudio-connect/ci/launcher-advanced-values.yaml @@ -2,7 +2,6 @@ rbac: create: true serviceAccount: create: true -securityContext: null sharedStorage: create: true launcher: diff --git a/charts/rstudio-connect/templates/deployment.yaml b/charts/rstudio-connect/templates/deployment.yaml index da4b92c5..6c85ac52 100644 --- a/charts/rstudio-connect/templates/deployment.yaml +++ b/charts/rstudio-connect/templates/deployment.yaml @@ -1,3 +1,4 @@ +{{- $global := . }} --- apiVersion: apps/v1 kind: Deployment @@ -29,7 +30,7 @@ spec: prometheus.io/path: "/metrics" prometheus.io/port: "9108" {{- end }} -{{ include "rstudio-connect.pod.annotations" . | indent 8 }} + {{- include "rstudio-connect.pod.annotations" . | nindent 8 }} labels: {{- include "rstudio-connect.selectorLabels" . | nindent 8 }} {{- with .Values.pod.labels }} @@ -66,7 +67,7 @@ spec: {{- end }} {{- if .Values.initContainers }} initContainers: -{{ toYaml .Values.initContainers | indent 8 }} + {{- toYaml .Values.initContainers | nindent 8 }} {{- end }} containers: - name: connect @@ -78,13 +79,13 @@ spec: - name: RSTUDIO_CONNECT_HASTE value: enabled {{- end }} -{{ include "rstudio-library.license-env" (dict "license" ( .Values.license ) "product" ("rstudio-connect") "envVarPrefix" ("RSC") "fullName" (include "rstudio-connect.fullname" .)) | indent 8 }} + {{- include "rstudio-library.license-env" (dict "license" ( .Values.license ) "product" ("rstudio-connect") "envVarPrefix" ("RSC") "fullName" (include "rstudio-connect.fullname" .)) | nindent 8 }} {{- if .Values.pod.env }} -{{ toYaml .Values.pod.env | indent 8 }} + {{- toYaml .Values.pod.env | nindent 8 }} {{- end }} {{- if .Values.command }} command: -{{ toYaml .Values.command | indent 10 }} + {{- toYaml .Values.command | nindent 10 }} {{- else if .Values.launcher.enabled }} command: - tini @@ -93,7 +94,7 @@ spec: {{- end }} {{- if .Values.args }} args: -{{ toYaml .Values.args | indent 10 }} + {{- toYaml .Values.args | nindent 10 }} {{- else if .Values.launcher.enabled }} args: - /scripts/prestart.bash @@ -104,7 +105,7 @@ spec: - containerPort: {{ .Values.pod.port }} {{- with .Values.securityContext }} securityContext: - {{- toYaml . | nindent 10 }} + {{- tpl (toYaml .) $global | nindent 10 }} {{- end }} volumeMounts: - name: rstudio-connect-config @@ -141,7 +142,7 @@ spec: {{- end }} {{ include "rstudio-library.license-mount" (dict "license" ( .Values.license )) | indent 10 }} {{- if .Values.pod.volumeMounts }} -{{ toYaml .Values.pod.volumeMounts | indent 10 }} + {{- toYaml .Values.pod.volumeMounts | nindent 10 }} {{- end }} {{- with .Values.resources }} resources: @@ -183,7 +184,7 @@ spec: {{- end }} {{- end }} {{- if .Values.pod.sidecar }} -{{ toYaml .Values.pod.sidecar | indent 6 }} + {{- toYaml .Values.pod.sidecar | nindent 6 }} {{- end }} volumes: - name: rstudio-connect-config @@ -194,7 +195,7 @@ spec: persistentVolumeClaim: claimName: {{default (print (include "rstudio-connect.fullname" .) "-shared-storage" ) .Values.sharedStorage.name }} {{- end }} - {{ include "rstudio-library.license-volume" (dict "license" ( .Values.license ) "fullName" (include "rstudio-connect.fullname" .)) | indent 6 }} + {{- include "rstudio-library.license-volume" (dict "license" ( .Values.license ) "fullName" (include "rstudio-connect.fullname" .)) | nindent 6 }} {{- if .Values.prometheusExporter.enabled }} - name: graphite-exporter-config configMap: @@ -202,7 +203,7 @@ spec: defaultMode: 0755 {{- end }} {{- if .Values.pod.volumes }} -{{ toYaml .Values.pod.volumes | indent 6 }} + {{- toYaml .Values.pod.volumes | nindent 6 }} {{- end }} {{- if .Values.launcher.enabled }} {{- if .Values.launcher.useTemplates }}