Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example | ApplicationSet Git Generator #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dag-andersen
Copy link
Owner

@dag-andersen dag-andersen commented Dec 22, 2024

This example is based on this ApplicationSet that looks at files in examples/git-generator/resources/**

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: git-generator-example-appset
  namespace: argocd
spec:
  goTemplate: true
  goTemplateOptions: ["missingkey=error"]
  generators:
    - git:
        repoURL: https://github.com/dag-andersen/argocd-diff-preview.git
        revision: HEAD
        directories:
          - path: examples/git-generator/resources/**
        values:
          name: "{{ index .path.segments 3 }}"
  template:
    metadata:
      name: "{{ .values.name }}"
    spec:
      source:
        repoURL: https://github.com/dag-andersen/argocd-diff-preview.git
        path: "{{ .path.path }}"
      ...

Copy link
Contributor

github-actions bot commented Dec 22, 2024

Argo CD Diff Preview

Summary:

 /dev/null => target/folder3 | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Diff:
diff --git target/folder3 target/folder3
new file mode 100644
index 0000000..98a842f
--- /dev/null
+++ target/folder3
@@ -0,0 +1,23 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    argocd.argoproj.io/instance: folder3
+  name: deploy-from-folder-three
+spec:
+  replicas: 2
+  selector:
+    matchLabels:
+      app: myapp
+  template:
+    metadata:
+      labels:
+        app: myapp
+    spec:
+      containers:
+      - image: dag-andersen/myapp:latest
+        name: myapp
+        ports:
+        - containerPort: 80
+

@dag-andersen dag-andersen force-pushed the git-generator-example branch from f5cb51c to e9ca869 Compare January 9, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant