From 6d01a9d813c7129fb1473e16e71cb0fd53d95a8f Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Tue, 19 Nov 2019 07:40:01 -0600 Subject: [PATCH] Add commands to prep portworx; make postgresql work on PKS --- k8s/postgres.yaml | 9 ++++++++- prepare-vms/lib/commands.sh | 10 ++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/k8s/postgres.yaml b/k8s/postgres.yaml index 75ac4b8e..a9331f2a 100644 --- a/k8s/postgres.yaml +++ b/k8s/postgres.yaml @@ -12,7 +12,14 @@ spec: labels: app: postgres spec: - schedulerName: stork + #schedulerName: stork + initContainers: + - name: rmdir + image: alpine + volumeMounts: + - mountPath: /vol + name: postgres + command: ["sh", "-c", "if [ -d /vol/lost+found ]; then rmdir /vol/lost+found; fi"] containers: - name: postgres image: postgres:11 diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index ade36b6e..68904fa5 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -362,6 +362,16 @@ _cmd_opensg() { infra_opensg } +_cmd portworx "Prepare the nodes for Portworx deployment" +_cmd_portworx() { + TAG=$1 + need_tag + + pssh " + sudo truncate --size 10G /portworx.blk && + sudo losetup /dev/loop4 /portworx.blk" +} + _cmd disableaddrchecks "Disable source/destination IP address checks" _cmd_disableaddrchecks() { TAG=$1