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 project: kubezero
source: source:
repoURL: {{ default .root.Values.defaultSource.repoURL }} repoURL: {{ .root.Values.global.defaultSource.repoURL }}
targetRevision: {{ default .root.Values.defaultSource.targetRevision }} targetRevision: {{ .root.Values.global.defaultSource.targetRevision }}
{{- if eq .type "helm" }} {{- if eq .type "helm" }}
{{ $my_values := index .root.Values .name "values" }} {{- $my_values := index .root.Values .name "values" }}
path: {{ default .root.Values.defaultSource.pathPrefix }}charts/kubezero-{{ .name }} path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ .name }}
{{- if $my_values }} {{- if $my_values }}
helm: helm:
values: | values: |
{{- toYaml $my_values | nindent 8 }} {{- toYaml $my_values | nindent 8 }}
{{- end }} {{- end }}
{{- else }} {{- else }}
path: {{ default .root.Values.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }} path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
{{- end }} {{- end }}
destination: destination:
server: {{ default .root.Values.defaultDestination.server }} server: {{ .root.Values.global.defaultDestination.server }}
namespace: {{ default "kube-system" .namespace }} namespace: {{ default "kube-system" .namespace }}
syncPolicy: syncPolicy:

View File

@ -1,12 +1,16 @@
global:
defaultDestination: defaultDestination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
defaultSource:
# This repoURL is used a base for all the repoURLs applications # 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 # 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 # 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 repoURL: https://github.com/zero-down-time/kubezero
# defaultSource.targetRevision -- default tracking of repoURL
targetRevision: HEAD targetRevision: HEAD
# defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees
pathPrefix: '' pathPrefix: ''
calico: calico:

View File

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

View File

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