Skip to content

Commit d2698f7

Browse files
Add test config
1 parent 3cb5e6d commit d2698f7

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

.github/ci/ct.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ chart-dirs:
22
- charts
33
helm-extra-args: "--timeout=5m"
44
check-version-increment: false
5-
target-branch: master
5+
target-branch: main

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,23 @@ crd-ref-docs:
477477
--source-path=${PWD}/api/v1alpha1/ \
478478
--config=crd-ref-docs.yaml \
479479
--renderer=markdown \
480-
--output-path=${PWD}/docs/book/src/reference/api-spec.md
480+
--output-path=${PWD}/docs/book/src/reference/api-spec.md
481+
482+
# helm
483+
484+
ensure-helm-install:
485+
ifndef HAS_HELM
486+
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && chmod 700 ./get_helm.sh && ./get_helm.sh
487+
endif
488+
489+
lint-chart: ensure-helm-install
490+
helm lint ./charts/nrr-controller
491+
492+
build-helm:
493+
helm package ./charts/nrr-controller --dependency-update --destination ./bin/chart
494+
495+
kind-multi-node:
496+
kind create cluster --name kind --config ./hack/kind_config.yaml --wait 2m
497+
498+
ct-helm:
499+
./hack/verify-chart.sh

hack/kind_config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
- role: worker
6+
kubeadmConfigPatches:
7+
- |
8+
kind: JoinConfiguration
9+
nodeRegistration:
10+
kubeletExtraArgs:
11+
node-labels: "topology.kubernetes.io/zone=local-a"
12+
- role: worker
13+
kubeadmConfigPatches:
14+
- |
15+
kind: JoinConfiguration
16+
nodeRegistration:
17+
kubeletExtraArgs:
18+
node-labels: "topology.kubernetes.io/zone=local-b"

hack/verify-chart.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
${CONTAINER_ENGINE:-docker} run -it --rm --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.0 /bin/bash -c "git config --global --add safe.directory /data; ct install --config=.github/ci/ct.yaml --helm-extra-set-args=\"--set=kind=Deployment\""

0 commit comments

Comments
 (0)