From 57497c36ec10f39917d7f6f709beb0d7afa5fdf2 Mon Sep 17 00:00:00 2001 From: Bastiaan Schaap Date: Wed, 28 Feb 2018 17:45:29 +0100 Subject: [PATCH 1/2] Fixes fabric8io/gofabric8#645 --- apps/auth-db/src/main/fabric8/deployment.yml | 5 ++--- apps/gitea-db/src/main/fabric8/deployment.yml | 4 ++-- apps/init-tenant/src/main/fabric8/db-deployment.yml | 4 ++-- apps/mattermost-db/src/main/fabric8/deployment.yml | 4 ++-- apps/wit/src/main/fabric8/db-deployment.yml | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/auth-db/src/main/fabric8/deployment.yml b/apps/auth-db/src/main/fabric8/deployment.yml index 209330a3..8c1288c4 100644 --- a/apps/auth-db/src/main/fabric8/deployment.yml +++ b/apps/auth-db/src/main/fabric8/deployment.yml @@ -16,7 +16,6 @@ spec: image: registry.centos.org/postgresql/postgresql:9.6 imagePullPolicy: IfNotPresent env: - env: - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: @@ -48,10 +47,10 @@ spec: - containerPort: 5432 protocol: TCP volumeMounts: - - mountPath: /var/lib/pgsql + - mountPath: /var/lib/pgsql/data name: auth-db-postgresql-data readOnly: false volumes: - name: auth-db-postgresql-data persistentVolumeClaim: - claimName: auth-db-postgresql-data \ No newline at end of file + claimName: auth-db-postgresql-data diff --git a/apps/gitea-db/src/main/fabric8/deployment.yml b/apps/gitea-db/src/main/fabric8/deployment.yml index e14160e9..b9e04ac6 100644 --- a/apps/gitea-db/src/main/fabric8/deployment.yml +++ b/apps/gitea-db/src/main/fabric8/deployment.yml @@ -48,10 +48,10 @@ spec: - containerPort: 5432 protocol: TCP volumeMounts: - - mountPath: /var/lib/pgsql + - mountPath: /var/lib/pgsql/data name: gitea-db-postgresql-data readOnly: false volumes: - name: gitea-db-postgresql-data persistentVolumeClaim: - claimName: gitea-db-postgresql-data \ No newline at end of file + claimName: gitea-db-postgresql-data diff --git a/apps/init-tenant/src/main/fabric8/db-deployment.yml b/apps/init-tenant/src/main/fabric8/db-deployment.yml index ceca0e9d..9c18f79d 100644 --- a/apps/init-tenant/src/main/fabric8/db-deployment.yml +++ b/apps/init-tenant/src/main/fabric8/db-deployment.yml @@ -49,10 +49,10 @@ spec: - containerPort: 5432 protocol: TCP volumeMounts: - - mountPath: /var/lib/pgsql + - mountPath: /var/lib/pgsql/data name: init-tenant-postgresql-data readOnly: false volumes: - name: init-tenant-postgresql-data persistentVolumeClaim: - claimName: init-tenant-postgresql-data \ No newline at end of file + claimName: init-tenant-postgresql-data diff --git a/apps/mattermost-db/src/main/fabric8/deployment.yml b/apps/mattermost-db/src/main/fabric8/deployment.yml index de93b4fd..1e738e90 100644 --- a/apps/mattermost-db/src/main/fabric8/deployment.yml +++ b/apps/mattermost-db/src/main/fabric8/deployment.yml @@ -48,10 +48,10 @@ spec: - containerPort: 5432 protocol: TCP volumeMounts: - - mountPath: /var/lib/pgsql + - mountPath: /var/lib/pgsql/data name: mattermost-db-postgresql-data readOnly: false volumes: - name: mattermost-db-postgresql-data persistentVolumeClaim: - claimName: mattermost-db-postgresql-data \ No newline at end of file + claimName: mattermost-db-postgresql-data diff --git a/apps/wit/src/main/fabric8/db-deployment.yml b/apps/wit/src/main/fabric8/db-deployment.yml index 6cc97775..2b1ecf38 100644 --- a/apps/wit/src/main/fabric8/db-deployment.yml +++ b/apps/wit/src/main/fabric8/db-deployment.yml @@ -49,10 +49,10 @@ spec: - containerPort: 5432 protocol: TCP volumeMounts: - - mountPath: /var/lib/pgsql + - mountPath: /var/lib/pgsql/data name: wit-postgresql-data readOnly: false volumes: - name: wit-postgresql-data persistentVolumeClaim: - claimName: wit-postgresql-data \ No newline at end of file + claimName: wit-postgresql-data From 657862f55ccff195b1a93b978c7881f996bf0844 Mon Sep 17 00:00:00 2001 From: Bastiaan Schaap Date: Thu, 1 Mar 2018 11:37:33 +0100 Subject: [PATCH 2/2] Add fs security context to make volume writable --- apps/auth-db/src/main/fabric8/deployment.yml | 2 ++ apps/gitea-db/src/main/fabric8/deployment.yml | 2 ++ apps/init-tenant/src/main/fabric8/db-deployment.yml | 2 ++ apps/mattermost-db/src/main/fabric8/deployment.yml | 2 ++ apps/wit/src/main/fabric8/db-deployment.yml | 2 ++ 5 files changed, 10 insertions(+) diff --git a/apps/auth-db/src/main/fabric8/deployment.yml b/apps/auth-db/src/main/fabric8/deployment.yml index 8c1288c4..e9fa9a07 100644 --- a/apps/auth-db/src/main/fabric8/deployment.yml +++ b/apps/auth-db/src/main/fabric8/deployment.yml @@ -50,6 +50,8 @@ spec: - mountPath: /var/lib/pgsql/data name: auth-db-postgresql-data readOnly: false + securityContext: + fsGroup: 0 volumes: - name: auth-db-postgresql-data persistentVolumeClaim: diff --git a/apps/gitea-db/src/main/fabric8/deployment.yml b/apps/gitea-db/src/main/fabric8/deployment.yml index b9e04ac6..89fe56fd 100644 --- a/apps/gitea-db/src/main/fabric8/deployment.yml +++ b/apps/gitea-db/src/main/fabric8/deployment.yml @@ -51,6 +51,8 @@ spec: - mountPath: /var/lib/pgsql/data name: gitea-db-postgresql-data readOnly: false + securityContext: + fsGroup: 0 volumes: - name: gitea-db-postgresql-data persistentVolumeClaim: diff --git a/apps/init-tenant/src/main/fabric8/db-deployment.yml b/apps/init-tenant/src/main/fabric8/db-deployment.yml index 9c18f79d..ffe33ec5 100644 --- a/apps/init-tenant/src/main/fabric8/db-deployment.yml +++ b/apps/init-tenant/src/main/fabric8/db-deployment.yml @@ -52,6 +52,8 @@ spec: - mountPath: /var/lib/pgsql/data name: init-tenant-postgresql-data readOnly: false + securityContext: + fsGroup: 0 volumes: - name: init-tenant-postgresql-data persistentVolumeClaim: diff --git a/apps/mattermost-db/src/main/fabric8/deployment.yml b/apps/mattermost-db/src/main/fabric8/deployment.yml index 1e738e90..888e8297 100644 --- a/apps/mattermost-db/src/main/fabric8/deployment.yml +++ b/apps/mattermost-db/src/main/fabric8/deployment.yml @@ -51,6 +51,8 @@ spec: - mountPath: /var/lib/pgsql/data name: mattermost-db-postgresql-data readOnly: false + securityContext: + fsGroup: 0 volumes: - name: mattermost-db-postgresql-data persistentVolumeClaim: diff --git a/apps/wit/src/main/fabric8/db-deployment.yml b/apps/wit/src/main/fabric8/db-deployment.yml index 2b1ecf38..96dee549 100644 --- a/apps/wit/src/main/fabric8/db-deployment.yml +++ b/apps/wit/src/main/fabric8/db-deployment.yml @@ -52,6 +52,8 @@ spec: - mountPath: /var/lib/pgsql/data name: wit-postgresql-data readOnly: false + securityContext: + fsGroup: 0 volumes: - name: wit-postgresql-data persistentVolumeClaim: