Skip to content

Commit 07092fd

Browse files
mdrollThomasMichael1811nihussmann
authored
Minor fixes for OpenShift and multi-tenancy (#307)
* add recent changes for upstream contribution * resolve issue caused by incorrect diff application * Update argocd/argocd/operator/argocd.ftl.yaml Co-authored-by: Niklas Hußmann <niklas.hussmann-extern@cloudogu.com> * Update argocd/argocd/operator/argocd.ftl.yaml Co-authored-by: Niklas Hußmann <niklas.hussmann-extern@cloudogu.com> --------- Co-authored-by: Thomas <thomas@thomasmichael.de> Co-authored-by: Niklas Hußmann <niklas.hussmann-extern@cloudogu.com>
1 parent e420e34 commit 07092fd

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

argocd/cluster-resources/argocd/misc.ftl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
project: <#if config.multiTenant.useDedicatedInstance>${tenantName}<#else>cluster-resources</#if>
1010
destination:
1111
server: https://kubernetes.default.svc
12-
namespace: <#if config.multiTenant.useDedicatedInstance>argocd<#else>${config.application.namePrefix}argocd</#if>
12+
namespace: <#if config.multiTenant.useDedicatedInstance>${config.multiTenant.centralArgocdNamespace}<#else>${config.application.namePrefix}argocd</#if>
1313
source:
1414
path: misc/
1515
<#if config.multiTenant.useDedicatedInstance>

src/main/groovy/com/cloudogu/gitops/features/PrometheusStack.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class PrometheusStack extends Feature implements FeatureWithImage {
201201
}
202202

203203
private String findValidOpenShiftUid() {
204-
String uidRange = k8sClient.getAnnotation('namespace', 'monitoring', 'openshift.io/sa.scc.uid-range')
204+
String uidRange = k8sClient.getAnnotation('namespace', namespace, 'openshift.io/sa.scc.uid-range')
205205

206206
if (uidRange) {
207207
log.debug("found UID=${uidRange}")

templates/kubernetes/rbac/argocd-role.ftl.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ rules:
5454
resources: ["roles", "rolebindings"]
5555
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
5656

57+
<#if config.features.secrets.active == true>
5758
- apiGroups: ["external-secrets.io"]
5859
resources: ["secretstores", "externalsecrets"]
5960
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
60-
61+
</#if>
62+
63+
<#if config.features.monitoring.active == true>
6164
- apiGroups: [ "monitoring.coreos.com" ]
6265
resources: [
6366
"alertmanagers",
@@ -74,4 +77,5 @@ rules:
7477
"podmonitors",
7578
"probes"
7679
]
77-
verbs: [ "create", "delete", "get", "list", "patch", "update", "watch" ]
80+
verbs: [ "create", "delete", "get", "list", "patch", "update", "watch" ]
81+
</#if>

0 commit comments

Comments
 (0)