Skip to content

Instantly share code, notes, and snippets.

@zxkane
Last active December 12, 2022 07:25
Show Gist options
  • Save zxkane/1094a70f9ba659748f4859c4e79a73f5 to your computer and use it in GitHub Desktop.
Save zxkane/1094a70f9ba659748f4859c4e79a73f5 to your computer and use it in GitHub Desktop.
mirror helm charts to s3
#!/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