Skip to content

Commit

Permalink
add the option to load env from a external secet (#382)
Browse files Browse the repository at this point in the history
* add the option to load env from a external secet

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* fix typo

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* bump chart version

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* bump chart

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* update README

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* bump chart

Signed-off-by: AvivGuiser <avivguiser@gmail.com>

* Update charts/pmm/Chart.yaml

---------

Signed-off-by: AvivGuiser <avivguiser@gmail.com>
Co-authored-by: Nurlan Moldomurov <nurlan.moldomurov@percona.com>
Co-authored-by: Nurlan Moldomurov <bupychuk1989@gmail.com>
  • Loading branch information
3 people authored Oct 15, 2024
1 parent d74b487 commit f4a8dd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
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

0 comments on commit f4a8dd8

Please sign in to comment.