From 5a01dba65e588cfb01914e5c0542e3a58a650d4e Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Mon, 23 Aug 2021 00:03:11 +0700 Subject: [PATCH] Add Gitea to applications layer --- applications/gitea/Chart.yaml | 7 +++++ applications/gitea/values.yaml | 5 ++++ apps/resources/gitea.yaml | 29 ------------------- .../applicationsets/applications.yaml | 28 ++++++++++++++++++ bootstrap/root-app/kustomization.yaml | 2 +- 5 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 applications/gitea/Chart.yaml create mode 100644 applications/gitea/values.yaml delete mode 100644 apps/resources/gitea.yaml create mode 100644 bootstrap/root-app/applicationsets/applications.yaml diff --git a/applications/gitea/Chart.yaml b/applications/gitea/Chart.yaml new file mode 100644 index 00000000..806bddc8 --- /dev/null +++ b/applications/gitea/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +name: gitea +version: 4.0.3 +dependencies: +- name: gitea + version: 4.0.3 + repository: https://dl.gitea.io/charts/ diff --git a/applications/gitea/values.yaml b/applications/gitea/values.yaml new file mode 100644 index 00000000..87c04ee7 --- /dev/null +++ b/applications/gitea/values.yaml @@ -0,0 +1,5 @@ +gitea: + ingress: + enabled: true + hosts: + - host: git.khuedoan.com diff --git a/apps/resources/gitea.yaml b/apps/resources/gitea.yaml deleted file mode 100644 index 25619e45..00000000 --- a/apps/resources/gitea.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: gitea - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: in-cluster - namespace: gitea - server: '' - source: - path: '' - repoURL: 'https://dl.gitea.io/charts/' - targetRevision: 2.2.5 - chart: gitea - helm: - parameters: - - name: 'ingress.enabled' - value: 'true' - - name: 'ingress.hosts[0]' - value: git.khuedoan.com - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true diff --git a/bootstrap/root-app/applicationsets/applications.yaml b/bootstrap/root-app/applicationsets/applications.yaml new file mode 100644 index 00000000..577d5023 --- /dev/null +++ b/bootstrap/root-app/applicationsets/applications.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: applications +spec: + generators: + - git: + repoURL: https://github.com/khuedoan/homelab.git + revision: master + directories: + - path: applications/* + template: + metadata: + name: '{{path.basename}}' + spec: + destination: + name: in-cluster + namespace: '{{path.basename}}' + project: default + source: + repoURL: https://github.com/khuedoan/homelab.git + path: '{{path}}' + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/bootstrap/root-app/kustomization.yaml b/bootstrap/root-app/kustomization.yaml index c3f77401..5f5ed600 100644 --- a/bootstrap/root-app/kustomization.yaml +++ b/bootstrap/root-app/kustomization.yaml @@ -6,6 +6,6 @@ resources: - applicationsets/bootstrap.yaml - applicationsets/system.yaml - applicationsets/operations.yaml -# - applicationsets/applications.yaml +- applicationsets/applications.yaml namespace: argocd