fixing deployment
This commit is contained in:
@ -4,23 +4,6 @@ metadata:
|
||||
name: {{ .Values.app.name }}
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.container.resources.requests.cpu }}
|
||||
memory: {{ .Values.container.resources.requests.memory }}
|
||||
{{ if .Values.container.resources.limits.enabled }}
|
||||
limits:
|
||||
cpu: {{ .Values.container.resources.limits.cpu }}
|
||||
memory: {{ .Values.container.resources.limits.memory }}
|
||||
{{ end }}
|
||||
spec:
|
||||
replicas: {{ .Values.container.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.app.name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
@ -30,10 +13,21 @@ spec:
|
||||
image: {{ .Values.container.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.container.port }}
|
||||
{{ if .Values.container.env }}
|
||||
env:
|
||||
{{- range $env := .Values.container.env }}
|
||||
- name: {{ $env.name }}
|
||||
value: {{ $env.value }}
|
||||
{{- end}}
|
||||
{{ end }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.container.resources.requests.cpu }}
|
||||
memory: {{ .Values.container.resources.requests.memory }}
|
||||
{{ if .Values.container.resources.limits.enabled }}
|
||||
limits:
|
||||
cpu: {{ .Values.container.resources.limits.cpu }}
|
||||
memory: {{ .Values.container.resources.limits.memory }}
|
||||
{{ end }}
|
||||
imagePullSecrets:
|
||||
- name: docker-registry-cred
|
||||
|
@ -14,17 +14,24 @@ spec:
|
||||
labels:
|
||||
app: {{ .Values.database.name }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: {{ .Values.database.name }}-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.database.name }}-pvc
|
||||
containers:
|
||||
- name: {{ .Values.database.name }}
|
||||
image: bitnami/postgresql:latest
|
||||
image: postgres
|
||||
ports:
|
||||
containerPort: 5432
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- mountPath: /bitnami/postgresql
|
||||
- mountPath: /data
|
||||
name: {{ .Values.database.name }}-storage
|
||||
env:
|
||||
- name: POSTGRESQL_USERNAME
|
||||
- name: PGDATA
|
||||
value: /data
|
||||
- name: POSTGRES_USER
|
||||
value: {{ .Values.database.auth.user }}
|
||||
- name: POSTGRESQL_PASSWORD
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: {{ .Values.database.auth.password }}
|
||||
- name: POSTGRESQL_DATABASE
|
||||
value: {{ .Values.database.createdDatabase }}
|
||||
|
11
template-postgres/templates/service.yaml
Normal file
11
template-postgres/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.database.name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Values.database.name }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
@ -3,9 +3,8 @@ container:
|
||||
database:
|
||||
createdDatabase: postgres
|
||||
name: template-postgres
|
||||
mountPath: /mnt/postgres/data
|
||||
mountPath: /mnt/postgres/template
|
||||
size: 10Gi
|
||||
auth:
|
||||
user: postgres
|
||||
password: super
|
||||
|
||||
password: super
|
Reference in New Issue
Block a user