From 51d9f77411f9d7d3416b901d6b8f372bf38d34ce Mon Sep 17 00:00:00 2001 From: Marco van Zijl Date: Fri, 2 May 2025 22:33:21 +0200 Subject: [PATCH] Added first ArgoCD app-of-apps structure --- app-test-1/app-test-1.yaml | 43 ++++++++++++++++++++++++++ applications/Chart.yaml | 23 ++++++++++++++ applications/templates/app-test-1.yaml | 16 ++++++++++ applications/values.yaml | 6 ++++ 4 files changed, 88 insertions(+) create mode 100644 app-test-1/app-test-1.yaml create mode 100644 applications/Chart.yaml create mode 100644 applications/templates/app-test-1.yaml create mode 100644 applications/values.yaml diff --git a/app-test-1/app-test-1.yaml b/app-test-1/app-test-1.yaml new file mode 100644 index 0000000..c2a7858 --- /dev/null +++ b/app-test-1/app-test-1.yaml @@ -0,0 +1,43 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: app-test-1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app-test-1-deploy + namespace: app-test-1 +spec: + replicas: 1 + selector: + matchLabels: + app: app-test-1 + template: + metadata: + labels: + app: app-test-1 + spec: + containers: + - name: app-test-1 + image: nginx + ports: + - name: web + containerPort: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: app-test-1-svc + namespace: app-test-1 + labels: + app: app-test-1 +spec: + type: ClusterIP + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + selector: + app: app-test-1 diff --git a/applications/Chart.yaml b/applications/Chart.yaml new file mode 100644 index 0000000..2af55aa --- /dev/null +++ b/applications/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: applications +description: Applications + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: "1.0" \ No newline at end of file diff --git a/applications/templates/app-test-1.yaml b/applications/templates/app-test-1.yaml new file mode 100644 index 0000000..10addeb --- /dev/null +++ b/applications/templates/app-test-1.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: app-test-1 + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: test-app + server: {{ .Values.spec.destination.server }} + project: default + source: + path: app-test-1 + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: {{ .Values.spec.source.targetRevision }} \ No newline at end of file diff --git a/applications/values.yaml b/applications/values.yaml new file mode 100644 index 0000000..bcd0eb1 --- /dev/null +++ b/applications/values.yaml @@ -0,0 +1,6 @@ +spec: + destination: + server: https://kubernetes.default.svc + source: + repoURL: https://git.mvzijl.nl/marco/veda.git + targetRevision: HEAD \ No newline at end of file