From 4f2990c8995b190a266ecf9c1554b9387ed511b6 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Tue, 6 Feb 2024 09:57:19 +0000 Subject: [PATCH] chore(chart): Added Artifact Hub config support Signed-off-by: Steve Hipwell --- charts/karpenter-crd/artifacthub-repo.yaml | 0 charts/karpenter/artifacthub-repo.yaml | 0 hack/release/common.sh | 2 ++ hack/toolchain.sh | 1 + 4 files changed, 3 insertions(+) create mode 100644 charts/karpenter-crd/artifacthub-repo.yaml create mode 100644 charts/karpenter/artifacthub-repo.yaml diff --git a/charts/karpenter-crd/artifacthub-repo.yaml b/charts/karpenter-crd/artifacthub-repo.yaml new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/charts/karpenter/artifacthub-repo.yaml b/charts/karpenter/artifacthub-repo.yaml new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/hack/release/common.sh b/hack/release/common.sh index 0e058134d596..242d86a460ee 100644 --- a/hack/release/common.sh +++ b/hack/release/common.sh @@ -127,8 +127,10 @@ publishHelmChart() { RELEASE_REPO=$3 HELM_CHART_VERSION=$(helmChartVersion "$RELEASE_VERSION") HELM_CHART_FILE_NAME="${CHART_NAME}-${HELM_CHART_VERSION}.tgz" + AH_CONFIG_FILE_NAME="${CHART_NAME}/artifacthub-repo.yaml" cd charts + [[ -s "${AH_CONFIG_FILE_NAME}" ]] && oras push "${RELEASE_REPO}:artifacthub.io" --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml "${AH_CONFIG_FILE_NAME}:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml" helm dependency update "${CHART_NAME}" helm lint "${CHART_NAME}" helm package "${CHART_NAME}" --version "$HELM_CHART_VERSION" diff --git a/hack/toolchain.sh b/hack/toolchain.sh index af85963a97ff..21c369f92856 100755 --- a/hack/toolchain.sh +++ b/hack/toolchain.sh @@ -23,6 +23,7 @@ tools() { go install github.com/onsi/ginkgo/v2/ginkgo@latest go install github.com/rhysd/actionlint/cmd/actionlint@latest go install github.com/mattn/goveralls@latest + go install oras.land/oras/cmd/oras@latest if ! echo "$PATH" | grep -q "${GOPATH:-undefined}/bin\|$HOME/go/bin"; then echo "Go workspace's \"bin\" directory is not in PATH. Run 'export PATH=\"\$PATH:\${GOPATH:-\$HOME/go}/bin\"'."