Skip to content

[operator] Bump operator to 0.94.0 #597

[operator] Bump operator to 0.94.0

[operator] Bump operator to 0.94.0 #597

Workflow file for this run

name: Test Operator Charts
on:
pull_request:
paths:
- 'charts/opentelemetry-operator/**'
branches:
- main
jobs:
operator-e2e-matrix:
strategy:
matrix:
e2e-group:
- e2e
- e2e-instrumentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
with:
create-kind-cluster: "true"
- name: Check CRDs
run: make check-operator-crds
- name: Install Openshift route crd
run: kubectl apply -f https://raw.githubusercontent.com/openshift/router/master/deploy/route_crd.yaml
- name: Install Prometheus CRDs
run: |
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
- name: Install cert-manager
run: |
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml
kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager
kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager
- name: Run chart-testing (install)
run: ct install --charts charts/opentelemetry-operator
- name: Get opentelemetry-operator repository
run: |
appVersion=$(cat ./charts/opentelemetry-operator/Chart.yaml | sed -nr 's/appVersion: ([0-9]+\.[0-9]+\.[0-9]+)/\1/p')
git clone -b v"$appVersion" --single-branch https://github.com/open-telemetry/opentelemetry-operator.git ./opentelemetry-operator
# - name: Use public target-allocator image in tests
# run: |
# appVersion=$(cat ./charts/opentelemetry-operator/Chart.yaml | sed -nr 's/appVersion: ([0-9]+\.[0-9]+\.[0-9]+)/\1/p')
# LOCAL_TARGET_ALLOCATOR_IMG="local\/opentelemetry-operator-targetallocator:e2e"
# PUBLIC_TARGET_ALLOCATOR_IMG="ghcr.io\/open-telemetry\/opentelemetry-operator\/target-allocator:$appVersion"
# sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/smoke-targetallocator/*.yaml
# sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e-targetallocator/targetallocator-features/00-install.yaml
# sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e-targetallocator/targetallocator-kubernetessd/00-install.yaml
# sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e-targetallocator/targetallocator-prometheuscr/00-install.yaml
# sed -i "s/$LOCAL_TARGET_ALLOCATOR_IMG/${PUBLIC_TARGET_ALLOCATOR_IMG}/g" ./opentelemetry-operator/tests/e2e/prometheus-config-validation/*.yaml
- name: Install kuttl
run: |
sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.12.1/kubectl-kuttl_0.12.1_linux_x86_64
sudo chmod +x /usr/local/bin/kubectl-kuttl
export PATH=$PATH:/usr/local/bin
- name: Install metrics-server
run: |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl patch deployment -n kube-system metrics-server --type "json" -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": --kubelet-insecure-tls}]'
kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=5m
- name: Install opentelemetry-operator chart
run: |
helm install --namespace=opentelemetry-operator-system --create-namespace my-opentelemetry-operator ./charts/opentelemetry-operator --set "manager.featureGates=operator.autoinstrumentation.go"
kubectl wait --timeout=5m --for=condition=available deployment my-opentelemetry-operator -n opentelemetry-operator-system
- name: Run e2e tests
working-directory: ./opentelemetry-operator
run: kubectl kuttl test tests/${{ matrix.e2e-group }} --config ../charts/opentelemetry-operator/kuttl-test.yaml --crd-dir ../charts/opentelemetry-operator/crds
operator-test:
runs-on: ubuntu-latest
needs: [operator-e2e-matrix]
steps:
- name: Print result
run: echo ${{ needs.operator-e2e-matrix.result }}
- name: Interpret result
run: |
if [[ success == ${{ needs.operator-e2e-matrix.result }} ]]
then
echo "All matrix jobs passed!"
else
echo "One or more matrix jobs failed."
false
fi