fixes
This commit is contained in:
parent
8d0ed4c3f8
commit
9659934063
3 changed files with 21 additions and 34 deletions
|
@ -31,12 +31,11 @@ pipeline:
|
||||||
- export KUBECONFIG=$${CI_WORKSPACE}/kube.config
|
- export KUBECONFIG=$${CI_WORKSPACE}/kube.config
|
||||||
- sleep 15s
|
- sleep 15s
|
||||||
- docker info
|
- docker info
|
||||||
- kind create cluster --help
|
|
||||||
- kind create cluster --config e2e/kind.cluster.yml --image kindest/node:${k8s} --wait 1m
|
- kind create cluster --config e2e/kind.cluster.yml --image kindest/node:${k8s} --wait 1m
|
||||||
- kind get clusters
|
- kind get clusters
|
||||||
- docker ps
|
- docker ps
|
||||||
#replace localhost or 0.0.0.0 in the kubeconfig file with "docker", in order to be able to reach the cluster through the docker service
|
#replace localhost or 0.0.0.0 in the kubeconfig file with "docker", in order to be able to reach the cluster through the docker service
|
||||||
- sed -i -E -e 's/localhost|0\.0\.0\.0/'docker'/g' $${KUBECONFIG}
|
- sed -i -E -e 's/localhost|0\.0\.0\.0/docker/g' $${KUBECONFIG}
|
||||||
|
|
||||||
chart-testing:
|
chart-testing:
|
||||||
image: alpine:3.17.2
|
image: alpine:3.17.2
|
||||||
|
@ -46,18 +45,3 @@ pipeline:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing kubectl
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing kubectl
|
||||||
- export KUBECONFIG=$${CI_WORKSPACE}/kube.config
|
- export KUBECONFIG=$${CI_WORKSPACE}/kube.config
|
||||||
- kubectl get no -o wide
|
- kubectl get no -o wide
|
||||||
|
|
||||||
# delete-cluster:
|
|
||||||
# image: alpine:3.17.2
|
|
||||||
# pull: true
|
|
||||||
# environment:
|
|
||||||
# DOCKER_HOST: tcp://docker:2375
|
|
||||||
# commands:
|
|
||||||
# - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community docker-cli kind
|
|
||||||
# - export KUBECONFIG=$${CI_WORKSPACE}/kube.config
|
|
||||||
# - kind delete cluster --name chart-testing
|
|
||||||
# - docker ps
|
|
||||||
# when:
|
|
||||||
# status:
|
|
||||||
# - success
|
|
||||||
# - failure
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# based on https://github.com/kind-ci/examples/blob/master/drone/.drone.yml
|
|
||||||
apiVersion: kind.x-k8s.io/v1alpha4
|
|
||||||
kind: Cluster
|
|
||||||
name: chart-testing
|
|
||||||
networking:
|
|
||||||
apiServerAddress: "0.0.0.0"
|
|
||||||
|
|
||||||
nodes:
|
|
||||||
# add to the apiServer certSANs the name of the drone service in order to be able to reach the cluster through it
|
|
||||||
- role: control-plane
|
|
||||||
kubeadmConfigPatches:
|
|
||||||
- |
|
|
||||||
kind: ClusterConfiguration
|
|
||||||
apiServer:
|
|
||||||
certSANs:
|
|
||||||
- "docker"
|
|
||||||
- role: worker
|
|
20
e2e/kind.cluster.yml
Normal file
20
e2e/kind.cluster.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# based on https://github.com/kind-ci/examples/blob/master/.gitlab-ci.yml
|
||||||
|
apiVersion: kind.x-k8s.io/v1alpha4
|
||||||
|
kind: Cluster
|
||||||
|
name: chart-testing
|
||||||
|
networking:
|
||||||
|
apiServerAddress: '0.0.0.0'
|
||||||
|
|
||||||
|
# add to the apiServer certSANs the name of the docker (dind) service in order to be able to reach the cluster through it
|
||||||
|
kubeadmConfigPatchesJSON6902:
|
||||||
|
- group: kubeadm.k8s.io
|
||||||
|
version: v1beta2
|
||||||
|
kind: ClusterConfiguration
|
||||||
|
patch: |
|
||||||
|
- op: add
|
||||||
|
path: /apiServer/certSANs/-
|
||||||
|
value: docker
|
||||||
|
|
||||||
|
nodes:
|
||||||
|
- role: control-plane
|
||||||
|
- role: worker
|
Loading…
Reference in a new issue