feat: add e2e openshift support#1894
Conversation
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
There was a problem hiding this comment.
Pull request overview
This PR extends the existing KinD-based E2E pipeline to also run E2E tests against an OpenShift/MicroShift environment managed by MINC, adding the required Makefile targets, GitHub Actions job, and OpenShift-specific manifests/overlays.
Changes:
- Added Makefile targets to provision/destroy a MINC OpenShift cluster, install dependencies, load images, and run the existing E2E suite.
- Added a new GitHub Actions job to run the OpenShift/MINC E2E flow.
- Added OpenShift-specific kustomize overlay and RBAC manifests to make FluxCD/Capsule compatible with OpenShift constraints.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Adds MINC installation + OpenShift E2E targets and OpenShift-specific setup steps. |
| .github/workflows/e2e.yml | Introduces a new e2e-openshift job to run make e2e-openshift in CI. |
| hack/distro/overlays/openshift/kustomization.yaml | Adds an OpenShift overlay for FluxCD resources (including SCC manifest and patches). |
| hack/distro/openshift/extend-admin-role.yaml | Adds an aggregated ClusterRole to extend admin permissions for Capsule/OpenShift SCC usage. |
| hack/distro/openshift/capsule-namespace-deleter.yaml | Adds a ClusterRoleBinding for the projectcapsule.dev group to enable namespace deletion via Capsule role. |
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
|
|
||
| resources: | ||
| - ../../fluxcd | ||
| - https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/openshift/scc.yaml |
There was a problem hiding this comment.
This overlay pulls the OpenShift SCC manifest from Flux2’s main branch (.../flux2/main/...). The existing FluxCD kustomization in this repo pins manifests to a release tag (e.g. v2.4.0), which is important for reproducible installs. Consider pinning this URL to the same Flux2 release tag used elsewhere (or vendoring the SCC manifest) to avoid unexpected breakage when main changes.
| - https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/openshift/scc.yaml | |
| - https://raw.githubusercontent.com/fluxcd/flux2/v2.4.0/manifests/openshift/scc.yaml |
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
This pull request introduces support for running end-to-end (E2E) tests on OpenShift using the MINC tool, alongside the existing Kubernetes (KinD) setup. It adds new Makefile targets, workflow jobs, and OpenShift-specific configuration files to ensure compatibility and proper permissions. The main themes are E2E test pipeline extension, Makefile enhancements, and OpenShift RBAC/patches.
E2E Test Pipeline Extension:
e2e-openshift) to.github/workflows/e2e.ymlfor running E2E tests on OpenShift using MINC.e2e-openshift,e2e-build-openshift,e2e-install-openshift,e2e-load-image-openshift, and related dependencies) to automate the OpenShift E2E workflow. [1] [2] [3]Makefile Enhancements:
minctarget, variables for version and path) to support OpenShift cluster management.dev-install-deps-openshift,dev-setup-fluxcd-openshift,dev-setup-cert-manager-openshift,dev-setup-openshift-specifics) for proper environment preparation. [1] [2]OpenShift RBAC and Patches:
hack/distro/openshift/extend-admin-role.yaml(extends admin role for Capsule and SCC use) andhack/distro/openshift/capsule-namespace-deleter.yaml(ClusterRoleBinding for namespace deletion). [1] [2]hack/distro/overlays/openshift/kustomization.yamlto patch FluxCD deployments and namespaces for OpenShift compatibility (removes security context and pod security labels).These changes enable automated E2E testing for OpenShift, ensure the necessary permissions and configurations are in place, and keep the workflow consistent with the existing Kubernetes pipeline.