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' 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/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..3b1187f --- /dev/null +++ b/2025/argo-cd/jiwlee97/values.yaml @@ -0,0 +1,14 @@ +project: + sourceRepos: + - https://github.com/argoproj/argocd-example-apps.git + destinations: + - namespace: guestbook + server: https://kubernetes.default.svc + +application: + metadata: + name: guestbook + namespace: argocd + spec: + destination: + namespace: guestbook