1- # SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors
1+ # SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors
22# SPDX-License-Identifier: Apache-2.0
33
4- name : Test
4+ name : Test Chart
5+
56on :
6- push :
7- branches :
8- - main
9- paths-ignore :
10- - ' **.md'
117 pull_request :
128 branches :
13- - ' * '
9+ - main
1410 paths-ignore :
15- - ' **.md'
16- workflow_dispatch : {}
17- permissions :
18- contents : read
11+ - ' docs/**'
12+ - ' **/*.md'
13+
1914jobs :
2015 test-chart :
21- name : Chart
16+ name : Run Chart Tests
2217 runs-on : ubuntu-latest
2318 steps :
24- - name : Check out code
25- uses : actions/checkout@v4
26- - name : Set up Go
27- uses : actions/setup-go@v5
19+ - uses : actions/checkout@v6
20+ - uses : actions/setup-go@v6
2821 with :
29- check-latest : true
30- go-version : 1.25.5
31- - name : Fetch latest kubectl version
32- id : kubectl
33- run : |
34- KUBECTL_VERSION=$(curl -sL https://dl.k8s.io/release/stable.txt)
35- echo "version=$KUBECTL_VERSION" >> $GITHUB_OUTPUT
36- - name : Fetch latest kind version
37- id : kind
22+ go-version-file : ' go.mod'
23+ - name : Set up Helm
24+ uses : azure/setup-helm@v4
25+ with :
26+ version : latest
27+ - name : Lint Helm Chart
3828 run : |
39- KIND_VERSION=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
40- echo "version=$KIND_VERSION" >> $GITHUB_OUTPUT
41- - name : Create k8s kind cluster
29+ helm lint ./charts/network-operator
30+ - name : Create kind cluster
4231 uses : helm/kind-action@v1
4332 with :
44- version : ${{ steps.kind.outputs.version }}
33+ version : v0.31.0
34+ kubectl_version : v1.35.0
4535 cluster_name : kind
46- kubectl_version : ${{ steps.kubectl.outputs.version }}
4736 - name : Prepare network-operator
4837 run : |
49- go mod tidy
38+ go mod download
5039 make docker-build IMG=network-operator:v0.1.0
5140 kind load docker-image network-operator:v0.1.0
52- - name : Install Helm
53- run : |
54- curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
55- - name : Verify Helm installation
56- run : helm version
57- - name : Lint Helm Chart
58- run : |
59- helm lint ./charts/network-operator
6041 - name : Install cert-manager via Helm
6142 run : |
6243 helm repo add jetstack https://charts.jetstack.io
@@ -67,28 +48,10 @@ jobs:
6748 kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager
6849 kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-cainjector
6950 kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-webhook
70- # TODO: Uncomment if Prometheus is enabled
71- # - name: Install Prometheus Operator CRDs
72- # run: |
73- # helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
74- # helm repo update
75- # helm install prometheus-crds prometheus-community/prometheus-operator-crds
76- # - name: Install Prometheus via Helm
77- # run: |
78- # helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
79- # helm repo update
80- # helm install prometheus prometheus-community/prometheus --namespace monitoring --create-namespace
81- # - name: Wait for Prometheus to be ready
82- # run: |
83- # kubectl wait --namespace monitoring --for=condition=available --timeout=300s deployment/prometheus-server
84- - name : Install Helm chart for project
51+ - name : Install Helm Chart
8552 run : |
8653 helm dependency build ./charts/network-operator
8754 helm install network-operator ./charts/network-operator --create-namespace --namespace network-operator-system
8855 - name : Check Helm release status
8956 run : |
9057 helm status network-operator --namespace network-operator-system
91- # TODO: Uncomment if prometheus.enabled is set to true to confirm that the ServiceMonitor gets created
92- # - name: Check Presence of ServiceMonitor
93- # run: |
94- # kubectl wait --namespace network-operator-system --for=jsonpath='{.kind}'=ServiceMonitor servicemonitor/network-operator-controller-manager-metrics-monitor
0 commit comments