Skip to content

Commit 042bb3c

Browse files
authored
Migrate Operator Helm chart KUTTL tests to Github workflow (open-telemetry#62)
1 parent f606178 commit 042bb3c

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/workflows/lint-test.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,14 @@ jobs:
5353

5454
- name: Run chart-testing (install)
5555
run: ct install --target-branch main
56+
57+
- name: Run KUTTL smoke tests
58+
run: |
59+
until kubectl get ns opentelemetry-operator-system 2>&1 | grep "namespaces \"opentelemetry-operator-system\" not found"; do sleep 1; done
60+
sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.11.0/kubectl-kuttl_0.11.0_linux_x86_64
61+
sudo chmod +x /usr/local/bin/kubectl-kuttl
62+
helm install my-opentelemetry-operator ./charts/opentelemetry-operator
63+
kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system
64+
git clone https://github.com/open-telemetry/opentelemetry-operator.git
65+
kubectl kuttl test ./opentelemetry-operator/tests/e2e --config ./charts/opentelemetry-operator/release/kuttl-test.yaml
66+
if: steps.list-changed.outputs.operator-changed == 'true'

charts/opentelemetry-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: opentelemetry-operator
3-
version: 0.1.0
3+
version: 0.1.1
44
description: OpenTelemetry Operator Helm chart for Kubernetes
55
type: application
66
home: https://opentelemetry.io/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestSuite
3+
crdDir: ./charts/opentelemetry-operator/crds

charts/opentelemetry-operator/release/release-checklist.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Prerequisites
2-
3-
- [ ] Make sure you have installed KUTTL which will be used to do the smoke tests later. See [KUTTL website](https://kuttl.dev/docs/)
4-
for installation information.
5-
- [ ] Make sure you have cloned the [OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator) in your workspace
6-
71
# Checklist
82

93
- [ ] Change directory to `opentelemetry-helm-charts/charts/opentelemetry-operator/release`. `cd ./charts/opentelemetry-operator/release` should be helpful.
@@ -16,11 +10,8 @@
1610
Create a new YAML file under `templates` directory if it doesn't exist.
1711
Use `{{ template "opentelemetry-operator.name" . }}` to represent the name of OTEL Operator which probably is `opentelemetry-operator` in the manifest.
1812
Use `{{ template "opentelemetry-operator.namespace" . }}` to represent the namespace which probably is `opentelemetry-operator-system` in the manifest.
19-
- [ ] Test the Operator Helm chart locally:
20-
- [ ] Change directory to the OpenTelemetry Operator
21-
- [ ] Run the KUTTL smoke tests: `kubectl kuttl test ./tests/e2e`
22-
- [ ] Make sure all KUTTL smoke tests pass
2313
- [ ] Update `README` if there is a breaking change in the Operator Helm chart
14+
- [ ] Bump chart version in `Chart.yaml`
2415

2516
# Additional Context
2617

0 commit comments

Comments
 (0)