apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: mixingx-agents namespace: argocd spec: goTemplate: true goTemplateOptions: - missingkey=error generators: - matrix: generators: - git: repoURL: https://gitee.com/mixing-tech/mixingx.deploy.git revision: master files: - path: environments/demo/agents.yaml - list: elementsYaml: '{{ .agents | toJson }}' template: metadata: name: 'mixingx-agent-{{ .id }}' spec: project: default sources: - repoURL: https://gitee.com/mixing-tech/mixingx.hub.chart.git targetRevision: master path: release-charts/mixingx-agent-unit helm: releaseName: 'mixingx-agent-{{ .id }}' valueFiles: - $values/environments/demo/image-version.yaml - $values/environments/demo/agent-common-values.yaml values: | site: "{{ .id }}" description: "{{ .description }}" phaseType: "{{ .phaseType }}" {{- if hasKey . "nodeLabel" }} nodeSelector: mixingx.io/edge-node: "{{ .nodeLabel }}" {{- end }} - repoURL: https://gitee.com/mixing-tech/mixingx.deploy.git targetRevision: master ref: values destination: server: https://kubernetes.default.svc namespace: mixingx syncPolicy: syncOptions: - CreateNamespace=true