Skip to content

Commit

Permalink
Merge pull request #1192 from stevehipwell/helm-chart-v3.8.4
Browse files Browse the repository at this point in the history
Changed the registry location to registry.k8s.io
  • Loading branch information
k8s-ci-robot committed Mar 6, 2023
2 parents e22363f + ecb5804 commit ac6c1a3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 59 deletions.
59 changes: 41 additions & 18 deletions .github/workflows/lint-test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,66 @@ on:

jobs:
lint-test:
name: Lint & Test
if: github.repository == 'kubernetes-sigs/metrics-server'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
- name: Set-up Python
uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912 # v4.4.0
with:
version: 3.*
python-version: "3.x"

- name: Set up Python
uses: actions/setup-python@v2
- name: Set-up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
python-version: 3.7
token: ${{ secrets.GITHUB_TOKEN }}
version: latest

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
- name: Set-up Artifact Hub CLI
run: |
set -euo pipefail
curl -Lo /tmp/ah.tar.gz https://github.com/artifacthub/hub/releases/download/v1.11.0/ah_1.11.0_linux_amd64.tar.gz
tar -xzvf /tmp/ah.tar.gz --directory /tmp
mv /tmp/ah /usr/local/bin/ah
chmod +x /usr/local/bin/ah
rm -f /tmp/ah.tar.gz
- name: Set-up chart-testing
uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # v2.3.1

- name: Run chart-testing (list-changed)
id: list-changed
- name: Check for changes
id: changes
run: |
changed=$(ct list-changed)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
changed="$(ct list-changed)"
if [[ -n "${changed}" ]]
then
echo "changed=${{ toJSON(true) }}" >> $GITHUB_OUTPUT
else
echo "changed=${{ toJSON(false) }}" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
- name: Run Artifact Hub lint
if: fromJSON(steps.changes.outputs.changed)
run: ah lint --kind helm || exit 1

- name: Run chart-testing lint
if: fromJSON(steps.changes.outputs.changed)
run: ct lint --check-version-increment=false

- name: Create Kind cluster
uses: helm/kind-action@v1.2.0
if: fromJSON(steps.changes.outputs.changed)
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
with:
wait: 120s
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
- name: Run chart-testing install
if: fromJSON(steps.changes.outputs.changed)
run: ct install
41 changes: 15 additions & 26 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ on:

jobs:
release:
name: Release
if: github.repository == 'kubernetes-sigs/metrics-server'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
fetch-depth: 0

Expand All @@ -24,19 +28,18 @@ jobs:
- name: Get chart version
id: chart_version
uses: mikefarah/yq@v4.19.1
uses: mikefarah/yq@87cba2ecbeaecf860efcceb66deab46ae030ce1e # v4.30.6
with:
cmd: yq eval '.version' './charts/metrics-server/Chart.yaml'

- name: Get chart app version
id: chart_app_version
uses: mikefarah/yq@v4.19.1
uses: mikefarah/yq@87cba2ecbeaecf860efcceb66deab46ae030ce1e # v4.30.6
with:
cmd: yq eval '.appVersion' './charts/metrics-server/Chart.yaml'

- name: Check can release
id: check_can_release
shell: bash
run: |
set -euo pipefail
Expand All @@ -50,36 +53,22 @@ jobs:
if [[ -z "${chart_version_match}" ]] || [[ -z "${app_version_match}" ]]
then
echo "::set-output name=continue::${{ toJSON(false) }}"
echo "continue=${{ toJSON(false) }}" >> $GITHUB_OUTPUT
else
echo "::set-output name=continue::${{ toJSON(true) }}"
echo "continue=${{ toJSON(true) }}" >> $GITHUB_OUTPUT
fi
- name: Install Helm
- name: Set-up Helm
if: fromJSON(steps.check_can_release.outputs.continue)
uses: azure/setup-helm@v1
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: 3.*
token: ${{ secrets.GITHUB_TOKEN }}
version: latest

- name: Run chart-releaser
if: fromJSON(steps.check_can_release.outputs.continue)
uses: helm/chart-releaser-action@v1.3.0
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "metrics-server-helm-chart-{{ .Version }}"

- uses: robinraju/release-downloader@v1.3
if: fromJSON(steps.check_can_release.outputs.continue)
with:
repository: "kubernetes-sigs/metrics-server"
tag: "v${{ steps.chart_app_version.outputs.result }}"
fileName: "*"

- name: Update release
if: fromJSON(steps.check_can_release.outputs.continue)
uses: ncipollo/release-action@v1
with:
tag: "metrics-server-helm-chart-${{ steps.chart_version.outputs.result }}"
allowUpdates: true
artifacts: "components.yaml,high-availability.yaml"
token: ${{ secrets.GITHUB_TOKEN }}
CR_MAKE_RELEASE_LATEST: false
16 changes: 2 additions & 14 deletions charts/metrics-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: metrics-server
description: Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
type: application
version: 3.8.3
version: 3.8.4
appVersion: 0.6.2
keywords:
- kubernetes
Expand All @@ -21,17 +21,5 @@ maintainers:
url: https://github.com/endrec
annotations:
artifacthub.io/changes: |
- kind: added
description: "Added support for topologySpreadConstraints."
- kind: added
description: "Set resource namespaces explicitly."
- kind: added
description: "Allow configuring TLS on the APIService."
- kind: added
description: "Enabled service monitor relabelling."
- kind: added
description: "Added ability to set the scheduler name."
- kind: added
description: "Added support for common labels."
- kind: changed
description: "Updated Metrics Server image to v0.6.2."
description: "Changed the image registry location to registry.k8s.io."
2 changes: 1 addition & 1 deletion charts/metrics-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Declare variables to be passed into your templates.

image:
repository: k8s.gcr.io/metrics-server/metrics-server
repository: registry.k8s.io/metrics-server/metrics-server
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
tag: ""
pullPolicy: IfNotPresent
Expand Down

0 comments on commit ac6c1a3

Please sign in to comment.