-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Feature Request] Add lever to hydrate ApplicationSet-managed Applications with argocd appset generate
#73
Comments
Hi, @seanturner026, sorry for the late answer. I thought of the same thing! and I agree using the However, I’ve already tried implementing it and encountered some strange CLI errors related to networking. I decided to pause for now since there were other, more pressing features to prioritize. But I definitely plan to revisit it in the future. Of course, others are welcome to give it a try in the meantime! But I am a bit confused by the example you’re giving because if you add the I just did it locally, and it renders this ⬇️ Argo CD Diff PreviewSummary: /dev/null => target/my-app-set-uat | 88 ++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+) Diff:diff --git target/my-app-set-uat target/my-app-set-uat
new file mode 100644
index 0000000..12fcce7
--- /dev/null
+++ target/my-app-set-uat
@@ -0,0 +1,88 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/managed-by: Helm
+ app.kubernetes.io/name: myApp
+ app.kubernetes.io/version: 1.16.0
+ argocd.argoproj.io/instance: my-app-set-uat
+ helm.sh/chart: myApp-0.1.0
+ name: super-app-name
+ namespace: default
+spec:
+ ports:
+ - name: http
+ port: 80
+ protocol: TCP
+ targetPort: http
+ selector:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/name: myApp
+ type: ClusterIP
+
+---
+apiVersion: v1
+automountServiceAccountToken: true
+kind: ServiceAccount
+metadata:
+ labels:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/managed-by: Helm
+ app.kubernetes.io/name: myApp
+ app.kubernetes.io/version: 1.16.0
+ argocd.argoproj.io/instance: my-app-set-uat
+ helm.sh/chart: myApp-0.1.0
+ name: super-app-name
+ namespace: default
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/managed-by: Helm
+ app.kubernetes.io/name: myApp
+ app.kubernetes.io/version: 1.16.0
+ argocd.argoproj.io/instance: my-app-set-uat
+ helm.sh/chart: myApp-0.1.0
+ name: super-app-name
+ namespace: default
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/name: myApp
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/instance: my-app-set-uat
+ app.kubernetes.io/managed-by: Helm
+ app.kubernetes.io/name: myApp
+ app.kubernetes.io/version: 1.16.0
+ helm.sh/chart: myApp-0.1.0
+ spec:
+ containers:
+ - image: nginx:1.16.0
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ name: myApp
+ ports:
+ - containerPort: 80
+ name: http
+ protocol: TCP
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ resources: {}
+ securityContext: {}
+ securityContext: {}
+ serviceAccountName: super-app-name
+ |
Was saying in addition to the |
ArgoCD recently added a really handy cli upgrade in the form of
argocd appset generate $appset_name.yaml -o yaml
.https://argo-cd.readthedocs.io/en/stable/user-guide/commands/argocd_appset_generate/
This takes one's
ApplicationSet
and hydrates or renders all of theApplication
manifests that would be created if theApplicationSet
were to be deployed. This command greatly improves theApplicationSet
development feedback loop in two ways:Application
is being generated properly e.g. I'm using agit generator
and I add a new directory that's globbed by the wild card.Currently the
ArgoCD Diff Preview
renders newApplications
when they're added in a PR. I propose that theArgoCD Diff Preview
by default render theApplications
that are created by anApplicationSet
via the CLI.I think it could also be helpful to have the option of disable this behavior (e.g.
argocd appset generate -o yaml
functionality) with an environment variable.Consider your example from: https://github.com/dag-andersen/argocd-diff-preview/blob/ded37e62b69aa26289d3aae3e8a9d82b34fcba14/examples/helm/applications/my-app-set.yaml
If I were to open a PR adding a new enviornment...
- name: dev - name: prod - name: staging + - name: uat
I would expect the
ArgoCD Diff Generator
to render anApplication
for UAT.The text was updated successfully, but these errors were encountered: