openshift-routes icon indicating copy to clipboard operation
openshift-routes copied to clipboard

Installation is only possible in the default `cert-manager` NS

Open poponealex opened this issue 1 year ago • 3 comments

What's happening

It is not possible to install openshift-routes in another namespace than cert-manager because the namespace value is hard coded in internal/cmd/app/options/options.go.

What should be the expected behaviour

It should be possible to install openshift-routes in an user defined namespace.

Proposed solution

Get the namespace via an environment variable defined by the user during the installation process. I'm working on it and I will release a PR soon.

poponealex avatar Jun 16 '23 09:06 poponealex

You can get it to work by modifying the suggested cert-manager-openshift-routes.yaml:

--- cert-manager-openshift-routes.yaml.orig     2023-06-23 01:01:02.427271831 -0400
+++ cert-manager-openshift-routes.yaml  2023-06-23 00:58:34.249364263 -0400
@@ -65,7 +65,7 @@
 kind: ServiceAccount
 metadata:
   name: cert-manager-openshift-routes
-  namespace: cert-manager
+  namespace: openshift-operators
 automountServiceAccountToken: false
 ---
 apiVersion: rbac.authorization.k8s.io/v1
@@ -79,13 +79,13 @@
 subjects:
 - kind: ServiceAccount
   name: cert-manager-openshift-routes
-  namespace: cert-manager
+  namespace: openshift-operators
 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: cert-manager-openshift-routes
-  namespace: cert-manager
+  namespace: openshift-operators
   labels:
     app.kubernetes.io/name: cert-manager-openshift-routes
     app.kubernetes.io/version: "0.2.0"
@@ -114,6 +114,7 @@
           image: "ghcr.io/cert-manager/cert-manager-openshift-routes:0.2.0"
           args:
           - -v=5
+          - --leader-election-namespace=openshift-operators
           ports:
           - containerPort: 6060
             name: readiness

nanderson94 avatar Jun 23 '23 05:06 nanderson94

It would then seem like a documentation issue. Or perhaps, have I missed some info about the --leader-election-namespace flag somewhere?

Anyway, I found out that openshift-routes doesn't work as expected, I opened another issue #34.

poponealex avatar Jul 26 '23 06:07 poponealex

I believe this can be closed since the Helm chart allows configuring the namespace: https://github.com/cert-manager/openshift-routes/pull/41

jacksgt avatar Oct 20 '23 07:10 jacksgt

Thank you for fixing this issue @jacksgt. fixed in https://github.com/cert-manager/openshift-routes/pull/41

inteon avatar Jul 18 '24 10:07 inteon