Skip to content

Commit 5553074

Browse files
authored
Merge branch 'openstack-k8s-operators:main' into main
2 parents c4d37bd + 721c3f7 commit 5553074

662 files changed

Lines changed: 113681 additions & 68997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.21-sdk-1.31
4+
tag: ci-build-root-golang-1.24-sdk-1.41.1

.github/workflows/build-openstack-operator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: openstack operator image builder
2-
32
on:
43
push:
54
branches:
65
- '*'
6+
workflow_dispatch: # This allows manual triggering from the Actions tab if needed
77

88
env:
99
imageregistry: 'quay.io'
1010
imagenamespace: ${{ secrets.IMAGENAMESPACE || secrets.QUAY_USERNAME }}
1111
latesttag: latest
12-
1312
jobs:
1413
call-build-workflow:
1514
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1615
with:
1716
operator_name: openstack
18-
go_version: 1.21.x
19-
operator_sdk_version: 1.31.0
17+
go_version: 1.24.x
18+
operator_sdk_version: 1.41.1
2019
bundle_dockerfile: ./bundle.Dockerfile
20+
operator_version: 0.6.0
2121
secrets:
2222
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
2323
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build catalog for OLM upgrade testing
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- '*'
6+
workflow_run:
7+
workflows: ["openstack operator image builder"]
8+
types:
9+
- completed
10+
branches:
11+
- '*'
12+
secrets:
13+
IMAGENAMESPACE:
14+
required: true
15+
QUAY_USERNAME:
16+
required: true
17+
QUAY_PASSWORD:
18+
required: true
19+
REDHATIO_USERNAME:
20+
required: true
21+
REDHATIO_PASSWORD:
22+
required: true
23+
env:
24+
imageregistry: 'quay.io'
25+
imagenamespace: ${{ secrets.IMAGENAMESPACE || secrets.QUAY_USERNAME }}
26+
latesttag: latest
27+
jobs:
28+
build-catalog:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Install Go
32+
uses: actions/setup-go@v4
33+
with:
34+
go-version: ${{ inputs.go_version }}
35+
cache: false
36+
- name: Checkout openstack-operator repository
37+
uses: actions/checkout@v4
38+
with:
39+
path: ./openstack-operator
40+
- name: Get branch name
41+
id: branch-name
42+
uses: tj-actions/branch-names@v9
43+
- name: Set latest tag for non main branch
44+
if: "${{ steps.branch-name.outputs.current_branch != 'main' }}"
45+
run: |
46+
echo "latesttag=${{ steps.branch-name.outputs.current_branch }}-latest" >> $GITHUB_ENV
47+
- name: Install opm
48+
uses: redhat-actions/openshift-tools-installer@v1
49+
with:
50+
source: github
51+
opm: 'latest'
52+
- name: Log in to Quay Registry
53+
uses: redhat-actions/podman-login@v1
54+
with:
55+
registry: ${{ env.imageregistry }}
56+
username: ${{ secrets.QUAY_USERNAME }}
57+
password: ${{ secrets.QUAY_PASSWORD }}
58+
- name: Log in to Red Hat Registry
59+
uses: redhat-actions/podman-login@v1
60+
with:
61+
registry: registry.redhat.io
62+
username: ${{ secrets.REDHATIO_USERNAME }}
63+
password: ${{ secrets.REDHATIO_PASSWORD }}
64+
- name: Create the catalog index
65+
shell: bash
66+
run: ./openstack-operator/hack/catalog-build-olm-upgrade.sh
67+
env:
68+
#FIXME: these should be pulled from a YAML config in the main operator directory?
69+
MAIN_VERSION: 0.6.0
70+
FEATURE_RELEASE_VERSION: 0.5.0
71+
FEATURE_RELEASE_BRANCH: 18.0-fr5
72+
BUNDLE: ${{ env.imageregistry }}/${{ env.imagenamespace }}/openstack-operator-bundle:${{ github.sha }}
73+
- name: Buildah Action
74+
id: build-operator-index-upgrade
75+
uses: redhat-actions/buildah-build@v2
76+
with:
77+
image: openstack-operator-index-upgrade
78+
tags: ${{ env.latesttag }} ${{ github.sha }}
79+
containerfiles: |
80+
./catalog.Dockerfile
81+
- name: Push openstack-operator-index-upgrade To ${{ env.imageregistry }}
82+
uses: redhat-actions/push-to-registry@v2
83+
with:
84+
image: ${{ steps.build-operator-index-upgrade.outputs.image }}
85+
tags: ${{ steps.build-operator-index-upgrade.outputs.tags }}
86+
registry: ${{ env.imageregistry }}/${{ env.imagenamespace }}
87+
username: ${{ secrets.QUAY_USERNAME }}
88+
password: ${{ secrets.QUAY_PASSWORD }}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CRD Size Badge
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+-fr[0-9]+'
8+
pull_request_target:
9+
branches:
10+
- main
11+
- '[0-9]+.[0-9]+-fr[0-9]+'
12+
13+
permissions:
14+
pull-requests: write
15+
16+
jobs:
17+
crd-size:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
24+
25+
- name: Install yq
26+
uses: mikefarah/yq@v4
27+
28+
- name: Compute CRD JSON size
29+
id: size
30+
run: |
31+
CRD_FILE="config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml"
32+
SIZE=$(yq eval -o=json "$CRD_FILE" | jq -c . | wc -c)
33+
echo "bytes=$SIZE" >> "$GITHUB_OUTPUT"
34+
35+
if [ "$SIZE" -lt 307200 ]; then
36+
echo "color=green" >> "$GITHUB_OUTPUT"
37+
echo "status=comfortable" >> "$GITHUB_OUTPUT"
38+
elif [ "$SIZE" -lt 409600 ]; then
39+
echo "color=yellow" >> "$GITHUB_OUTPUT"
40+
echo "status=growing" >> "$GITHUB_OUTPUT"
41+
elif [ "$SIZE" -lt 768000 ]; then
42+
echo "color=orange" >> "$GITHUB_OUTPUT"
43+
echo "status=concerning" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "color=red" >> "$GITHUB_OUTPUT"
46+
echo "status=approaching etcd limit" >> "$GITHUB_OUTPUT"
47+
fi
48+
49+
# Human-readable size
50+
if [ "$SIZE" -ge 1048576 ]; then
51+
HUMAN="$(awk "BEGIN {printf \"%.1f\", $SIZE/1048576}")MB"
52+
else
53+
HUMAN="$(awk "BEGIN {printf \"%.0f\", $SIZE/1024}")KB"
54+
fi
55+
echo "human=$HUMAN" >> "$GITHUB_OUTPUT"
56+
57+
- name: Compute base branch size
58+
if: github.event_name == 'pull_request_target'
59+
id: base_size
60+
run: |
61+
CRD_FILE="config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml"
62+
git fetch origin "${{ github.base_ref }}" --depth=1
63+
BASE_SIZE=$(git show "origin/${{ github.base_ref }}:${CRD_FILE}" | yq eval -o=json - | jq -c . | wc -c)
64+
echo "bytes=$BASE_SIZE" >> "$GITHUB_OUTPUT"
65+
66+
CHANGE=$(awk "BEGIN {if ($BASE_SIZE == 0) printf \"N/A\"; else printf \"%+.2f\", ((${{ steps.size.outputs.bytes }} - $BASE_SIZE) / $BASE_SIZE) * 100}")
67+
echo "change=$CHANGE" >> "$GITHUB_OUTPUT"
68+
69+
- name: Find existing comment
70+
if: github.event_name == 'pull_request_target'
71+
uses: peter-evans/find-comment@v3
72+
id: find_comment
73+
with:
74+
issue-number: ${{ github.event.pull_request.number }}
75+
comment-author: 'github-actions[bot]'
76+
body-includes: '<!-- crd-size-badge -->'
77+
78+
- name: Post or update PR comment
79+
if: github.event_name == 'pull_request_target'
80+
uses: peter-evans/create-or-update-comment@v4
81+
with:
82+
comment-id: ${{ steps.find_comment.outputs.comment-id }}
83+
issue-number: ${{ github.event.pull_request.number }}
84+
edit-mode: replace
85+
body: |
86+
<!-- crd-size-badge -->
87+
## OpenStackControlPlane CRD Size Report
88+
89+
| Metric | Value |
90+
|--------|-------|
91+
| **CRD JSON size** | ${{ steps.size.outputs.bytes }} bytes (${{ steps.size.outputs.human }}) |
92+
| **Base branch size** | ${{ steps.base_size.outputs.bytes }} bytes |
93+
| **Change** | ${{ steps.base_size.outputs.change }}% |
94+
| **Status** | ${{ steps.size.outputs.color }} — ${{ steps.size.outputs.status }} |
95+
96+
<details>
97+
<summary>Threshold reference</summary>
98+
99+
| Color | Range | Meaning |
100+
|-------|-------|---------|
101+
| :green_circle: green | < 300KB | Comfortable |
102+
| :yellow_circle: yellow | 300–400KB | Growing |
103+
| :orange_circle: orange | 400–750KB | Concerning |
104+
| :red_circle: red | > 750KB | Approaching 1.5MB etcd limit (cut in half to allow space for update) |
105+
106+
</details>
107+
108+
- name: Update badge gist
109+
if: github.event_name == 'push'
110+
uses: schneegans/dynamic-badges-action@v1.7.0
111+
with:
112+
auth: ${{ secrets.GIST_SECRET }}
113+
gistID: ${{ vars.GIST_ID }}
114+
filename: crd-size-${{ github.ref_name }}.json
115+
label: CRD Size
116+
message: ${{ steps.size.outputs.human }}
117+
color: ${{ steps.size.outputs.color }}

.github/workflows/crd-sync-check-olive.yaml renamed to .github/workflows/crd-sync-check-fr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CRD sync check olive branch
1+
name: CRD sync check latest fr branch
22

33
on:
44
schedule:
@@ -10,4 +10,4 @@ jobs:
1010
if: github.repository_owner == 'openstack-k8s-operators'
1111
uses: ./.github/workflows/crd-sync-check.yaml
1212
with:
13-
branch_name: olive
13+
branch_name: 18.0-fr5

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Go
2222
uses: actions/setup-go@v3
2323
with:
24-
go-version: 1.21.x
24+
go-version: 1.24.x
2525
- uses: actions/checkout@v4
2626
with:
2727
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.github/workflows/force-bump-pr-manual.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ jobs:
99
with:
1010
operator_name: openstack
1111
branch_name: ${{ github.ref_name }}
12+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.41.1
1213
secrets:
1314
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/force-bump-pr-scheduled.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ jobs:
1010
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main
1111
with:
1212
operator_name: openstack
13+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.41.1
1314
secrets:
1415
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/kustom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.21.x
19+
go-version: 1.24.x
2020
- uses: actions/checkout@v4
2121
with:
2222
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.github/workflows/release-branch-sync.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)