73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: argo-repo-main
|
|
namespace: "{{ .Release.Namespace }}"
|
|
labels:
|
|
argocd.argoproj.io/secret-type: repository
|
|
annotations:
|
|
link.argocd.argoproj.io/external-link: "https://github.com/{{ .Values.gitops.repo }}"
|
|
stringData:
|
|
type: git
|
|
url: "git@github.com:{{ .Values.gitops.repo }}.git"
|
|
sshPrivateKey: {{ .Values.selfapp.sshkey | quote }}
|
|
|
|
|
|
{{ if .Values.selfapp.enabled }}
|
|
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: "{{ .Release.Name }}"
|
|
namespace: "{{ .Release.Namespace }}"
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: "git@github.com:{{ .Values.gitops.repo }}.git"
|
|
targetRevision: "{{ .Values.gitops.commit }}"
|
|
path: k8s/argocd
|
|
helm:
|
|
valueFiles:
|
|
- values.yaml
|
|
- values-{{ .Values.selfapp.deployment }}.yaml
|
|
parameters:
|
|
- name: "selfapp.deployment"
|
|
value: {{ .Values.selfapp.deployment | quote }}
|
|
- name: "selfapp.enabled"
|
|
value: "true"
|
|
- name: "selfapp.sshkey"
|
|
value: {{ .Values.selfapp.sshkey | quote }}
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: "{{ .Release.Namespace }}"
|
|
syncPolicy:
|
|
automated: {}
|
|
|
|
---
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: "argoapps"
|
|
namespace: "{{ .Release.Namespace }}"
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: "git@github.com:{{ .Values.gitops.repo }}.git"
|
|
targetRevision: "{{ .Values.gitops.commit }}"
|
|
path: k8s/argoapps
|
|
helm:
|
|
valueFiles:
|
|
- values.yaml
|
|
- values-{{ .Values.selfapp.deployment }}.yaml
|
|
parameters:
|
|
- name: "gitops.repo"
|
|
value: {{ .Values.gitops.repo | quote }}
|
|
- name: "gitops.commit"
|
|
value: {{ .Values.gitops.commit | quote }}
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: "{{ .Release.Namespace }}"
|
|
syncPolicy:
|
|
automated: {}
|
|
{{- end -}} |