From 54335c4c0a5ef87e6a96385ae1589205afed342f Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 8 Oct 2020 07:52:34 -0700 Subject: [PATCH] Update EFS tooling to track releases --- charts/kubezero-aws-efs-csi-driver/.gitignore | 1 + .../charts/aws-efs-csi-driver/Chart.yaml | 2 +- charts/kubezero-aws-efs-csi-driver/update.sh | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 charts/kubezero-aws-efs-csi-driver/.gitignore diff --git a/charts/kubezero-aws-efs-csi-driver/.gitignore b/charts/kubezero-aws-efs-csi-driver/.gitignore new file mode 100644 index 00000000..5664e303 --- /dev/null +++ b/charts/kubezero-aws-efs-csi-driver/.gitignore @@ -0,0 +1 @@ +git diff --git a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml index e56ac79d..1a6eaa53 100644 --- a/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml +++ b/charts/kubezero-aws-efs-csi-driver/charts/aws-efs-csi-driver/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0.0" name: aws-efs-csi-driver description: A Helm chart for AWS EFS CSI Driver -version: 0.1.0 +version: 0.2.0 kubeVersion: ">=1.14.0-0" home: https://github.com/kubernetes-sigs/aws-efs-csi-driver sources: diff --git a/charts/kubezero-aws-efs-csi-driver/update.sh b/charts/kubezero-aws-efs-csi-driver/update.sh index e1069b71..f0af439e 100755 --- a/charts/kubezero-aws-efs-csi-driver/update.sh +++ b/charts/kubezero-aws-efs-csi-driver/update.sh @@ -2,9 +2,11 @@ set -ex REPO="kubernetes-sigs/aws-efs-csi-driver" -LATEST_RELEASE=$(curl -sL -s https://api.github.com/repos/${REPO}/releases | grep '"tag_name":' | cut -d'"' -f4 | grep -v -E "(alpha|beta|rc)" | sort -t"." -k 1,1 -k 2,2 -k 3,3 -k 4,4 | tail -n 1) +[ -z "$RELEASE" ] && RELEASE=$(curl -sL -s https://api.github.com/repos/${REPO}/releases | grep '"tag_name":' | cut -d'"' -f4 | grep -v -E "(alpha|beta|rc)" | sort -t"." -k 1,1 -k 2,2 -k 3,3 -k 4,4 | tail -n 1) -URL="https://github.com/${REPO}/releases/download/${LATEST_RELEASE}/helm-chart.tgz" +rm -rf git +git clone https://github.com/$REPO.git git +cd git && git checkout $RELEASE && cd - rm -rf charts && mkdir -p charts/aws-efs-csi-driver -curl -sL "$URL" | tar xz -C charts/aws-efs-csi-driver --strip-components=1 +mv git/helm/* charts/aws-efs-csi-driver