From 22c3df920ff350c525541f6a7a9a8d737c87101a Mon Sep 17 00:00:00 2001 From: Camil Blanaru Date: Thu, 16 Nov 2017 08:46:43 +0100 Subject: [PATCH] Add Azure support. --- deploy | 11 ++++++++++- manifests/prometheus/prometheus-k8s.yaml | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/deploy b/deploy index 1f68db6..7cf084a 100755 --- a/deploy +++ b/deploy @@ -47,7 +47,7 @@ kctl() { #Cloud Provider PS3="${GREEN_PS3}Please select your cloud provider:" -options=("AWS" "GCP") +options=("AWS" "GCP" "Azure") select opt in "${options[@]}" do tput sgr0 @@ -77,6 +77,15 @@ do sed -i -e 's,STORAGE_CLASS_TYPE,'"$STORAGE_CLASS_TYPE"',g' manifests/prometheus/prometheus-k8s.yaml; break ;; + "Azure") + echo "Deploying on Azure" + STORAGE_CLASS_PROVISIONER=kubernetes.io/azure-disk + STORAGE_CLASS_TYPE=Managed + sed -i -e 's,type,'kind',g' manifests/prometheus/prometheus-k8s.yaml; + sed -i -e 's,STORAGE_CLASS_PROVISIONER,'"$STORAGE_CLASS_PROVISIONER"',g' manifests/prometheus/prometheus-k8s.yaml; + sed -i -e 's,STORAGE_CLASS_TYPE,'"$STORAGE_CLASS_TYPE"',g' manifests/prometheus/prometheus-k8s.yaml; + break + ;; *) echo invalid option;; esac done diff --git a/manifests/prometheus/prometheus-k8s.yaml b/manifests/prometheus/prometheus-k8s.yaml index 09898a4..a3dc739 100644 --- a/manifests/prometheus/prometheus-k8s.yaml +++ b/manifests/prometheus/prometheus-k8s.yaml @@ -2,6 +2,8 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ssd + annotations: + storageclass.beta.kubernetes.io/is-default-class: "true" provisioner: STORAGE_CLASS_PROVISIONER parameters: type: STORAGE_CLASS_TYPE