diff --git a/2025/argo-cd/SinnoLn/octocat/.helmignore b/2025/argo-cd/SinnoLn/octocat/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/2025/argo-cd/SinnoLn/octocat/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/2025/argo-cd/SinnoLn/octocat/Chart.yaml b/2025/argo-cd/SinnoLn/octocat/Chart.yaml new file mode 100644 index 0000000..2d5ce8a --- /dev/null +++ b/2025/argo-cd/SinnoLn/octocat/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: argo-config-chart +description: "A Helm chart to deploy Argo CD AppProject and Application resources." + +type: application + +version: 0.1.0 + +appVersion: "1.0.0" \ No newline at end of file diff --git a/2025/argo-cd/SinnoLn/octocat/templates/application.yaml b/2025/argo-cd/SinnoLn/octocat/templates/application.yaml new file mode 100644 index 0000000..98c30f1 --- /dev/null +++ b/2025/argo-cd/SinnoLn/octocat/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: {{ .Values.application.metadata.name }}-project + source: + repoURL: https://github.com/argoproj/argocd-example-apps.git + targetRevision: HEAD + path: helm-guestbook + destination: + server: {{ .Values.application.spec.destination.server }} + namespace: {{ .Values.application.spec.destination.namespace }} + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true + selfHeal: true + ignoreDifferences: + - group: apps + kind: Deployment + jsonPointers: + - /spec/replicas \ No newline at end of file diff --git a/2025/argo-cd/SinnoLn/octocat/templates/project.yaml b/2025/argo-cd/SinnoLn/octocat/templates/project.yaml new file mode 100644 index 0000000..50b1126 --- /dev/null +++ b/2025/argo-cd/SinnoLn/octocat/templates/project.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: {{ .Values.application.metadata.name }}-project + namespace: {{ .Values.application.metadata.namespace }} +spec: + description: Project for {{ .Values.application.metadata.name }} + sourceRepos: + {{- toYaml .Values.project.sourceRepos | nindent 4 }} + destinations: + {{- toYaml .Values.project.destinations | nindent 4 }} + + clusterResourceWhitelist: + - group: 'apps' + kind: 'Deployment' + - group: '' + kind: 'Service' diff --git a/2025/argo-cd/SinnoLn/octocat/values.yaml b/2025/argo-cd/SinnoLn/octocat/values.yaml new file mode 100644 index 0000000..63334b0 --- /dev/null +++ b/2025/argo-cd/SinnoLn/octocat/values.yaml @@ -0,0 +1,17 @@ +project: + sourceRepos: + - 'https://github.com/argoproj/argocd-example-apps.git' + destinations: + - namespace: guestbook + server: https://kubernetes.default.svc + - namespace: default + server: https://kubernetes.default.svc + +application: + metadata: + name: guestbook + namespace: argocd + spec: + destination: + server: https://kubernetes.default.svc + namespace: guestbook \ No newline at end of file