mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
* Add support for missingkey=error in ApplicationSets Signed-off-by: Radon Rosborough <[email protected]> * options for cluster generator too Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: Radon Rosborough <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: merge-clusters-and-list
|
|
spec:
|
|
goTemplate: true
|
|
goTemplateOptions: ["missingkey=error"]
|
|
generators:
|
|
- merge:
|
|
mergeKeys:
|
|
- server
|
|
generators:
|
|
- clusters:
|
|
values:
|
|
kafka: 'true'
|
|
redis: 'false'
|
|
# For clusters with a specific label, enable Kafka.
|
|
- clusters:
|
|
selector:
|
|
matchLabels:
|
|
use-kafka: 'false'
|
|
values:
|
|
kafka: 'false'
|
|
# For a specific cluster, enable Redis.
|
|
- list:
|
|
elements:
|
|
- server: https://some-specific-cluster
|
|
values.redis: 'true'
|
|
template:
|
|
metadata:
|
|
name: '{{.name}}'
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://github.com/argoproj/argocd-example-apps/
|
|
targetRevision: HEAD
|
|
path: helm-guestbook
|
|
helm:
|
|
parameters:
|
|
- name: kafka
|
|
value: '{{.values.kafka}}'
|
|
- name: redis
|
|
value: '{{.values.redis}}'
|
|
destination:
|
|
server: '{{.server}}'
|
|
namespace: default
|