set system default registry (#52659)

This commit is contained in:
Pedro Tashima
2025-11-10 11:07:39 -03:00
committed by GitHub
parent 89daf2d8cb
commit 98de5d70f5
5 changed files with 13 additions and 4 deletions

View File

@@ -93,8 +93,6 @@ jobs:
run: git config --global --add safe.directory "$PWD"
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: setup and build
uses: ./.github/actions/rancher-chart/build
- name: Load Secrets from Vault
uses: rancher-eio/read-vault-secrets@main
with:
@@ -104,6 +102,9 @@ jobs:
secret/data/github/repo/${{ github.repository }}/chart-dns-invalidator/credentials accessKeyId | AWS_ACCESS_KEY_ID_CACHE_INVALIDATION ;
secret/data/github/repo/${{ github.repository }}/chart-dns-invalidator/credentials secretAccessKey | AWS_SECRET_ACCESS_KEY_CACHE_INVALIDATION ;
secret/data/github/repo/${{ github.repository }}/chart-optimus-uploader/credentials stagingChartsOptimusBucketName | CHARTS_BUCKET_NAME ;
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials registry | REGISTRY ;
- name: setup and build
uses: ./.github/actions/rancher-chart/build
- name: publish
env:
CHARTS_DISTRIBUTION_ID: EKGBR3PUZ9J56

View File

@@ -86,6 +86,7 @@ jobs:
cancel-in-progress: false
env:
ARCH: amd64
REGISTRY: "" # remove to set the registry at systemDefaultRegistry on the chart
steps:
- name: install dependencies
shell: bash

View File

@@ -94,8 +94,6 @@ jobs:
run: git config --global --add safe.directory "$PWD"
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: setup and build
uses: ./.github/actions/rancher-chart/build
- name: Load Secrets from Vault
uses: rancher-eio/read-vault-secrets@main
with:
@@ -103,6 +101,9 @@ jobs:
secret/data/github/repo/${{ github.repository }}/aws/credentials accessKeyId | AWS_ACCESS_KEY_ID_CHARTS;
secret/data/github/repo/${{ github.repository }}/aws/credentials secretAccessKey | AWS_SECRET_ACCESS_KEY_CHARTS;
secret/data/github/repo/${{ github.repository }}/aws/credentials chartsBucketName | CHARTS_BUCKET_NAME;
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials registry | REGISTRY;
- name: setup and build
uses: ./.github/actions/rancher-chart/build
- name: publish
env:
CHARTS_BUCKET_NAME: ${{ env.CHARTS_BUCKET_NAME }}

View File

@@ -88,6 +88,7 @@ jobs:
cancel-in-progress: false
env:
ARCH: amd64
REGISTRY: "" # remove to set the registry at systemDefaultRegistry on the chart
steps:
- name: install dependencies
shell: bash

View File

@@ -31,3 +31,8 @@ sed -i -e "s@%POST_DELETE_IMAGE_NAME%@${rancher_shell_image_name}@g" build/chart
sed -i -e "s/%POST_DELETE_IMAGE_TAG%/${rancher_shell_image_tag}/g" build/chart/rancher/values.yaml
sed -i -e "s@%PRE_UPGRADE_IMAGE_NAME%@${rancher_shell_image_name}@g" build/chart/rancher/values.yaml
sed -i -e "s/%PRE_UPGRADE_IMAGE_TAG%/${rancher_shell_image_tag}/g" build/chart/rancher/values.yaml
if [[ -v REGISTRY ]]; then
sed -i "s|systemDefaultRegistry: .*|systemDefaultRegistry: ${REGISTRY}|g" build/chart/rancher/values.yaml
sed -i "s/| \`systemDefaultRegistry\`\s*| \"\"\s*|/| \`systemDefaultRegistry\` | \"${REGISTRY}\" |/" build/chart/rancher/README.md
fi