File tree Expand file tree Collapse file tree
actions/kind-config-patch Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Patch kind config
2+ description : Patch kind config to add registry mirror with authentication.
3+ inputs :
4+ kind_config_path :
5+ description : ' Path to the kind config file'
6+ required : false
7+ default : $PWD/config/kind.yaml
8+ registry-username :
9+ description : Username for registry
10+ required : true
11+ registry-password :
12+ description : Password for registry
13+ required : true
14+
15+ runs :
16+ using : composite
17+ steps :
18+ - name : Patch kind config for registry mirror
19+ shell : bash
20+ run : |
21+ KIND_CONFIG_PATH="${{ inputs.kind_config_path }}"
22+ cat <<EOF > patches.yaml
23+ containerdConfigPatches:
24+ - |-
25+ [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
26+ endpoint = ["https://registry.ci.mirantis.com/v2/dockerhub"]
27+ - |-
28+ [plugins."io.containerd.grpc.v1.cri".registry.configs."registry.ci.mirantis.com".auth]
29+ username = "${{ inputs.registry-username }}"
30+ password = "${{ inputs.registry-password }}"
31+ EOF
32+ sed -i '/apiVersion: kind.x-k8s.io\/v1alpha4/r patches.yaml' ${KIND_CONFIG_PATH}
33+ rm patches.yaml
Original file line number Diff line number Diff line change 7878 with :
7979 path : kcm-repo/bin
8080 key : kcm-cli-${{ runner.os }}-${{ steps.kcm_release.outputs.release }}-${{ github.run_id }}
81+ - name : Patch Kind Config
82+ if : github.repository_owner == 'k0rdent'
83+ uses : ./.github/actions/kind-config-patch
84+ with :
85+ registry-username : ${{ secrets.REGISTRY_CI_USERNAME }}
86+ registry-password : ${{ secrets.REGISTRY_CI_PASSWORD }}
87+
8188 - name : " [Latest release] Create KIND kcm cluster"
8289 run : |
8390 export KIND_CONFIG_PATH=$PWD/config/kind.yaml
Original file line number Diff line number Diff line change @@ -110,6 +110,12 @@ jobs:
110110 with :
111111 path : kcm-repo/bin
112112 key : kcm-cli-${{ runner.os }}-${{ github.sha }}-${{ github.run_id }}
113+ - name : Patch Kind Config
114+ if : github.repository_owner == 'k0rdent'
115+ uses : ./.github/actions/kind-config-patch
116+ with :
117+ registry-username : ${{ secrets.REGISTRY_CI_USERNAME }}
118+ registry-password : ${{ secrets.REGISTRY_CI_PASSWORD }}
113119 - name : Apply KCM Dev Configuration
114120 run : |
115121 export KIND_CONFIG_PATH=$PWD/config/kind.yaml
Original file line number Diff line number Diff line change 4444 - name : " [Main Branch] Install KCM CLI"
4545 run : |
4646 make -C kcm-repo cli-install
47+ - name : Patch Kind Config
48+ if : github.repository_owner == 'k0rdent'
49+ uses : ./.github/actions/kind-config-patch
50+ with :
51+ registry-username : ${{ secrets.REGISTRY_CI_USERNAME }}
52+ registry-password : ${{ secrets.REGISTRY_CI_PASSWORD }}
4753 - name : " [Main Branch] Create KIND kcm cluster"
4854 run : |
4955 make kcm-dev-apply KCM_REPO_PATH="kcm-repo" KIND_CONFIG_PATH="$PWD/config/kind.yaml"
Original file line number Diff line number Diff line change 7272 with :
7373 path : kcm-repo/bin
7474 key : kcm-cli-${{ runner.os }}-${{ steps.kcm_release.outputs.release }}-${{ github.run_id }}
75+ - name : Patch Kind Config
76+ if : github.repository_owner == 'k0rdent'
77+ uses : ./.github/actions/kind-config-patch
78+ with :
79+ registry-username : ${{ secrets.REGISTRY_CI_USERNAME }}
80+ registry-password : ${{ secrets.REGISTRY_CI_PASSWORD }}
7581 - name : " [Latest release] Create KIND kcm cluster"
7682 run : |
7783 export KIND_CONFIG_PATH=$PWD/config/kind.yaml
You can’t perform that action at this time.
0 commit comments