Skip to content

Commit b1e27de

Browse files
astefanuttiopenshift-ci[bot]
authored andcommitted
Patch Deployment resources for e2e tests
1 parent 25b9606 commit b1e27de

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/e2e_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
echo Deploying CodeFlare operator
5555
IMG="${REGISTRY_ADDRESS}"/codeflare-operator
5656
make image-push -e IMG="${IMG}"
57-
make deploy -e IMG="${IMG}"
57+
make deploy -e IMG="${IMG}" -e ENV="e2e"
5858
kubectl wait --timeout=120s --for=condition=Available=true deployment -n openshift-operators codeflare-operator-manager
5959
6060
echo Setting up CodeFlare stack

Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ IMG ?= ${IMAGE_TAG_BASE}:${VERSION}
8787
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
8888
ENVTEST_K8S_VERSION = 1.24.2
8989

90+
# The target deployment environment, that corresponds to the Kustomize directory
91+
# used to build the manifests.
92+
ENV ?= default
93+
9094
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
9195
ifeq (,$(shell go env GOBIN))
9296
GOBIN=$(shell go env GOPATH)/bin
@@ -202,13 +206,13 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
202206
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
203207
$(SED) -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
204208
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
205-
$(KUSTOMIZE) build config/default | kubectl apply -f -
209+
$(KUSTOMIZE) build config/${ENV} | kubectl apply -f -
206210
git restore config/*
207211

208212
.PHONY: undeploy
209213
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
210214
$(SED) -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
211-
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
215+
$(KUSTOMIZE) build config/${ENV} | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
212216
git restore config/*
213217

214218
##@ Build Dependencies

config/e2e/kustomization.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
bases:
2+
- ../default
3+
4+
patches:
5+
- target:
6+
kind: Deployment
7+
name: manager
8+
namespace: system
9+
path: patch_resources.yaml

config/e2e/patch_resources.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- op: remove
2+
path: /spec/template/spec/containers/0/resources

0 commit comments

Comments
 (0)