Skip to content

Commit

Permalink
Set default db to postgres.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrateau committed Oct 11, 2017
1 parent 0aef51c commit 7ef9065
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Bluemix/odm-standard-bx-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: SAMPLE
value: "true"
ports:
- containerPort: 1527
- containerPort: 5432
---
apiVersion: v1
kind: Service
Expand All @@ -28,7 +28,7 @@ spec:
type: NodePort
ports:
- protocol: TCP
port: 1527
port: 5432
---
apiVersion: extensions/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
Expand Down
4 changes: 2 additions & 2 deletions Bluemix/odm-standard-bx-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: SAMPLE
value: "true"
ports:
- containerPort: 1527
- containerPort: 5432
---
apiVersion: v1
kind: Service
Expand All @@ -28,7 +28,7 @@ spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 1527
port: 5432
---
apiVersion: extensions/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
Expand Down
8 changes: 4 additions & 4 deletions MiniKube/odm-standard-minikube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
- name: SAMPLE
value: "true"
ports:
- containerPort: 1527
- containerPort: 5432
volumeMounts:
- name: odm-volume
# mount path within the container
mountPath: /dbs
mountPath: /pgdata
---
apiVersion: v1
kind: Service
Expand All @@ -64,7 +64,7 @@ spec:
type: NodePort
ports:
- protocol: TCP
port: 1527
port: 5432
---
apiVersion: extensions/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
Expand Down Expand Up @@ -98,7 +98,7 @@ spec:
port: 9080
- name: notification
protocol: TCP
port: 1883
port: 1883
---
apiVersion: extensions/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
Expand Down
4 changes: 2 additions & 2 deletions gcloud/odm-standard-gcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: SAMPLE
value: "true"
ports:
- containerPort: 1527
- containerPort: 5432
---
apiVersion: v1
kind: Service
Expand All @@ -28,7 +28,7 @@ spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 1527
port: 5432
---
apiVersion: extensions/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
Expand Down
3 changes: 3 additions & 0 deletions helm/stable/odmcharts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ The following tables lists the configurable parameters of the Drupal chart and t
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `service.type` | Kubernetes Service type | `NodePort` |
| `persistence.enabled` | Enable persistence using PVC | `false` |
| `persistence.postgresql.user` | This parameter is used in conjunction with 'persistence.postgresql.password' to set a user and its password. This parameter will create the specified user with superuser power and a database with the same name. | `odm` |
| `persistence.postgresql.password` | This parameter sets the superuser password for PostgreSQL. The default superuser is defined by the 'persistence.postgresql.user' environment variable. | `odm` |
| `persistence.postgresql.databasename` | This parameter can be used to define a different name for the default database that is created when the image is first started. | `odmdb` |
| `decisionServerRuntime.replicaCount`| Number of the desired runtime | `2` |
| `decisionCenter.replicaCount` | Number of the desired Decision Center | `1` |
| `decisionRunner.replicaCount` | Number of the desired Decision Runner | `1` |
Expand Down
12 changes: 10 additions & 2 deletions helm/stable/odmcharts/templates/dbserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ spec:
image: {{ .Values.image.repository }}/dbserver:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: POSTGRES_USER
value: "{{ .Values.persistence.postgresql.user }}"
- name: POSTGRES_PASSWORD
value: "{{ .Values.persistence.postgresql.password }}"
- name: POSTGRES_DB
value: "{{ .Values.persistence.postgresql.databasename }}"
- name: PGDATA
value: "/pgdata"
- name: SAMPLE
value: "{{ .Values.persistence.populateDataSample }}"
ports:
- containerPort: 1527
- containerPort: 5432
{{- if .Values.persistence.enabled }}
volumeMounts:
- name: {{ template "fullname" . }}-volume
mountPath: /dbs
mountPath: /pgdata
{{- end }}
{{- if (not (empty .Values.image.pullSecrets )) }}
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion helm/stable/odmcharts/templates/dbserver-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ spec:
type: {{ .Values.service.type }}
ports:
- protocol: TCP
port: 1527
port: 5432
4 changes: 4 additions & 0 deletions helm/stable/odmcharts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ image:
persistence:
enabled: true
populateDataSample: false
postgresql:
user: odm
password: odm
databasename: odmdb


service:
Expand Down

0 comments on commit 7ef9065

Please sign in to comment.