Skip to content

feat: add e2e openshift support#1894

Merged
Svarrogh1337 merged 16 commits into
projectcapsule:mainfrom
Svarrogh1337:e2e/add-openshift-support
Apr 15, 2026
Merged

feat: add e2e openshift support#1894
Svarrogh1337 merged 16 commits into
projectcapsule:mainfrom
Svarrogh1337:e2e/add-openshift-support

Conversation

@Svarrogh1337
Copy link
Copy Markdown
Member

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:

  • Added a new GitHub Actions job (e2e-openshift) to .github/workflows/e2e.yml for running E2E tests on OpenShift using MINC.
  • Introduced new Makefile targets (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:

  • Added installation and setup for the MINC tool (minc target, variables for version and path) to support OpenShift cluster management.
  • Introduced OpenShift-specific dependency installation and setup targets (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:

  • Added OpenShift-specific RBAC manifests: hack/distro/openshift/extend-admin-role.yaml (extends admin role for Capsule and SCC use) and hack/distro/openshift/capsule-namespace-deleter.yaml (ClusterRoleBinding for namespace deletion). [1] [2]
  • Created hack/distro/overlays/openshift/kustomization.yaml to 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.

Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 9, 2026 11:11
@Svarrogh1337 Svarrogh1337 changed the title feat: add e2e-minishift Makefile target and workflow job feat: add e2e openshift support Apr 9, 2026
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread .github/workflows/e2e.yml
Comment thread hack/distro/overlays/openshift/kustomization.yaml Outdated
Comment thread hack/distro/overlays/openshift/kustomization.yaml
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 9, 2026 11:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread Makefile Outdated
Comment thread Makefile
Comment thread .github/workflows/e2e.yml
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 9, 2026 11:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Comment thread Makefile Outdated
Comment thread Makefile
Comment thread Makefile
Comment thread .github/workflows/e2e.yml Outdated
Comment thread Makefile
Copilot AI review requested due to automatic review settings April 14, 2026 12:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Comment thread Makefile Outdated
Comment thread .github/workflows/e2e.yml Outdated

resources:
- ../../fluxcd
- https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/openshift/scc.yaml
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- https://raw.githubusercontent.com/fluxcd/flux2/main/manifests/openshift/scc.yaml
- https://raw.githubusercontent.com/fluxcd/flux2/v2.4.0/manifests/openshift/scc.yaml

Copilot uses AI. Check for mistakes.
Comment thread e2e/pod_priority_class_test.go Outdated
Comment thread Makefile Outdated
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 14, 2026 13:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread hack/distro/openshift/extend-admin-role.yaml
Comment thread e2e/tenantresource_test.go
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 14, 2026 15:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Comment thread Makefile Outdated
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 14, 2026 15:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Comment thread Makefile
Comment thread hack/distro/overlays/openshift/kustomization.yaml
Comment thread .github/workflows/e2e.yml
Signed-off-by: Hristo Hristov <me@hhristov.info>
Signed-off-by: Hristo Hristov <me@hhristov.info>
Copilot AI review requested due to automatic review settings April 14, 2026 19:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread Makefile
Comment thread .github/workflows/e2e.yml
@Svarrogh1337 Svarrogh1337 merged commit 0744924 into projectcapsule:main Apr 15, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants