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

add the option to load env from a external secet #382

Merged
Merged
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
2 changes: 1 addition & 1 deletion charts/pmm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pmm
description: A Helm chart for Percona Monitoring and Management (PMM)
type: application
version: 1.3.16
version: 1.3.17
appVersion: "2.43.1"
home: https://github.com/percona/pmm
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/pmm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ It removes all of the resources associated with the last release of the chart as
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `secret.name` | Defines the name of the k8s secret that holds passwords and other secrets | `pmm-secret` |
| `secret.annotations` | Defines the annotations of the k8s secret that holds passwords and other secrets | `{}` |
| `secret.create` | If true then secret will be generated by Helm chart. Otherwise it is expected to be created by user. | `true` |
| `secret.create` | If true then secret will be generated by Helm chart. Otherwise it is expected to be created by user and all of its keys will be mounted as env vars. | `true` |
| `secret.pmm_password` | Initial PMM password - it changes only on the first deployment, ignored if PMM was already provisioned and just restarted. If PMM admin password is not set, it will be generated. | `""` |
| `certs` | Optional certificates, if not provided PMM would use generated self-signed certificates, | `{}` |

Expand Down
13 changes: 9 additions & 4 deletions charts/pmm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}

image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}

Expand All @@ -58,8 +58,12 @@ spec:
- configMapRef:
name: {{ include "pmm.fullname" . }}
optional: true

# additional secrets that could be used for Grafana iDP
{{ if not .Values.secret.create }}
- secretRef:
name: {{ .Values.secret.name }}
{{ end }}
# additional secrets that could be used for Grafana iDP
{{ if .Values.secret.create }}
env:
- name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID
valueFrom:
Expand All @@ -79,6 +83,7 @@ spec:
name: {{ .Values.secret.name }}
key: PMM_ADMIN_PASSWORD
optional: true
{{ end }}
- name: PMM_INSTALL_METHOD
valueFrom:
fieldRef:
Expand All @@ -92,7 +97,7 @@ spec:
httpGet:
path: /v1/readyz
port: http
{{- if .Values.readyProbeConf }}
{{- if .Values.readyProbeConf }}
{{- toYaml .Values.readyProbeConf | nindent 12 }}
{{- end }}
volumeMounts:
Expand Down
Loading