Comments (2)
@adabuleanu
Yes it's possible. I recently did this and documented it here
https://www.linkedin.com/pulse/continuous-deployment-argocd-applicationset-ifeoluwa-oluwole/
Basically this:
apiVersion: argoproj.io/v1alpha
kind: ApplicationSet
metadata:
name: example-appset
namespace: argocd
spec:
generators:
- git:
repoURL: https://gitlab.com/abcxyz/example-project/argocd.git
revision: main
files:
- path: "apps/examples/"
template:
metadata:
name: '{{name}}'
spec:
project: '{{project}}'
source:
chart: helm-chart-name
repoURL: https://<packaged helm chart url>
targetRevision: 2.0
helm:
values: |-
{{values}} # see "values" snippet below
destination:
name: staging-cluster
namespace: '{{namespace}}'
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true
and the parameters to be passed via the values.yaml will look like this:
# This section is for the Argo CD Application resource
name: app1-example # Argo CD application resource name
project: linkedin # Argo CD project
namespace: staging # Ensures namespace in destination cluster exists.
# This section contains the values for the helm chart
values: |-
fullnameOverride: app1-staging
image:
repository: 1234567890.dkr.ecr.us-west-1.amazonaws.com/app1:latest
namespace: staging
containerPort: 7080
autoscaling:
enabled: false
ingress:
host: app1.staging.com
env:
enabled: false
from applicationset.
@glyhood in your example you are creating Applications from ApplicationSets that use a source of helm chart inside a helm repository, while your values files are stored in a git repository. My question (maybe not clear) was related to the fact if you can use charts inside a helm repository or a in git repository.
For charts inside helm repository the Application will look like this:
spec:
source:
repoURL: "{{source.repoURL}}" <--------- this is a helm repo (same "repoURL" key)
chart: "{{source.chart}}" <--------- "chart" key is specific to helm repositories
targetRevision: '{{source.targetRevision}}' <--------- this is the helm chart version (same "targetRevision" key)
For charts inside git repository the Application will look like this:
spec:
source:
repoURL: "{{source.repoURL}}" <--------- this is a git repo (same "repoURL" key)
path: "{{source.path}}" <--------- "path" key is specific to helm repositories
targetRevision: '{{source.targetRevision}}' <--------- this can be a git branch or a git tag (same "targetRevision" key)
From my investigation this is not possible at the moment. I found this feature request that might help with better "templating" inside ApplicationSets: argoproj/argo-cd#11183
from applicationset.
Related Issues (20)
- Webhooks: add support for Bitbucket HOT 3
- Github rate limit hit, even using `scmProvider.filters` HOT 1
- scmProvider Github filter combination (repositoryMatch + labelMatch) not generating apps HOT 1
- Merge generator where a generator can reference items of another one HOT 1
- FATA[0000] rpc error: code = Unimplemented desc = unknown service applicationset.ApplicationSetService HOT 2
- git-generator-directory - doesn't apply value file
- docs: merge generator typo in example
- Feature Request: ApplicationSet Generators Should Support Jinja Conditionals HOT 1
- ApplicationSet not able to render helm chart when value is not defined in generator list
- Include SHA of test merge commit in PR generator for GitHub
- clusterDecisionResource example outdate ?
- Ability to provide multiple values files for Helm chart, using multiple sources HOT 3
- ApplicationSet fails silently
- Replace deprecated `set-output` command with environment file HOT 1
- How to set scmProvider filter based on repository group or path? HOT 1
- scmProvider for gitlab should export a Normalized version of the organization value HOT 2
- Plugin Generator throws `ApplicationSet: strict decoding error: unknown field "spec.generators[0].plugin"` HOT 4
- Application Set with Existing Project Issue HOT 1
- Matrix generator - Combine SCM and Git Generators, consume parameters from parent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationset.