# Apply both files together: # kubectl apply -k . # # Order matters. The project has to exist before the ApplicationSet that # references it, and kustomize keeps them in the order listed here. --- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: argocd resources: - project.yaml - applicationset.yaml # labels with includeSelectors false adds the labels without touching selector # fields. The older commonLabels rewrites selectors too, and selectors on an # existing Deployment cannot be changed, so the apply fails. labels: - pairs: app.kubernetes.io/managed-by: argocd owner: platform-engineering includeSelectors: false