From 04e0e1276b074c010ccc3e36111d53d251bfa848 Mon Sep 17 00:00:00 2001 From: "coulof" Date: Wed, 5 Feb 2020 14:12:05 +0100 Subject: [PATCH 1/1] Support gke --- helm/common.bash | 5 +-- helm/csi-powermax/templates/ds-iscsi.yaml | 39 +++++++++++++++++++++++ helm/install.powermax | 1 - 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 helm/csi-powermax/templates/ds-iscsi.yaml diff --git a/helm/common.bash b/helm/common.bash index 6dd2833..926a457 100644 --- a/helm/common.bash +++ b/helm/common.bash @@ -4,9 +4,6 @@ kubectl --help >&/dev/null || { echo "kubectl required for installation... exiting"; exit 2 } -kubeadm --help >&/dev/null || { - echo "kubeadm required for installation... exiting"; exit 2 -} waitOnRunning() { TARGET=$(kubectl get pods -n ${NS} | grep ${NS} | wc -l) @@ -24,5 +21,5 @@ waitOnRunning() { # Get the kubernetes major and minor version numbers. kMajorVersion=$(kubectl version | grep 'Server Version' | sed -e 's/^.*Major:"//' -e 's/",.*//') -kMinorVersion=$(kubectl version | grep 'Server Version' | sed -e 's/^.*Minor:"//' -e 's/",.*//') +kMinorVersion=$(kubectl version | grep 'Server Version' | sed -e 's/^.*Minor:"//' -e 's/\+\?",.*//') diff --git a/helm/csi-powermax/templates/ds-iscsi.yaml b/helm/csi-powermax/templates/ds-iscsi.yaml new file mode 100644 index 0000000..f0cb61d --- /dev/null +++ b/helm/csi-powermax/templates/ds-iscsi.yaml @@ -0,0 +1,39 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: start-iscsid + namespace: kube-system + annotations: + kubernetes.io/description: 'DaemonSet that starts iscsid on every nodes.' +spec: + selector: + matchLabels: + name: start-iscsid + template: + metadata: + labels: + name: start-iscsid + spec: + hostNetwork: true + hostPID: true + volumes: + - hostPath: + path: / + name: host + initContainers: + - name: iscid-start + image: ubuntu + command: ["chroot", "/host", "systemctl", "start", "iscsid"] + securityContext: + privileged: true + volumeMounts: + - name: host + mountPath: /host + resources: + requests: + memory: "10Mi" + cpu: "10m" + containers: + - name: pause + image: gcr.io/google_containers/pause + imagePullPolicy: IfNotPresent diff --git a/helm/install.powermax b/helm/install.powermax index 3994500..6060c7a 100644 --- a/helm/install.powermax +++ b/helm/install.powermax @@ -6,7 +6,6 @@ source ./common.bash echo "Running Kubernetes Server Version $kMajorVersion.$kMinorVersion" # Verify the kubernetes installation has the iscsi software, feature gates needed. -sh ./verify.kubernetes rc=$? if [ $rc -ne 0 ] ; then echo "****************************************************************" -- 2.20.1