apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: toolhive namespace: argocd spec: goTemplate: true goTemplateOptions: ["missingkey=error"] generators: - list: elements: - environment: production namespace: toolhive-system overlay: production chartVersion: 0.28.3 template: metadata: name: 'toolhive-{{ .environment }}' labels: app.kubernetes.io/managed-by: argocd app.kubernetes.io/name: toolhive spec: project: default sources: # 1. ToolHive CRDs (MCPServer, MCPRegistry, ...). No values needed. - repoURL: ghcr.io/stacklok/toolhive chart: toolhive-operator-crds targetRevision: '{{ .chartVersion }}' # 2. ToolHive operator, values pulled from this repo via $values. - repoURL: ghcr.io/stacklok/toolhive chart: toolhive-operator targetRevision: '{{ .chartVersion }}' helm: releaseName: toolhive-operator valueFiles: - $values/manifest/overlays/{{ .overlay }}/helm-values/values.yaml # 3. Values source ref for the operator chart above. - repoURL: http://gitea-ha-http.apps:3000/olb42/toolhive.git targetRevision: main ref: values - repoURL: http://gitea-ha-http.apps:3000/olb42/toolhive.git targetRevision: main path: 'manifest/overlays/{{ .overlay }}' kustomize: commonAnnotationsEnvsubst: true commonAnnotations: app-source: ${ARGOCD_APP_SOURCE_REPO_URL} app-revision: ${ARGOCD_APP_SOURCE_TARGET_REVISION} destination: server: https://kubernetes.default.svc namespace: '{{ .namespace }}' syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true # CRD schemas are large; SSA avoids the last-applied-config annotation limit. - ServerSideApply=true