File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/main/groovy/com/cloudogu/gitops/features Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,13 @@ class PrometheusStack extends Feature implements FeatureWithImage {
120120 if (config. application[' namespaceIsolation' ] || config. application[' netpols' ]) {
121121 ScmmRepo clusterResourcesRepo = scmmRepoProvider. getRepo(' argocd/cluster-resources' )
122122 clusterResourcesRepo. cloneRepo()
123- String commitText= " "
124123 for (String currentNamespace : namespaceList) {
125124
126- if (config. application[' namespaceIsolation' ]) {
125+ if (config. application[' namespaceIsolation' ]) {
127126 def rbacYaml = new TemplatingEngine (). template(new File (RBAC_NAMESPACE_ISOLATION_TEMPLATE ),
128- [namespace : currentNamespace,
127+ [namespace : currentNamespace,
129128 namePrefix : namePrefix])
130129 clusterResourcesRepo. writeFile(" misc/monitoring/rbac/${ currentNamespace} .yaml" , rbacYaml)
131- commitText+ = " Add namespace-isolated RBAC for PrometheusStack. "
132130 }
133131
134132 if (config. application[' netpols' ]) {
@@ -137,11 +135,9 @@ class PrometheusStack extends Feature implements FeatureWithImage {
137135 namePrefix : namePrefix])
138136
139137 clusterResourcesRepo. writeFile(" misc/monitoring/netpols/${ currentNamespace} .yaml" , netpolsYaml)
140- commitText+ = " Network Policies allowing Prometheus scraping in namespaces"
141138 }
142139 }
143-
144- clusterResourcesRepo. commitAndPush(commitText)
140+ clusterResourcesRepo. commitAndPush(' Adding namespace-isolated RBAC and network policies if enabled.' )
145141 }
146142
147143 def tmpHelmValues = fileSystemUtils. createTempFile()
You can’t perform that action at this time.
0 commit comments