Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test upgrade with no change in values #1618

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/common_steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Common Steps
on: workflow_call

jobs:
setup-kind:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: ~1.22.5
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v4
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:v1.30.0
kubectl_version: v1.30.0
cluster_name: kind
config: ./.github/workflows/configs/kind-config.yaml
- name: Fix kubelet TLS server certificates
run: |
kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve
- name: Update dependencies
run: |
make dep-update
- name: Deploy cert-manager
run: |
make cert-manager

check:
runs-on: ubuntu-latest
steps:
- name: Check operator becomes ready
run: |
kubectl get po -lapp.kubernetes.io/name=operator -o=name | xargs -n 1 kubectl wait --for=condition=Ready --timeout=2m
kubectl get po -lapp.kubernetes.io/name=operator | grep "operator"
- name: check instrumentation
run: |
kubectl get instrumentations.opentelemetry.io | grep "splunk-otel-collector"
46 changes: 46 additions & 0 deletions .github/workflows/functional_test_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -488,3 +488,49 @@ jobs:
run: |
cd functional_tests
TEARDOWN_BEFORE_SETUP=true go test -v -tags functional

helm-test-new-install-w-subchart:
name: Test helm install in kind with subchart
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: common setup for kind and cert-manager
uses: ./.github/workflows/common_steps.yaml@setup-kind
- name: helm install with operator and CRD subchart enabled
run: |
helm install sock helm-charts/splunk-otel-collector --debug \
--set splunkObservability.realm=us0 --set splunkObservability.accessToken=xxxxx \
--set environment=dev --set clusterName=dev \
--set operator.enabled=true --set operatorcrds.install=true
- name: check CRDs are installed
run: |
kubectl get crds | grep 'opentelemetry.io'
- name: check operator and instrumentation
uses: ./.github/workflows/common_steps.yaml@check-operator

helm-test-new-install-wo-subchart:
name: Test helm install in kind without helm managed CRDs. CRDs are installed using kubectl.
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: common setup for kind and cert-manager
uses: ./.github/workflows/common_steps.yaml@setup-kind
- name: install CRDs from Helm template with kubectl
run: |
helm template helm-charts/splunk-otel-collector/ --include-crds \
--set=splunkObservability.realm=us0,splunkObservability.accessToken=xxxxxx,clusterName=my-cluster \
--set=operatorcrds.install=true \
| yq e '. | select(.kind == "CustomResourceDefinition")' | kubectl apply -f -
- name: check CRDs are installed
run: |
kubectl get crds | grep 'opentelemetry.io'
- name: helm install with operator enabled and no crd subchart
run: |
helm install sock helm-charts/splunk-otel-collector --debug \
--set splunkObservability.realm=us0 --set splunkObservability.accessToken=xxxxx \
--set environment=dev --set clusterName=dev \
--set operator.enabled=true
- name: check operator and instrumentation
uses: ./.github/workflows/common_steps.yaml@check-operator
Loading