Merge "Support configurable admin credentials in Postgres"
This commit is contained in:
commit
db2276055e
26
postgresql/templates/secret-admin.yaml
Normal file
26
postgresql/templates/secret-admin.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
{{- if .Values.manifests.secret_admin }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.secrets.postgresql.admin }}
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
POSTGRES_USER: {{ .Values.endpoints.postgresql.auth.admin.username | b64enc }}
|
||||||
|
POSTGRES_PASSWORD: {{ .Values.endpoints.postgresql.auth.admin.password | b64enc }}
|
||||||
|
{{- end }}
|
@ -45,6 +45,17 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ tuple "postgresql" "internal" "postgresql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
- containerPort: {{ tuple "postgresql" "internal" "postgresql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
env:
|
||||||
|
- name: 'POSTGRES_PASSWORD'
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.postgresql.admin }}
|
||||||
|
key: 'POSTGRES_PASSWORD'
|
||||||
|
- name: 'POSTGRES_USER'
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.secrets.postgresql.admin }}
|
||||||
|
key: 'POSTGRES_USER'
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
|
@ -60,9 +60,17 @@ dependencies:
|
|||||||
postgresql:
|
postgresql:
|
||||||
jobs: null
|
jobs: null
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
postgresql:
|
||||||
|
admin: postgresql-admin
|
||||||
|
|
||||||
endpoints:
|
endpoints:
|
||||||
cluster_domain_suffix: cluster.local
|
cluster_domain_suffix: cluster.local
|
||||||
postgresql:
|
postgresql:
|
||||||
|
auth:
|
||||||
|
admin:
|
||||||
|
username: postgres
|
||||||
|
password: sergtsop
|
||||||
hosts:
|
hosts:
|
||||||
default: postgresql
|
default: postgresql
|
||||||
host_fqdn_override:
|
host_fqdn_override:
|
||||||
@ -72,3 +80,6 @@ endpoints:
|
|||||||
port:
|
port:
|
||||||
postgresql:
|
postgresql:
|
||||||
default: 5432
|
default: 5432
|
||||||
|
|
||||||
|
manifests:
|
||||||
|
secret_admin: true
|
||||||
|
Loading…
Reference in New Issue
Block a user