Skip to content

Commit e8feec4

Browse files
authored
Merge branch 'main' into security-context
2 parents 2e7e698 + 1228fd4 commit e8feec4

File tree

3 files changed

+64
-30
lines changed

3 files changed

+64
-30
lines changed

.github/workflows/build-test-publish.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,27 @@ jobs:
364364
make cert-manager
365365
SUPPORT_VOLUME_EXPANSION=false make system-tests
366366
367+
examples_matrix:
368+
runs-on: ubuntu-latest
369+
outputs:
370+
examples_matrix: ${{ steps.list_examples.outputs.examples_matrix }}
371+
steps:
372+
- name: Check out code
373+
uses: actions/checkout@v5
374+
375+
- name: List Examples
376+
id: list_examples
377+
run: |
378+
echo -n 'examples_matrix=' >> $GITHUB_OUTPUT
379+
find "$PWD/docs/examples" -mindepth 1 -type d | jq -R -s -c 'split("\n") | map(select(length > 0))' >> $GITHUB_OUTPUT
380+
367381
test_doc_examples:
368382
name: Documented example tests
369383
runs-on: ubuntu-latest
370-
if: ${{ github.event_name != 'pull_request' }}
371-
needs: build_operator
384+
needs: [build_operator, examples_matrix]
385+
strategy:
386+
matrix:
387+
example: ${{ fromJSON(needs.examples_matrix.outputs.examples_matrix) }}
372388
steps:
373389
- name: Check out code into the Go module directory
374390
uses: actions/checkout@v5
@@ -407,21 +423,39 @@ jobs:
407423

408424
- name: Install Operator build
409425
run: |
410-
make destroy
411426
kind load image-archive /tmp/operator.tar --name examples-testing
412427
ytt -f tmp/cluster-operator.yml -f config/ytt/never_pull.yaml | kubectl apply -f-
413428
kubectl --namespace=rabbitmq-system wait --for=condition=Available deployment/rabbitmq-cluster-operator
414429
415-
- name: Documented example tests
416-
run: docs/examples/test.sh
430+
- name: Documented example ${{ matrix.example }} test
431+
env:
432+
example: ${{ matrix.example }}
433+
run: |
434+
# Exit early if this example is to be skipped in CI
435+
[[ -e "$example"/.ci-skip ]] && exit 0
436+
437+
make cert-manager
438+
printf "apiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n name: selfsigned-issuer\nspec:\n selfSigned: {}\n" | kubectl apply -f -
439+
440+
pushd "$example"
441+
kubectl create namespace examples
442+
kubectl config set-context --current --namespace=examples
443+
[[ -e setup.sh ]] && ./setup.sh
444+
kubectl apply -f rabbitmq.yaml --timeout=30s
445+
kubectl wait -f rabbitmq.yaml --for=condition=AllReplicasReady --timeout=5m
446+
kubectl wait -f rabbitmq.yaml --for=condition=ReconcileSuccess --timeout=5m
447+
./test.sh
448+
kubectl delete -f rabbitmq.yaml --timeout=3m
449+
kubectl delete namespace examples --timeout=10m
450+
popd
417451
418452
- name: Notify Google Chat
419453
if: failure()
420454
uses: SimonScholz/google-chat-action@main
421455
with:
422456
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}'
423457
jobStatus: ${{ job.status }}
424-
title: Cluster Operator - Documented example tests
458+
title: Cluster Operator - Documented example ${{ matrix.example }} test
425459

426460
test_upgrade:
427461
name: Test upgrade of the operator

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ require (
1313
github.com/rabbitmq/amqp091-go v1.10.0
1414
github.com/rabbitmq/rabbitmq-stream-go-client v1.6.0
1515
golang.org/x/mod v0.28.0
16-
golang.org/x/net v0.44.0
16+
golang.org/x/net v0.45.0
1717
golang.org/x/text v0.29.0
1818
gopkg.in/ini.v1 v1.67.0
19-
k8s.io/api v0.34.0
19+
k8s.io/api v0.34.1
2020
k8s.io/apimachinery v0.34.1
21-
k8s.io/client-go v0.34.0
21+
k8s.io/client-go v0.34.1
2222
k8s.io/klog/v2 v2.130.1
2323
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
24-
sigs.k8s.io/controller-runtime v0.22.1
24+
sigs.k8s.io/controller-runtime v0.22.2
2525
)
2626

2727
require (
@@ -172,11 +172,11 @@ require (
172172
gopkg.in/yaml.v2 v2.4.0 // indirect
173173
gopkg.in/yaml.v3 v3.0.1 // indirect
174174
helm.sh/helm/v3 v3.18.5 // indirect
175-
k8s.io/apiextensions-apiserver v0.34.0 // indirect
176-
k8s.io/apiserver v0.34.0 // indirect
175+
k8s.io/apiextensions-apiserver v0.34.1 // indirect
176+
k8s.io/apiserver v0.34.1 // indirect
177177
k8s.io/cli-runtime v0.33.3 // indirect
178-
k8s.io/code-generator v0.34.0 // indirect
179-
k8s.io/component-base v0.34.0 // indirect
178+
k8s.io/code-generator v0.34.1 // indirect
179+
k8s.io/component-base v0.34.1 // indirect
180180
k8s.io/component-helpers v0.33.3 // indirect
181181
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect
182182
k8s.io/kube-openapi v0.0.0-20250905212525-66792eed8611 // indirect

go.sum

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,8 @@ golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
652652
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
653653
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
654654
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
655-
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
656-
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
655+
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
656+
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
657657
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
658658
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
659659
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
@@ -825,22 +825,22 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
825825
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
826826
helm.sh/helm/v3 v3.18.5 h1:Cc3Z5vd6kDrZq9wO9KxKLNEickiTho6/H/dBNRVSos4=
827827
helm.sh/helm/v3 v3.18.5/go.mod h1:L/dXDR2r539oPlFP1PJqKAC1CUgqHJDLkxKpDGrWnyg=
828-
k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=
829-
k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=
830-
k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc=
831-
k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0=
828+
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
829+
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
830+
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
831+
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
832832
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
833833
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
834-
k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg=
835-
k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ=
834+
k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA=
835+
k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0=
836836
k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA=
837837
k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo=
838-
k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=
839-
k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=
840-
k8s.io/code-generator v0.34.0 h1:Ze2i1QsvUprIlX3oHiGv09BFQRLCz+StA8qKwwFzees=
841-
k8s.io/code-generator v0.34.0/go.mod h1:Py2+4w2HXItL8CGhks8uI/wS3Y93wPKO/9mBQUYNua0=
842-
k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8=
843-
k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg=
838+
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
839+
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
840+
k8s.io/code-generator v0.34.1 h1:WpphT26E+j7tEgIUfFr5WfbJrktCGzB3JoJH9149xYc=
841+
k8s.io/code-generator v0.34.1/go.mod h1:DeWjekbDnJWRwpw3s0Jat87c+e0TgkxoR4ar608yqvg=
842+
k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A=
843+
k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0=
844844
k8s.io/component-helpers v0.33.3 h1:fjWVORSQfI0WKzPeIFSju/gMD9sybwXBJ7oPbqQu6eM=
845845
k8s.io/component-helpers v0.33.3/go.mod h1:7iwv+Y9Guw6X4RrnNQOyQlXcvJrVjPveHVqUA5dm31c=
846846
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q=
@@ -857,8 +857,8 @@ oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc=
857857
oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o=
858858
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
859859
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
860-
sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg=
861-
sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
860+
sigs.k8s.io/controller-runtime v0.22.2 h1:cK2l8BGWsSWkXz09tcS4rJh95iOLney5eawcK5A33r4=
861+
sigs.k8s.io/controller-runtime v0.22.2/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
862862
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250908235929-4ecd14c3d032 h1:AnfYT9o2oQqufBdeMtVsDiU7lpuy/iskLXrFbFdP6rw=
863863
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250908235929-4ecd14c3d032/go.mod h1:JYAE+Jv9ktfe0g1XQBmvzBHUeD9Aip0lbDJ2xOClJOI=
864864
sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk=

0 commit comments

Comments
 (0)