From 1fe7c3698906f35a13ddcdb1b0767dcd2cb1e1cd Mon Sep 17 00:00:00 2001 From: jiwlee Date: Fri, 3 Oct 2025 21:13:28 +0900 Subject: [PATCH 1/3] feat: add Chart.yaml for guestbook application Signed-off-by: jiwlee --- 2025/argo-cd/jiwlee97/Chart.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2025/argo-cd/jiwlee97/Chart.yaml diff --git a/2025/argo-cd/jiwlee97/Chart.yaml b/2025/argo-cd/jiwlee97/Chart.yaml new file mode 100644 index 0000000..7482006 --- /dev/null +++ b/2025/argo-cd/jiwlee97/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: guestbook +description: ArgoCD AppProject and Application for Guestbook + +# 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. +# It is recommended to use it with quotes. +appVersion: '1.0' From 243d366c68a2743f83c5ed10cd105a8448f02a74 Mon Sep 17 00:00:00 2001 From: jiwlee Date: Sat, 4 Oct 2025 17:41:25 +0900 Subject: [PATCH 2/3] feat: add Argo CD project and application configuration for guestbook Signed-off-by: jiwlee --- 2025/argo-cd/jiwlee97/templates/project.yaml | 46 ++++++++++++++++++++ 2025/argo-cd/jiwlee97/values.yaml | 6 +++ 2 files changed, 52 insertions(+) create mode 100644 2025/argo-cd/jiwlee97/templates/project.yaml create mode 100644 2025/argo-cd/jiwlee97/values.yaml diff --git a/2025/argo-cd/jiwlee97/templates/project.yaml b/2025/argo-cd/jiwlee97/templates/project.yaml new file mode 100644 index 0000000..c3e7427 --- /dev/null +++ b/2025/argo-cd/jiwlee97/templates/project.yaml @@ -0,0 +1,46 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: guestbook-project + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + description: Guestbook Project + + sourceRepos: + {{- range $r := .Values.project.sourceRepos }} + - {{ required "project.sourceRepos[] is required" $r }} + {{- end }} + + destinations: + {{- range $d := .Values.project.destinations }} + - namespace: {{ required "project.destinations[].namespace is required" $d.namespace }} + server: {{ required "project.destinations[].server is required" $d.server }} + {{- end }} + + clusterResourceWhitelist: + - group: '' + kind: Namespace + + namespaceResourceBlacklist: + - group: '' + kind: ResourceQuota + - group: '' + kind: LimitRange + - group: '' + kind: NetworkPolicy + + namespaceResourceWhitelist: + - group: 'apps' + kind: Deployment + - group: '' + kind: Service + + orphanedResources: + warn: true + + permitOnlyProjectScopedClusters: false + + sourceNamespaces: + - 'guestbook' diff --git a/2025/argo-cd/jiwlee97/values.yaml b/2025/argo-cd/jiwlee97/values.yaml new file mode 100644 index 0000000..6cb0ceb --- /dev/null +++ b/2025/argo-cd/jiwlee97/values.yaml @@ -0,0 +1,6 @@ +project: + sourceRepos: + - https://github.com/argoproj/argocd-example-apps.git + destinations: + - namespace: guestbook + server: https://kubernetes.default.svc From 226951a1a3ffb57d2866fe54d51381173301eb05 Mon Sep 17 00:00:00 2001 From: jiwlee Date: Sat, 4 Oct 2025 17:41:56 +0900 Subject: [PATCH 3/3] feat: add Chart.yaml for guestbook application Signed-off-by: jiwlee --- .../jiwlee97/templates/application.yaml | 27 +++++++++++++++++++ 2025/argo-cd/jiwlee97/values.yaml | 8 ++++++ 2 files changed, 35 insertions(+) create mode 100644 2025/argo-cd/jiwlee97/templates/application.yaml diff --git a/2025/argo-cd/jiwlee97/templates/application.yaml b/2025/argo-cd/jiwlee97/templates/application.yaml new file mode 100644 index 0000000..6dc9ccf --- /dev/null +++ b/2025/argo-cd/jiwlee97/templates/application.yaml @@ -0,0 +1,27 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: {{ .Values.application.metadata.name }} + namespace: {{ .Values.application.metadata.namespace }} + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: guestbook-project + + source: + repoURL: https://github.com/argoproj/argocd-example-apps.git + targetRevision: HEAD + path: helm-guestbook + + destination: + server: https://kubernetes.default.svc + namespace: {{ .Values.application.spec.destination.namespace }} + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + + revisionHistoryLimit: 10 diff --git a/2025/argo-cd/jiwlee97/values.yaml b/2025/argo-cd/jiwlee97/values.yaml index 6cb0ceb..3b1187f 100644 --- a/2025/argo-cd/jiwlee97/values.yaml +++ b/2025/argo-cd/jiwlee97/values.yaml @@ -4,3 +4,11 @@ project: destinations: - namespace: guestbook server: https://kubernetes.default.svc + +application: + metadata: + name: guestbook + namespace: argocd + spec: + destination: + namespace: guestbook