Skip to content

Commit

Permalink
[pgadmin4] add hostAliases feature (#264)
Browse files Browse the repository at this point in the history
Fixes:
* #251
  • Loading branch information
rowanruseler authored Nov 25, 2024
1 parent bdb5d6a commit 2c7e86e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
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.32.0
version: 1.33.0
appVersion: "8.13"
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 @@ -65,6 +65,7 @@ The command removes nearly all the Kubernetes components associated with the cha
| `serviceAccount.annotations` | Annotations to add to the service account. | `{}` |
| `serviceAccount.name` | The name of the service account. Otherwise uses the fullname. | `` |
| `serviceAccount.automountServiceAccountToken` | Opt out of API credential automounting. | `false` |
| `hostAliases` | Add entries to Pod /etc/hosts | `` |
| `strategy` | Specifies the strategy used to replace old Pods by new ones | `{}` |
| `serverDefinitions.enabled` | Enables Server Definitions | `false` |
| `serverDefinitions.resourceType` | The type of resource to deploy server definitions (either `ConfigMap` or `Secret`) | `ConfigMap` |
Expand Down
10 changes: 10 additions & 0 deletions charts/pgadmin4/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ spec:
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ default $fullName .Values.serviceAccount.name }}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases:
{{- range .Values.hostAliases }}
- ip: {{ .ip | quote }}
hostname:
{{- range .hostnames }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- if or (.Values.VolumePermissions.enabled) .Values.extraInitContainers }}
Expand Down
8 changes: 8 additions & 0 deletions charts/pgadmin4/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ serviceAccount:
# you can opt out of the default behavior
automountServiceAccountToken: false

## Pod HostAliases
## ref: https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/
##
hostAliases:
# - ip: "127.0.0.1"
# hostnames:
# - "pgadmin4.local"

## Strategy used to replace old Pods by new ones
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
##
Expand Down

0 comments on commit 2c7e86e

Please sign in to comment.