Last active
December 12, 2022 07:25
-
-
Save zxkane/1094a70f9ba659748f4859c4e79a73f5 to your computer and use it in GitHub Desktop.
mirror helm charts to s3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
BUCKET=aws-gcr-solutions-assets | |
mirror-helm() { | |
local repoName=$1 | |
local chartName=$2 | |
local version=$3 | |
local repo=$4 | |
mkdir -p $repoName | |
aws s3 sync s3://$BUCKET/helm/charts/$repoName/ $repoName --region cn-north-1 | |
helm repo add $repoName $repo | |
helm repo update | |
helm pull $repoName/$chartName --version $version -d $repoName | |
helm repo index $repoName | |
aws s3 sync $repoName s3://$BUCKET/helm/charts/$repoName/ --acl public-read --region cn-north-1 | |
} | |
mirror-helm "aws-efs-csi-driver" "aws-efs-csi-driver" "2.2.0" "https://kubernetes-sigs.github.io/aws-efs-csi-driver/" | |
mirror-helm "eks-charts" "aws-load-balancer-controller" "1.4.4" "https://aws.github.io/eks-charts" | |
mirror-helm "oteemo" "sonatype-nexus" "5.4.0" "https://oteemo.github.io/charts/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment