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

The kustomize workflow did not use actual code for testing. #993

Open
1 task
tao12345666333 opened this issue Jan 10, 2025 · 0 comments
Open
1 task

The kustomize workflow did not use actual code for testing. #993

tao12345666333 opened this issue Jan 10, 2025 · 0 comments

Comments

@tao12345666333
Copy link
Member

tao12345666333 commented Jan 10, 2025

Problem Statement

There is a step in our CI workflow to verify that "Verify deploying operator via kustomize works"

- name: Verify deploying operator via kustomize works
run: make deploy

It ran make deploy

gateway-operator/Makefile

Lines 641 to 651 in 59a41a6

# Deploy controller to the K8s cluster specified in ~/.kube/config.
# This will wait for operator's Deployment to get Available.
# This uses a temporary directory becuase "kustomize edit set image" would introduce
# a change in current work tree which we do not want.
.PHONY: deploy
deploy: manifests kustomize
$(eval TMP := $(shell mktemp -d))
cp -R config $(TMP)
cd $(TMP)/config/components/manager-image/ && $(KUSTOMIZE) edit set image $(KUSTOMIZE_IMG_NAME)=$(IMG):$(VERSION)
cd $(TMP)/config/default && $(KUSTOMIZE) build . | kubectl apply -f -
kubectl wait --timeout=1m deploy -n kong-system gateway-operator-controller-manager --for=condition=Available=true

In most cases, it is correct and can be used to verify that our YAML works properly.

It uses an already published image. This process will fail if we add new command line parameters or new features for KGO.
e.g. #956

https://github.com/Kong/gateway-operator/actions/runs/12686938913/job/35360290587?pr=956

Proposed Solution

Build the image using the current code and load it into the kind cluster. Then use that image to verify if it works properly.

Additional Information

Acceptance Criteria

  • Verify whether the process works based on actual code, rather than using a published image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant