ranrubin
3 years ago
7 changed files with 87 additions and 71 deletions
@ -0,0 +1,35 @@ |
|||||
|
{{- range $app := .Values.argocdApplications -}} |
||||
|
{{ if not .disable }} |
||||
|
apiVersion: argoproj.io/v1alpha1 |
||||
|
kind: Application |
||||
|
metadata: |
||||
|
name: {{ .name }} |
||||
|
namespace: argocd |
||||
|
finalizers: |
||||
|
- resources-finalizer.argocd.argoproj.io |
||||
|
spec: |
||||
|
project: {{ $.Values.global.spec.project }} |
||||
|
source: |
||||
|
repoURL: {{ $.Values.global.spec.source.repoURL }} |
||||
|
targetRevision: {{ default $.Values.global.spec.source.targetRevision .targetRevision }} |
||||
|
path: {{ .name }} |
||||
|
{{- if default $.Values.global.helmDefault .helm }} |
||||
|
helm: |
||||
|
valueFiles: |
||||
|
- {{ $.Values.global.valuesFile }} |
||||
|
{{- end }} |
||||
|
destination: |
||||
|
namespace: {{ default $.Values.global.spec.destination.namespace .namespace }} |
||||
|
server: {{ $.Values.global.spec.destination.server }} |
||||
|
syncPolicy: |
||||
|
{{- if not .disableAutomated }} |
||||
|
automated: |
||||
|
prune: false |
||||
|
selfHeal: true |
||||
|
allowEmpty: false |
||||
|
{{- end }} |
||||
|
syncOptions: |
||||
|
- CreateNamespace=true |
||||
|
--- |
||||
|
{{- end }} |
||||
|
{{- end }} |
@ -1,16 +0,0 @@ |
|||||
apiVersion: argoproj.io/v1alpha1 |
|
||||
kind: Application |
|
||||
metadata: |
|
||||
name: helm-guestbook |
|
||||
namespace: argocd |
|
||||
finalizers: |
|
||||
- resources-finalizer.argocd.argoproj.io |
|
||||
spec: |
|
||||
destination: |
|
||||
namespace: helm-guestbook |
|
||||
server: {{ .Values.spec.destination.server }} |
|
||||
project: default |
|
||||
source: |
|
||||
path: helm-guestbook |
|
||||
repoURL: {{ .Values.spec.source.repoURL }} |
|
||||
targetRevision: {{ .Values.spec.source.targetRevision }} |
|
@ -1,17 +0,0 @@ |
|||||
apiVersion: argoproj.io/v1alpha1 |
|
||||
kind: Application |
|
||||
metadata: |
|
||||
name: helm-hooks |
|
||||
namespace: argocd |
|
||||
finalizers: |
|
||||
- resources-finalizer.argocd.argoproj.io |
|
||||
spec: |
|
||||
destination: |
|
||||
namespace: helm-hooks |
|
||||
server: {{ .Values.spec.destination.server }} |
|
||||
project: default |
|
||||
source: |
|
||||
path: helm-hooks |
|
||||
repoURL: {{ .Values.spec.source.repoURL }} |
|
||||
targetRevision: {{ .Values.spec.source.targetRevision }} |
|
||||
|
|
@ -1,16 +0,0 @@ |
|||||
apiVersion: argoproj.io/v1alpha1 |
|
||||
kind: Application |
|
||||
metadata: |
|
||||
name: kustomize-guestbook |
|
||||
namespace: argocd |
|
||||
finalizers: |
|
||||
- resources-finalizer.argocd.argoproj.io |
|
||||
spec: |
|
||||
destination: |
|
||||
namespace: kustomize-guestbook |
|
||||
server: {{ .Values.spec.destination.server }} |
|
||||
project: default |
|
||||
source: |
|
||||
path: kustomize-guestbook |
|
||||
repoURL: {{ .Values.spec.source.repoURL }} |
|
||||
targetRevision: {{ .Values.spec.source.targetRevision }} |
|
@ -1,16 +0,0 @@ |
|||||
apiVersion: argoproj.io/v1alpha1 |
|
||||
kind: Application |
|
||||
metadata: |
|
||||
name: sync-waves |
|
||||
namespace: argocd |
|
||||
finalizers: |
|
||||
- resources-finalizer.argocd.argoproj.io |
|
||||
spec: |
|
||||
destination: |
|
||||
namespace: sync-waves |
|
||||
server: {{ .Values.spec.destination.server }} |
|
||||
project: default |
|
||||
source: |
|
||||
path: sync-waves |
|
||||
repoURL: {{ .Values.spec.source.repoURL }} |
|
||||
targetRevision: {{ .Values.spec.source.targetRevision }} |
|
@ -0,0 +1,13 @@ |
|||||
|
global: |
||||
|
env: production |
||||
|
valuesFile: values-production.yaml |
||||
|
spec: |
||||
|
project: default |
||||
|
|
||||
|
argocdApplications: |
||||
|
helmGuestbook: |
||||
|
targetRevision: 1.0.0 |
||||
|
kustomizeGuestbook: |
||||
|
disable: true |
||||
|
syncWaves: |
||||
|
disableAutomated: true |
@ -1,6 +1,39 @@ |
|||||
spec: |
global: |
||||
destination: |
env: development |
||||
server: https://kubernetes.default.svc |
helmDefault: false |
||||
source: |
valuesFile: values.yaml |
||||
repoURL: https://github.com/argoproj/argocd-example-apps |
spec: |
||||
targetRevision: HEAD |
project: default |
||||
|
destination: |
||||
|
server: https://kubernetes.default.svc |
||||
|
namespace: default |
||||
|
source: |
||||
|
repoURL: https://github.com/argoproj/argocd-example-apps |
||||
|
targetRevision: HEAD |
||||
|
|
||||
|
argocdApplications: |
||||
|
helmGuestbook: |
||||
|
disableAutomated: false |
||||
|
disable: false |
||||
|
name: helm-guestbook |
||||
|
namespace: helm-guestbook |
||||
|
helm: true |
||||
|
# targetRevision: HEAD |
||||
|
helmHooks: |
||||
|
disableAutomated: false |
||||
|
disable: false |
||||
|
name: helm-hooks |
||||
|
namespace: helm-hooks |
||||
|
# targetRevision: HEAD |
||||
|
kustomizeGuestbook: |
||||
|
disableAutomated: false |
||||
|
disable: false |
||||
|
name: kustomize-guestbook |
||||
|
namespace: kustomize-guestbook |
||||
|
# targetRevision: HEAD |
||||
|
syncWaves: |
||||
|
disableAutomated: false |
||||
|
disable: false |
||||
|
name: sync-waves |
||||
|
namespace: sync-waves |
||||
|
# targetRevision: HEAD |
Loading…
Reference in new issue