Skip to content

Commit 70687d2

Browse files
fix logic for git integration missing (#3)
* fix logic for git integration missing
1 parent cf47945 commit 70687d2

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

charts/gitops-runtime/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: v0.0.1
33
description: A Helm chart for Codefresh gitops runtime
44
name: gitops-runtime
5-
version: 0.0.1-alpha-1
5+
version: 0.0.1-alpha-2
66
home: https://github.com/codefresh-io/gitops-runtime-helm
77
keywords:
88
- codefresh

charts/gitops-runtime/README.md

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

3-
![Version: 0.0.1-alpha-1](https://img.shields.io/badge/Version-0.0.1--alpha--1-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square)
3+
![Version: 0.0.1-alpha-2](https://img.shields.io/badge/Version-0.0.1--alpha--2-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square)
44

55
A Helm chart for Codefresh gitops runtime
66

charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ app-proxy components are generated.
66
{{- define "codefresh-gitops-runtime.app-proxy.calculated-env-vars"}}
77
USER_TOKEN:
88
{{- include "codefresh-gitops-runtime.installation-token-env-var-value" . | nindent 2 }}
9+
{{- if .Values.global.codefresh.gitIntegration.provider.name }}
910
GIT_INTEGRATION_PROVIDER: {{ include "codefresh-gitops-runtime.git-integration.provider" .}}
11+
{{- end }}
12+
{{- if .Values.global.codefresh.gitIntegration.provider.apiUrl }}
1013
GIT_INTEGRATION_APIURL: {{ include "codefresh-gitops-runtime.git-integration.apiUrl" . }}
14+
{{- end }}
1115
{{- if or .Values.global.runtime.gitCredentials.password.value .Values.global.runtime.gitCredentials.password.secretKeyRef }}
1216
GIT_USERNAME: {{ .Values.global.runtime.gitCredentials.username }}
1317
GIT_PASSWORD:

charts/gitops-runtime/templates/event-reporters/rollout-reporter/clusterrolebinding.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{{/* Mapping of argo rollouts clusterrole if such is created (see https://github.com/codefresh-io/argo-helm/blob/argo-rollouts/charts/argo-rollouts/templates/controller/clusterrolebinding.yaml)
22
to the reporters ServiceAccount
33
*/}}
4-
{{- if and (index (get .Values "argo-rollouts") "clusterInstall") (index (get .Values "argo-rollouts") "controller" "createClusterRole") }}
5-
{{- $eventReporterContext := deepCopy . }}
6-
{{- $_ := set $eventReporterContext "Values" (get .Values "event-reporters") }}
7-
{{- $_ := set $eventReporterContext.Values "global" (get .Values "global") }}
4+
{{- if index (get .Values "argo-rollouts") "enabled" }}
5+
{{- if and (index (get .Values "argo-rollouts") "clusterInstall") (index (get .Values "argo-rollouts") "controller" "createClusterRole") }}
6+
{{- $eventReporterContext := deepCopy . }}
7+
{{- $_ := set $eventReporterContext "Values" (get .Values "event-reporters") }}
8+
{{- $_ := set $eventReporterContext.Values "global" (get .Values "global") }}
89
apiVersion: rbac.authorization.k8s.io/v1
910
kind: ClusterRoleBinding
1011
metadata:
@@ -17,4 +18,5 @@ subjects:
1718
- kind: ServiceAccount
1819
name: {{ include "event-reporters.rollout-reporter.serviceAccountName" $eventReporterContext }}
1920
namespace: {{ .Release.Namespace }}
21+
{{- end }}
2022
{{- end }}

0 commit comments

Comments
 (0)