Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Fix the missing role file when deploying on OCP
Browse files Browse the repository at this point in the history
Previous versions of the Gatekeeper operator had a custom role
definition for OpenShift but as part of the upgrade to v3.11, it was
consolidated to a single role. It is benign to have an OpenShift
specific permission on other clusters since that API group does not
exist on other clusters. This keeps maintenance simpler.

Relates:
https://issues.redhat.com/browse/ACM-5295

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
  • Loading branch information
mprahl committed Sep 18, 2023
1 parent 36e025a commit 89a85bf
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions controllers/gatekeeper_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import (

const (
defaultGatekeeperCrName = "gatekeeper"
openshiftAssetsDir = "openshift/"
GatekeeperImageEnvVar = "RELATED_IMAGE_GATEKEEPER"
NamespaceFile = "v1_namespace_gatekeeper-system.yaml"
AssignCRDFile = "apiextensions.k8s.io_v1_customresourcedefinition_assign.mutations.gatekeeper.sh.yaml"
Expand Down Expand Up @@ -288,10 +287,6 @@ func (r *GatekeeperReconciler) applyAssets(assets []string, gatekeeper *operator
}

func (r *GatekeeperReconciler) applyAsset(gatekeeper *operatorv1alpha1.Gatekeeper, asset string, controllerDeploymentPending bool) error {
if asset == RoleFile && r.isOpenShift() {
asset = openshiftAssetsDir + asset
}

obj, err := util.GetManifestObject(asset)
if err != nil {
return err
Expand Down

0 comments on commit 89a85bf

Please sign in to comment.