-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated configmap to use
tpl
to substitute values in config files.
The bookkeeper.yml file can now get values from values.yaml which are substituted using the template syntax. Still need to figure out how to pass in the secret that way. Also committed the postgres.yaml config that I forgot last time. This continues work on issue #66.
- Loading branch information
Showing
4 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: postgres | ||
labels: | ||
{{- include "bookkeeper.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: postgres | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: postgres | ||
spec: | ||
containers: | ||
- name: postgres | ||
image: docker.io/postgres:11-alpine | ||
command: [ "su", "-", "postgres", "-c", "postgres -D /opt/local/bookkeeper/postgresql/data" ] | ||
ports: | ||
- name: postgres | ||
containerPort: 5432 | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
- name: bookkeeper-volume | ||
mountPath: "/opt/local" | ||
readOnly: false | ||
env: | ||
- name: POSTGRES_HOST | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ .Release.Name }}-configmap | ||
key: POSTGRES_HOST | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-credentials | ||
key: password | ||
- name: POSTGRES_USER | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ .Release.Name }}-configmap | ||
key: POSTGRES_USER | ||
restartPolicy: Always | ||
volumes: | ||
- name: bookkeeper-volume | ||
persistentVolumeClaim: | ||
claimName: bookkeeper-pvc | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgres | ||
labels: | ||
{{- include "bookkeeper.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
app: postgres | ||
ports: | ||
- name: postgres | ||
port: 5432 | ||
protocol: TCP | ||
targetPort: postgres |