Skip to content

Commit

Permalink
OPSEXP-3005 Add registry secret login for setup-kind action (#877)
Browse files Browse the repository at this point in the history
Co-authored-by: Giovanni Toraldo <71768+gionn@users.noreply.github.com>
  • Loading branch information
pmacius and gionn authored Jan 23, 2025
1 parent 15e09b8 commit fdbc4f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .github/actions/setup-kind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
metrics:
description: Whether Metrics Server should be installed upon cluster creation
default: "false"
import-docker-credentials-secret-name:
description: |
Whether to create a secret using the given name using file $HOME/.docker/config.json.
You have to login to one or more registries before using this option.
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -58,3 +62,11 @@ runs:
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
- name: Create registries auth secret
shell: bash
if: inputs.import-docker-credentials-secret-name != ''
run: |
kubectl create secret generic ${{ inputs.import-docker-credentials-secret-name }} \
--from-file=.dockerconfigjson=$HOME/.docker/config.json \
--type=kubernetes.io/dockerconfigjson
10 changes: 6 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1593,13 +1593,15 @@ Spin up a local kubernetes cluster with nginx ingress exposing http/https ports.
with:
# Specify kind and k8s version to use.
# see https://github.com/kubernetes-sigs/kind/releases
# kind-version: v0.20.0
# kind-node-image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
kind-version: v0.20.0
kind-node-image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
# Optional but ensure repeatable builds (defaults to latest nginx ingress version otherwise).
# see https://github.com/kubernetes/ingress-nginx
# ingress-nginx-ref: controller-v1.8.2
ingress-nginx-ref: controller-v1.8.2
# Enable deploying Metrics server with KinD
# metrics: true
metrics: true
# Enable creating docker registry secret using given name
import-docker-credentials-secret-name: regcred
- name: Helm deploy
run: |
helm dep up ./helm/chart
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.10.0
v8.11.0

0 comments on commit fdbc4f3

Please sign in to comment.