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

Fix the missing role file when deploying on OCP #252

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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