Skip to content

Commit

Permalink
Check operator CRDs as part of ci preflight checks (#9377)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydavenport authored Oct 23, 2024
1 parent 24f4f27 commit c6bca4b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .semaphore/release/hashrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,5 @@ blocks:
- cd release
- make build
env_vars:
- name: OPERATOR_BRANCH
value: master
- name: IS_HASHRELEASE
value: "true"
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ check-language:

generate:
$(MAKE) gen-semaphore-yaml
$(MAKE) get-operator-crds
$(MAKE) -C api gen-files
$(MAKE) -C libcalico-go gen-files
$(MAKE) -C felix gen-files
Expand All @@ -61,12 +62,15 @@ gen-manifests: bin/helm
CALICO_VERSION=$(CALICO_VERSION) \
./generate.sh

# Get operator CRDs from the operator repo, OPERATOR_BRANCH_NAME must be set
get-operator-crds: var-require-all-OPERATOR_BRANCH_NAME
# Get operator CRDs from the operator repo, OPERATOR_BRANCH must be set
get-operator-crds: var-require-all-OPERATOR_BRANCH
@echo ================================================================
@echo === Pulling new operator CRDs from branch $(OPERATOR_BRANCH) ===
@echo ================================================================
cd ./charts/tigera-operator/crds/ && \
for file in operator.tigera.io_*.yaml; do echo "downloading $$file from operator repo" && curl -fsSL https://raw.githubusercontent.com/tigera/operator/${OPERATOR_BRANCH_NAME}/pkg/crds/operator/$${file%_crd.yaml}.yaml -o $${file}; done
for file in operator.tigera.io_*.yaml; do echo "downloading $$file from operator repo" && curl -fsSL https://raw.githubusercontent.com/tigera/operator/$(OPERATOR_BRANCH)/pkg/crds/operator/$${file%_crd.yaml}.yaml -o $${file}; done
cd ./manifests/ocp/ && \
for file in operator.tigera.io_*.yaml; do echo "downloading $$file from operator repo" && curl -fsSL https://raw.githubusercontent.com/tigera/operator/${OPERATOR_BRANCH_NAME}/pkg/crds/operator/$${file%_crd.yaml}.yaml -o $${file}; done
for file in operator.tigera.io_*.yaml; do echo "downloading $$file from operator repo" && curl -fsSL https://raw.githubusercontent.com/tigera/operator/$(OPERATOR_BRANCH)/pkg/crds/operator/$${file%_crd.yaml}.yaml -o $${file}; done

gen-semaphore-yaml:
cd .semaphore && ./generate-semaphore-yaml.sh
Expand Down
3 changes: 3 additions & 0 deletions metadata.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ WINDOWS_VERSIONS ?= 1809 ltsc2022
# whenever the cni-plugin image is created.
CNI_VERSION=master
FLANNEL_VERSION=main

# The operator branch corresponding to this branch.
OPERATOR_BRANCH=master
1 change: 1 addition & 0 deletions release/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ When starting development on a new minor release, the first step is to create a

- charts/calico/values.yaml
- charts/tigera-operator/values.yaml
- metadata.mk (OPERATOR_BRANCH)

Then, run manifest generation

Expand Down

0 comments on commit c6bca4b

Please sign in to comment.