feat: add `authSecret.enabled` to Helm chart (#937)
When false the chart deployment template will not add GITHUB_* environment variables to the manager container. In addition, the `volume` and `volumeMount` for the secret will also be omitted from the deployment manifest. Signed-off-by: Piaras Hoban <phoban01@gmail.com>
This commit is contained in:
parent
f0fccc020b
commit
84b0c64d29
|
|
@ -65,6 +65,7 @@ spec:
|
||||||
- name: GITHUB_ENTERPRISE_URL
|
- name: GITHUB_ENTERPRISE_URL
|
||||||
value: {{ .Values.githubEnterpriseServerURL }}
|
value: {{ .Values.githubEnterpriseServerURL }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.authSecret.enabled }}
|
||||||
- name: GITHUB_TOKEN
|
- name: GITHUB_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|
@ -85,6 +86,7 @@ spec:
|
||||||
optional: true
|
optional: true
|
||||||
- name: GITHUB_APP_PRIVATE_KEY
|
- name: GITHUB_APP_PRIVATE_KEY
|
||||||
value: /etc/actions-runner-controller/github_app_private_key
|
value: /etc/actions-runner-controller/github_app_private_key
|
||||||
|
{{- end }}
|
||||||
{{- range $key, $val := .Values.env }}
|
{{- range $key, $val := .Values.env }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
value: {{ $val | quote }}
|
value: {{ $val | quote }}
|
||||||
|
|
@ -106,9 +108,11 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
{{- if .Values.authSecret.enabled }}
|
||||||
- mountPath: "/etc/actions-runner-controller"
|
- mountPath: "/etc/actions-runner-controller"
|
||||||
name: secret
|
name: secret
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
- mountPath: /tmp
|
- mountPath: /tmp
|
||||||
name: tmp
|
name: tmp
|
||||||
- mountPath: /tmp/k8s-webhook-server/serving-certs
|
- mountPath: /tmp/k8s-webhook-server/serving-certs
|
||||||
|
|
@ -136,9 +140,11 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if .Values.authSecret.enabled }}
|
||||||
- name: secret
|
- name: secret
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ include "actions-runner-controller.secretName" . }}
|
secretName: {{ include "actions-runner-controller.secretName" . }}
|
||||||
|
{{- end }}
|
||||||
- name: cert
|
- name: cert
|
||||||
secret:
|
secret:
|
||||||
defaultMode: 420
|
defaultMode: 420
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ enableLeaderElection: true
|
||||||
# Only 1 authentication method can be deployed at a time
|
# Only 1 authentication method can be deployed at a time
|
||||||
# Uncomment the configuration you are applying and fill in the details
|
# Uncomment the configuration you are applying and fill in the details
|
||||||
authSecret:
|
authSecret:
|
||||||
|
enabled: true
|
||||||
create: false
|
create: false
|
||||||
name: "controller-manager"
|
name: "controller-manager"
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue