diff --git a/.github/resources-olm-upgrade/subscription.yaml b/.github/resources-olm-upgrade/subscription.yaml index 1caf8794a..07fbb23bb 100644 --- a/.github/resources-olm-upgrade/subscription.yaml +++ b/.github/resources-olm-upgrade/subscription.yaml @@ -9,3 +9,11 @@ spec: name: codeflare-operator source: codeflare-olm-test sourceNamespace: olm + config: + resources: + limits: + cpu: 400m + memory: 128Mi + requests: + cpu: 50m + memory: 64Mi diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 42ee0b736..92cf81ef4 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -73,7 +73,7 @@ jobs: echo Deploying CodeFlare operator IMG="${REGISTRY_ADDRESS}"/codeflare-operator make image-push -e IMG="${IMG}" - make deploy -e IMG="${IMG}" + make deploy -e IMG="${IMG}" -e ENV="e2e" kubectl wait --timeout=120s --for=condition=Available=true deployment -n openshift-operators codeflare-operator-manager echo Setting up CodeFlare stack diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml index 6ecede4e0..9ae046f89 100644 --- a/.github/workflows/olm_tests.yaml +++ b/.github/workflows/olm_tests.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 60 env: - OLM_VERSION: v0.24.0 + OLM_VERSION: v0.25.0 VERSION: "v0.0.0-ghaction" # Need to supply some semver version for bundle to be properly generated CATALOG_BASE_IMG: "registry.access.redhat.com/redhat/community-operator-index:v4.13" CODEFLARE_TEST_TIMEOUT_SHORT: "1m" diff --git a/Makefile b/Makefile index facbf2cd7..0ae9dc24d 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,10 @@ IMG ?= ${IMAGE_TAG_BASE}:${VERSION} # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.24.2 +# The target deployment environment, that corresponds to the Kustomize directory +# used to build the manifests. +ENV ?= default + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -202,13 +206,13 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. $(SED) -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} - $(KUSTOMIZE) build config/default | kubectl apply -f - + $(KUSTOMIZE) build config/${ENV} | kubectl apply -f - git restore config/* .PHONY: undeploy 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. $(SED) -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml - $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - + $(KUSTOMIZE) build config/${ENV} | kubectl delete --ignore-not-found=$(ignore-not-found) -f - git restore config/* ##@ Build Dependencies diff --git a/config/e2e/kustomization.yaml b/config/e2e/kustomization.yaml new file mode 100644 index 000000000..faf613e70 --- /dev/null +++ b/config/e2e/kustomization.yaml @@ -0,0 +1,9 @@ +bases: +- ../default + +patches: + - target: + kind: Deployment + name: manager + namespace: system + path: patch_resources.yaml diff --git a/config/e2e/patch_resources.yaml b/config/e2e/patch_resources.yaml new file mode 100644 index 000000000..3da1d5f3a --- /dev/null +++ b/config/e2e/patch_resources.yaml @@ -0,0 +1,2 @@ +- op: remove + path: /spec/template/spec/containers/0/resources diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index ca1823c3d..ae13f8af5 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -65,10 +65,10 @@ spec: periodSeconds: 10 resources: limits: - cpu: 500m - memory: 128Mi + cpu: "1" + memory: 1Gi requests: - cpu: 10m - memory: 64Mi + cpu: "1" + memory: 1Gi serviceAccountName: controller-manager terminationGracePeriodSeconds: 10