Skip to content
Snippets Groups Projects
Unverified Commit 41e8757e authored by groundhog2k's avatar groundhog2k Committed by GitHub
Browse files

Removed node selector and improved chart configuration (#129)

parent b8224731
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,6 @@ type: application
maintainers:
- name: groundhog2k
version: 0.2.0
version: 0.2.1
appVersion: "13.1"
# PostgreSQL
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 13.1](https://img.shields.io/badge/AppVersion-13.1-informational?style=flat-square)
![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 13.1](https://img.shields.io/badge/AppVersion-13.1-informational?style=flat-square)
A Helm chart for PostgreSQL on Kubernetes
......@@ -58,11 +58,12 @@ $ helm uninstall my-release
| livenessProbe | object | `see values.yaml` | Liveness probe configuration |
| readinessProbe | object | `see values.yaml` | Readiness probe configuration |
| resources | object | `{}` | Resource limits and requests |
| nodeSelector."kubernetes.io/arch" | string | `"amd64"` | Deployment node selector |
| nodeSelector | object | `{}` | Deployment node selector |
| podAnnotations | object | `{}` | Additional pod annotations |
| podSecurityContext | object | `see values.yaml` | Pod security context |
| securityContext | object | `see values.yaml` | Container security context |
| env | list | `[]` | Additional container environmment variables |
| args | string | `[]` | Arguments for the container entrypoint process |
| serviceAccount.annotations | object | `{}` | Additional service account annotations |
| serviceAccount.create | bool | `false` | Enable service account creation |
| serviceAccount.name | string | `""` | Name of the service account |
......@@ -80,16 +81,15 @@ $ helm uninstall my-release
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode |
| storage.persistentVolumeClaimName | string | `""` | PVC name when existing storage volume should be used |
| storage.requestedSize | string | `""` | Size for new PVC, when no existing PVC is used |
| storage.className | string | `""` | Storage class name |
| storage.persistentVolumeClaimName | string | `nil` | PVC name when existing storage volume should be used |
| storage.requestedSize | string | `nil` | Size for new PVC, when no existing PVC is used |
| storage.className | string | `nil` | Storage class name |
## PostgreSQL parameters
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| arguments | string | `nil` | Arguments for the container entrypoint process |
| customConfig | string | `""` | Optional custom configuration block that will be mounted as file in /etc/postgresql/postgresql.conf |
| customConfig | string | `nil` | Optional custom configuration block that will be mounted as file in /etc/postgresql/postgresql.conf |
| settings.authMethod | string | `"md5"` | Postgres database authentication method |
| settings.initDbArgs | string | `nil` | Optional init database arguments |
| settings.superuserPassword | string | `nil` | Password of superuser (Random value if not specified) |
......
......@@ -5,11 +5,17 @@ metadata:
labels:
{{- include "postgres.labels" . | nindent 4 }}
spec:
clusterIP: None
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: postgres
protocol: TCP
name: postgres
{{- if and (eq .Values.service.type "NodePort") (.Values.service.nodePort) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.service.clusterIP) }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
selector:
{{- include "postgres.selectorLabels" . | nindent 4 }}
......@@ -24,12 +24,16 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "postgres.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
......@@ -79,11 +83,13 @@ spec:
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.arguments }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.args }}
args:
{{- range .Values.arguments }}
{{- range .Values.args }}
- {{ . }}
{{- end }}
{{- end }}
......
......@@ -40,7 +40,12 @@ securityContext:
## The postgres service configuration (Default is ClusterIP with port 5432)
service:
type: ClusterIP
port: 5432
## The node port (only relevant for type NodePort)
nodePort: {}
## The cluster ip address (only relevant for type LoadBalancer)
clusterIP: {}
resources: {}
# limits:
......@@ -50,10 +55,8 @@ resources: {}
# cpu: 100m
# memory: 128Mi
## Default node type for the image
## use arm64 for arm64v8
nodeSelector:
kubernetes.io/arch: amd64
## Additional node selector
nodeSelector: {}
tolerations: []
......@@ -81,7 +84,7 @@ readinessProbe:
env: []
## Arguments for the container entrypoint process
arguments:
args: []
## Database configuration
settings:
......@@ -111,13 +114,13 @@ customConfig: |-
## Storage parameters
storage:
## Set persistentVolumenClaimName to reference an existing PVC
# persistentVolumeClaimName: <own-pvc-name>
persistentVolumeClaimName: {}
## Alternative set requestedSize to define a size for a dynmaically created PVC
# requestedSize: <volume-size>
requestedSize: {}
## the storage class name
# className:
className: {}
## Default access mode (ReadWriteOnce)
accessModes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment