Skip to content

Commit

Permalink
[pgadmin4] improve pod annotations to be able to have more checksums (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bitnik authored Jan 16, 2024
1 parent bc87077 commit 1d8e6b4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/pgadmin4/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: pgAdmin4 is a web based administration tool for PostgreSQL database
name: pgadmin4
version: 1.20.0
version: 1.21.0
appVersion: "8.1"
keywords:
- pgadmin
Expand Down
1 change: 1 addition & 0 deletions charts/pgadmin4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ The command removes nearly all the Kubernetes components associated with the cha
| `tolerations` | Node tolerations for pod assignment | `[]` |
| `affinity` | Node affinity for pod assignment | `{}` |
| `podAnnotations` | Annotations for pod | `{}` |
| `templatedPodAnnotations` | Templated annotations for pod | `{}` |
| `podLabels` | Labels for pod | `{}` |
| `namespace` | Namespace where to deploy resources | `null` |
| `init.resources` | Init container CPU/memory resource requests/limits | `{}` |
Expand Down
11 changes: 10 additions & 1 deletion charts/pgadmin4/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,23 @@ spec:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or (not .Values.existingSecret) .Values.podAnnotations }}
{{- if or (not .Values.existingSecret) .Values.podAnnotations .Values.templatedPodAnnotations .Values.serverDefinitions.enabled }}
annotations:
{{- if .Values.podAnnotations }}
{{- .Values.podAnnotations | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.templatedPodAnnotations }}
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- if not .Values.existingSecret }}
checksum/secret: {{ include (print $.Template.BasePath "/auth-secret.yaml") . | sha256sum }}
{{- end }}
{{- if and .Values.serverDefinitions.enabled ( eq .Values.serverDefinitions.resourceType "Secret" ) }}
checksum/secret-server-definitions: {{ include (print $.Template.BasePath "/server-definitions-secret.yaml") . | sha256sum }}
{{- end }}
{{- if and .Values.serverDefinitions.enabled ( ne .Values.serverDefinitions.resourceType "Secret" ) }}
checksum/config-server-definitions: {{ include (print $.Template.BasePath "/server-definitions-configmap.yaml") . | sha256sum }}
{{- end }}
{{- end }}

spec:
Expand Down
4 changes: 4 additions & 0 deletions charts/pgadmin4/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ affinity: {}
## Pod annotations
##
podAnnotations: {}
templatedPodAnnotations: |-
# checksum/configmap-oauth2: {{ include "<parent-chart-name>/templates/configmap-oauth2.yaml" $ | sha256sum }}
# checksum/secret-oauth2: "{{ include "<parent-chart-name>/templates/secret-oauth2.yaml" $ | sha256sum }}"
# checksum/secret-pgpass: "{{ include "<parent-chart-name>/templates/secret-pgpass.yaml" $ | sha256sum }}"

## Pod labels
##
Expand Down

0 comments on commit 1d8e6b4

Please sign in to comment.