UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 37d40775 authored by joshwolf's avatar joshwolf
Browse files

Merge branch 'git-branch' into 'master'

refactor out GitRepository ref rendering logic into a named 'validRef' template

Add better support for pinning packages to a specific commit, branch, or tag

See merge request platform-one/big-bang/umbrella!35
parents 6843ac0a 456aaa38
No related branches found
No related tags found
1 merge request!35refactor out GitRepository ref rendering logic into a named 'validRef' template
Pipeline #74480 passed
......@@ -3,3 +3,20 @@
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
{{/*
Build the appropriate spec.ref.{} given git branch, commit values
*/}}
{{- define "validRef" -}}
{{- if .commit -}}
{{- if not .branch -}}
{{- fail "A valid branch is required when a commit is specified!" -}}
{{- end -}}
branch: {{ .branch }}
commit: {{ .commit }}
{{- else if .tag -}}
tag: {{ .tag }}
{{- else -}}
branch: {{ .branch }}
{{- end -}}
{{- end -}}
\ No newline at end of file
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.clusterAuditor.git.commit }}
commit: {{ .Values.clusterAuditor.git.commit }}
{{- else if .Values.clusterAuditor.git.tag }}
tag: {{ .Values.clusterAuditor.git.tag }}
{{- else }}
branch: {{ .Values.clusterAuditor.git.branch }}
{{- end }}
url: {{ .Values.clusterAuditor.git.repo }}
ref:
{{- include "validRef" .Values.clusterAuditor.git | nindent 4 }}
{{- end }}
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.gatekeeper.git.commit }}
commit: {{ .Values.gatekeeper.git.commit }}
{{- else if .Values.gatekeeper.git.tag }}
tag: {{ .Values.gatekeeper.git.tag }}
{{- else }}
branch: {{ .Values.gatekeeper.git.branch }}
{{- end }}
url: {{ .Values.gatekeeper.git.repo }}
ref:
{{- include "validRef" .Values.gatekeeper.git | nindent 4 }}
{{- end }}
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.istio.git.commit }}
commit: {{ .Values.istio.git.commit }}
{{- else if .Values.istio.git.tag }}
tag: {{ .Values.istio.git.tag }}
{{- else }}
branch: {{ .Values.istio.git.branch }}
{{- end }}
url: {{ .Values.istio.git.repo }}
ref:
{{- include "validRef" .Values.istio.git | nindent 4 }}
{{- end }}
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.logging.git.commit }}
commit: {{ .Values.logging.git.commit }}
{{- else if .Values.logging.git.tag }}
tag: {{ .Values.logging.git.tag }}
{{- else }}
branch: {{ .Values.logging.git.branch }}
{{- end }}
url: {{ .Values.logging.git.repo }}
ref:
{{- include "validRef" .Values.logging.git | nindent 4 }}
{{- end }}
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.monitoring.git.commit }}
commit: {{ .Values.monitoring.git.commit }}
{{- else if .Values.monitoring.git.tag }}
tag: {{ .Values.monitoring.git.tag }}
{{- else }}
branch: {{ .Values.monitoring.git.branch }}
{{- end }}
url: {{ .Values.monitoring.git.repo }}
ref:
{{- include "validRef" .Values.monitoring.git | nindent 4 }}
{{- end }}
......@@ -11,13 +11,7 @@ spec:
/**/*.txt
/**/*.sh
interval: {{ .Values.flux.interval }}
ref:
{{- if .Values.twistlock.git.commit }}
commit: {{ .Values.twistlock.git.commit }}
{{- else if .Values.twistlock.git.tag }}
tag: {{ .Values.twistlock.git.tag }}
{{- else }}
branch: {{ .Values.twistlock.git.branch }}
{{- end }}
url: {{ .Values.twistlock.git.repo }}
ref:
{{- include "validRef" .Values.twistlock.git | nindent 4 }}
{{- end }}
......@@ -27,8 +27,8 @@ istio:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/servicemesh.git
branch: chart-release
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
clusterAuditor:
......@@ -36,8 +36,8 @@ clusterAuditor:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/cluster-auditor.git
branch: chart-release
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
gatekeeper:
......@@ -45,8 +45,8 @@ gatekeeper:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/policy.git
branch: chart-release
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
logging:
......@@ -54,8 +54,8 @@ logging:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/logging.git
branch: release-v0.2.x
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
monitoring:
......@@ -63,8 +63,8 @@ monitoring:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/core/monitoring.git
branch: release-v0.2.x
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
twistlock:
......@@ -72,6 +72,6 @@ twistlock:
git:
repo: https://repo1.dsop.io/platform-one/big-bang/apps/security-tools/twistlock.git
branch: chart-release
# commit: ""
# tag: ""
# commit: ""
# tag: ""
values: {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment