Skip to content

Commit 99e3576

Browse files
committed
wip
1 parent 00bd9fb commit 99e3576

File tree

13 files changed

+33
-33
lines changed

13 files changed

+33
-33
lines changed

charts/gitops-runtime/templates/_components/cap-app-proxy/_all_resources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
{{ include "cap-app-proxy.resources.sa" .}}
1313
---
1414
{{ include "argo-cd.namespaced-rbac.all" . }}
15-
{{- end }}
15+
{{- end }}

charts/gitops-runtime/templates/_components/cap-app-proxy/_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ argoCdUsername: {{ .Values.config.argoCdUsername }}
44
argoWorkflowsInsecure: {{ .Values.config.argoWorkflowsInsecure | quote }}
55
argoWorkflowsUrl: {{ default "" .Values.config.argoWorkflowsUrl }}
66
cors: {{ .Values.global.codefresh.url }}
7-
{{- with .Values.config.clusterChunkSize }}
7+
{{- with .Values.config.clusterChunkSize }}
88
clusterChunkSize: {{ . | quote }}
99
{{- end }}
1010
env: {{ .Values.config.env | quote}}
1111
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
1212
isExternalArgoCD: {{ .Values.global.runtime.isExternalArgoCD | quote }}
1313
runtimeName: {{ required "global.runtime.name is required" .Values.global.runtime.name | quote}}
14-
runtimeSingleNamespace: {{ .Values.singleNamespace | quote }}
14+
runtimeSingleNamespace: {{ .Values.global.runtime.singleNamespace | quote }}
1515
skipGitPermissionValidation: {{ .Values.config.skipGitPermissionValidation | quote }}
1616
logLevel: {{ .Values.config.logLevel | quote }}
1717
{{- $enrichmentValues := get .Values "image-enrichment" }}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
{{- if (get .Values "app-proxy").singleNamespace }}
1+
{{- define "argo-cd.namespaced-rbac.all" }}
2+
{{- if (index .Values "global" "runtime").singleNamespace }}
23
{{- include "argo-cd.namespaced-rbac.serviceaccount" . }}
34
---
45
{{- include "argo-cd.namespaced-rbac.role" . }}
56
---
67
{{- include "argo-cd.namespaced-rbac.rolebinding" . }}
7-
{{- end }}
8+
{{- end }}
9+
{{- end }}

charts/gitops-runtime/templates/_components/gitops-operator/_env.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COMMIT_STATUS_POLLING_INTERVAL: {{ .Values.config.commitStatusPollingInterval }}
1515
WORKFLOW_MONITOR_POLLING_INTERVAL: {{ .Values.config.workflowMonitorPollingInterval }}
1616
MAX_CONCURRENT_RELEASES: {{ .Values.config.maxConcurrentReleases }}
1717
PROMOTION_WRAPPER_TEMPLATE: {{ .Values.config.promotionWrapperTemplate | quote }}
18-
RUNTIME_SINGLE_NAMESPACE: {{ (get .Values "app-proxy").singleNamespace }}
18+
RUNTIME_SINGLE_NAMESPACE: {{ .Values.global.runtime.singleNamespace }}
1919
{{- end }}
2020

2121
{{- define "gitops-operator.resources.environment-variables.defaults" -}}
@@ -37,7 +37,7 @@ NAMESPACE:
3737
valueFrom:
3838
fieldRef:
3939
fieldPath: metadata.namespace
40-
RUNTIME_VERSION:
40+
RUNTIME_VERSION:
4141
valueFrom:
4242
configMapKeyRef:
4343
name: codefresh-cm

charts/gitops-runtime/templates/_components/gitops-operator/crds/_all.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
---
1515
{{- include "gitops-operator.crds.product" $context }}
1616
---
17-
{{- if not (get .Values "app-proxy").singleNamespace }}
17+
{{- if not (get .Values.global "runtime").singleNamespace }}
1818
{{- include "gitops-operator.crds.restricted-gitsource" $context }}
1919
{{- end }}
2020
---

charts/gitops-runtime/templates/_components/gitops-operator/promotion-template/_rbac.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{- define "gitops-operator.resources.promotion-template-rbac" }}
33
apiVersion: rbac.authorization.k8s.io/v1
4-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
4+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
55
metadata:
66
labels:
77
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
@@ -45,14 +45,14 @@ rules:
4545

4646
---
4747
apiVersion: rbac.authorization.k8s.io/v1
48-
kind: {{ .Values.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
48+
kind: {{ .Values.global.runtime.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
4949
metadata:
5050
labels:
5151
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
5252
name: promotion-template
5353
roleRef:
5454
apiGroup: rbac.authorization.k8s.io
55-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
55+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
5656
name: promotion-template
5757
subjects:
5858
- kind: ServiceAccount

charts/gitops-runtime/templates/_components/gitops-operator/rbac/_all.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
---
1414
{{- include "gitops-operator.resources.leader-election-rbac" $context }}
1515
---
16-
{{- if not (get .Values "app-proxy").singleNamespace }}
16+
{{- if not (get .Values.global "runtime").singleNamespace }}
1717
{{- include "gitops-operator.resources.restricted-git-source-rbac" $context }}
1818
{{- end }}
1919
---

charts/gitops-runtime/templates/_components/gitops-operator/rbac/_auth_proxy_rbac.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{- define "gitops-operator.resources.auth-proxy-rbac" }}
33
apiVersion: rbac.authorization.k8s.io/v1
4-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
4+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
55
metadata:
66
labels:
77
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
@@ -22,14 +22,14 @@ rules:
2222

2323
---
2424
apiVersion: rbac.authorization.k8s.io/v1
25-
kind: {{ .Values.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
25+
kind: {{ .Values.global.runtime.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
2626
metadata:
2727
labels:
2828
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
2929
name: codefresh-gitops-operator-proxy
3030
roleRef:
3131
apiGroup: rbac.authorization.k8s.io
32-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
32+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
3333
name: codefresh-gitops-operator-proxy
3434
subjects:
3535
- kind: ServiceAccount

charts/gitops-runtime/templates/_components/gitops-operator/rbac/_rbac_operator.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{- define "gitops-operator.resources.rbac-operator" }}
33
apiVersion: rbac.authorization.k8s.io/v1
4-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
4+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
55
metadata:
66
labels:
77
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
@@ -26,7 +26,7 @@ rules:
2626
- patch
2727
- update
2828
- watch
29-
{{- if not .Values.singleNamespace }}
29+
{{- if not .Values.global.runtime.singleNamespace }}
3030
- apiGroups:
3131
- codefresh.io
3232
resources:
@@ -72,7 +72,7 @@ rules:
7272
- list
7373
- watch
7474
---
75-
{{- if .Values.singleNamespace }}
75+
{{- if .Values.global.runtime.singleNamespace }}
7676
apiVersion: rbac.authorization.k8s.io/v1
7777
kind: Role
7878
metadata:
@@ -194,30 +194,30 @@ rules:
194194

195195
---
196196
apiVersion: rbac.authorization.k8s.io/v1
197-
kind: {{ .Values.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
197+
kind: {{ .Values.global.runtime.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
198198
metadata:
199199
labels:
200200
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
201201
name: codefresh-gitops-operator
202202
roleRef:
203203
apiGroup: rbac.authorization.k8s.io
204-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
204+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
205205
name: codefresh-gitops-operator
206206
subjects:
207207
- kind: ServiceAccount
208208
name: {{ include "gitops-operator.serviceAccountName" . }}
209209
namespace: {{ .Release.Namespace }}
210210
---
211211
apiVersion: rbac.authorization.k8s.io/v1
212-
kind: {{ .Values.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
212+
kind: {{ .Values.global.runtime.singleNamespace | ternary "RoleBinding" "ClusterRoleBinding" }}
213213
metadata:
214214
labels:
215215
{{- include "gitops-operator.selectorLabels" . | nindent 4 }}
216216
name: codefresh-gitops-operator-workflows
217217
roleRef:
218218
apiGroup: rbac.authorization.k8s.io
219-
kind: {{ .Values.singleNamespace | ternary "Role" "ClusterRole" }}
220-
name: {{ .Values.singleNamespace | ternary "argo-role" "argo-edit" }}
219+
kind: {{ .Values.global.runtime.singleNamespace | ternary "Role" "ClusterRole" }}
220+
name: {{ .Values.global.runtime.singleNamespace | ternary "argo-role" "argo-edit" }}
221221
subjects:
222222
- kind: ServiceAccount
223223
name: {{ include "gitops-operator.serviceAccountName" . }}

charts/gitops-runtime/templates/_components/gitops-operator/rbac/_restricted_git_source.rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
{{- define "gitops-operator.resources.restricted-git-source-rbac" }}
3-
{{- if not .Values.singleNamespace }}
3+
{{- if not .Values.global.runtime.singleNamespace }}
44
apiVersion: rbac.authorization.k8s.io/v1
55
kind: ClusterRole
66
metadata:

0 commit comments

Comments
 (0)