Move defaultrepo options into global

This commit is contained in:
Stefan Reimer 2020-05-15 10:38:06 +01:00
parent aa8d21ed05
commit 78807457c3
5 changed files with 51 additions and 29 deletions

View File

@ -17,22 +17,22 @@ spec:
project: kubezero
source:
repoURL: {{ default .root.Values.defaultSource.repoURL }}
targetRevision: {{ default .root.Values.defaultSource.targetRevision }}
repoURL: {{ .root.Values.global.defaultSource.repoURL }}
targetRevision: {{ .root.Values.global.defaultSource.targetRevision }}
{{- if eq .type "helm" }}
{{ $my_values := index .root.Values .name "values" }}
path: {{ default .root.Values.defaultSource.pathPrefix }}charts/kubezero-{{ .name }}
{{- $my_values := index .root.Values .name "values" }}
path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ .name }}
{{- if $my_values }}
helm:
values: |
{{- toYaml $my_values | nindent 8 }}
{{- end }}
{{- else }}
path: {{ default .root.Values.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
{{- end }}
destination:
server: {{ default .root.Values.defaultDestination.server }}
server: {{ .root.Values.global.defaultDestination.server }}
namespace: {{ default "kube-system" .namespace }}
syncPolicy:

View File

@ -1,12 +1,16 @@
global:
defaultDestination:
server: https://kubernetes.default.svc
defaultSource:
# This repoURL is used a base for all the repoURLs applications
# Setting this to a eg. private git repo incl. the use of pathPrefix allows kubezero to be
# integrated into any repository as a git subtree if for example public internet access is unavailable
defaultSource:
# defaultSource.repoURL -- default repository for argocd applications
repoURL: https://github.com/zero-down-time/kubezero
# defaultSource.targetRevision -- default tracking of repoURL
targetRevision: HEAD
# defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees
pathPrefix: ''
calico:

View File

@ -1,3 +1,4 @@
global:
defaultDestination:
server: https://kubernetes.default.svc

View File

@ -11,16 +11,18 @@ metadata:
spec:
project: kubezero
source:
repoURL: https://github.com/Zero-Down-Time/kubezero
targetRevision: HEAD
path: charts/kubezero-app
repoURL: {{ .Values.global.defaultSource.repoURL }}
targetRevision: {{ .Values.global.defaultSource.targetRevision }}
path: {{ .Values.global.defaultSource.pathPrefix}}charts/kubezero-app
{{ if .Values.kubezero }}
helm:
values: |
{{- toYaml .Values.kubezero | nindent 8 }}
{{- end }}
destination:
server: https://kubernetes.default.svc
server: {{ .Values.global.defaultDestination.server }}
namespace: argocd
syncPolicy:
automated:

View File

@ -1,3 +1,18 @@
global:
defaultDestination:
server: https://kubernetes.default.svc
# This repoURL is used a base for all the repoURLs applications
# Setting this to a eg. private git repo incl. the use of pathPrefix allows kubezero to be
# integrated into any repository as a git subtree if for example public internet access is unavailable
defaultSource:
# defaultSource.repoURL -- default repository for argocd applications
repoURL: https://github.com/zero-down-time/kubezero
# defaultSource.targetRevision -- default tracking of repoURL
targetRevision: HEAD
# defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees
pathPrefix: ''
# kubezero -- Kubezero configuration, values.yaml please see kubezeroApp
kubezero: {}