Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Helm Chart] Add env, configmap, secret and volumes support #137

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deploy/charts/google-cas-issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ A Helm chart for jetstack/google-cas-issuer
| app.logLevel | int | `1` | Verbosity of google-cas-issuer logging. |
| app.metrics.port | int | `9402` | Port for exposing Prometheus metrics on 0.0.0.0 on path '/metrics'. |
| commonLabels | object | `{}` | Labels to apply to all resources |
| configmap | object | `{"enabled":false,"mountPath":"/etc/configmap"}` | ConfigMap to be used by the google-cas-issuer pods. |
| crds.enabled | bool | `true` | |
| crds.keep | bool | `true` | |
| deploymentAnnotations | object | `{}` | Optional additional annotations to add to the google-cas-issuer Deployment |
| env | list | `[]` | Environment to be used by the google-cas-issuer pods. |
| image.digest | string | `nil` | Target image digest. Will override any tag if set. for example: digest: sha256:0e072dddd1f7f8fc8909a2ca6f65e76c5f0d2fcfb8be47935ae3457e8bbceb20 |
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on Deployment. |
| image.registry | string | `nil` | Target image registry. Will be prepended to the target image repositry if set. |
Expand All @@ -42,6 +44,10 @@ A Helm chart for jetstack/google-cas-issuer
| priorityClassName | string | `""` | Optional priority class to be used for the google-cas-issuer pods. |
| replicaCount | int | `1` | Number of replicas of google-cas-issuer to run. |
| resources | object | `{}` | Kubernetes pod resource requests/limits for google-cas-issuer. |
| secret | object | `{"enabled":false,"mountPath":"/etc/secret","type":"Opaque"}` | Secret to be used by the google-cas-issuer pods. |
| serviceAccount.annotations | object | `{}` | Optional annotations to add to the service account |
| tolerations | list | `[]` | Kubernetes pod tolerations for google-cas-issuer |
| volumes | list | [{name: example, mount: {mountPath: /etc/configmap, readOnly: true}, configMap: {name: example}] | Volumes to attach to the google-cas-issuer pods. Use the `mount` key to specify volumeMount keys. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
10 changes: 10 additions & 0 deletions deploy/charts/google-cas-issuer/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.configmap.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "cert-manager-google-cas-issuer.name" . }}
labels:
{{ include "cert-manager-google-cas-issuer.labels" . | indent 4 }}
data:
{{- toYaml .Values.configmap.data | nindent 2 }}
{{- end }}
42 changes: 38 additions & 4 deletions deploy/charts/google-cas-issuer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,34 @@ spec:
ports:
- containerPort: {{ .Values.app.metrics.port }}
args:
- --enable-leader-election
- --log-level={{.Values.app.logLevel}}
- --metrics-addr=:{{.Values.app.metrics.port}}
- --enable-leader-election
- --log-level={{.Values.app.logLevel}}
- --metrics-addr=:{{.Values.app.metrics.port}}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}

{{- with .Values.env }}
env:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeMounts:
{{- if .Values.configmap.enabled }}
- name: configmap
mountPath: {{ .Values.configmap.mountPath }}
readOnly: true
{{- end }}
{{- if .Values.secret.enabled }}
- name: secret
mountPath: {{ .Values.secret.mountPath }}
readOnly: true
{{- end }}
{{- range .Values.volumes }}
- name: {{ .name }}
{{- with .mount }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -62,3 +82,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.configmap.enabled }}
- name: configmap
configMap:
name: {{ include "cert-manager-google-cas-issuer.name" . }}
{{- end }}
{{- if .Values.secret.enabled }}
- name: secret
secret:
secretName: {{ include "cert-manager-google-cas-issuer.name" . }}
{{- end }}
{{- range .Values.volumes }}
{{- toYaml (list (unset . "mount")) | nindent 6}}
{{- end }}
17 changes: 17 additions & 0 deletions deploy/charts/google-cas-issuer/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.secret.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "cert-manager-google-cas-issuer.name" . }}
labels:
{{ include "cert-manager-google-cas-issuer.labels" . | indent 4 }}
type: {{ .Values.secret.type }}
data:
{{- range $key, $value := .Values.secret.data }}{{- if not (empty $value) }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}{{- end }}
{{- with .Values.secret.stringData }}
stringData:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions deploy/charts/google-cas-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,21 @@ tolerations: []

# -- Optional priority class to be used for the google-cas-issuer pods.
priorityClassName: ""

# -- Environment to be used by the google-cas-issuer pods.
env: []

# -- ConfigMap to be used by the google-cas-issuer pods.
configmap:
enabled: false
mountPath: /etc/configmap

# -- Secret to be used by the google-cas-issuer pods.
secret:
enabled: false
type: Opaque
mountPath: /etc/secret

# -- Volumes to attach to the google-cas-issuer pods. Use the `mount` key to specify volumeMount keys.
# @default -- [{name: example, mount: {mountPath: /etc/configmap, readOnly: true}, configMap: {name: example}]
volumes: []
Loading