# gitops-bootstrap / kubernetes / t1 "Standard" # # An AppProject is a fence. It says which repositories this set of applications # may come from, which clusters and namespaces it may write to, and which kinds # of object it may create. Without one, every Application runs with whatever # Argo CD itself can do, which is usually everything. --- apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: name: platform namespace: argocd spec: description: Platform services owned by the infrastructure team. # Only these repositories. A compromised repository somewhere else cannot # deploy into this project. sourceRepos: - https://github.com/your-org/your-cluster-config.git - https://falcosecurity.github.io/charts - https://kyverno.github.io/kyverno/ - https://istio-release.storage.googleapis.com/charts destinations: - server: https://kubernetes.default.svc namespace: platform-* - server: https://kubernetes.default.svc namespace: argocd # Falco runs in its own namespace, as its chart expects. - server: https://kubernetes.default.svc namespace: falco - server: https://kubernetes.default.svc namespace: kyverno - server: https://kubernetes.default.svc namespace: istio-system # Each application namespace that gets mesh policies, such as shop. - server: https://kubernetes.default.svc namespace: shop # Cluster-wide objects this project may create. Anything not listed is denied. # # Be clear about what this does and does not buy. ClusterRoleBinding is on the # list because Falco needs one, and anything allowed to create a # ClusterRoleBinding can bind itself to cluster-admin. What actually protects # you here is sourceRepos above: only the listed repositories can put anything # into this project. If a service does not need cluster-wide RBAC, give it a # project without these two lines. clusterResourceWhitelist: - group: "" kind: Namespace - group: rbac.authorization.k8s.io kind: ClusterRole - group: rbac.authorization.k8s.io kind: ClusterRoleBinding - group: apiextensions.k8s.io kind: CustomResourceDefinition # Kyverno's policies and the webhooks Kyverno and Istio install. - group: kyverno.io kind: ClusterPolicy - group: admissionregistration.k8s.io kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io kind: MutatingWebhookConfiguration namespaceResourceBlacklist: - group: "" kind: ResourceQuota - group: "" kind: LimitRange # Who can do what. sync is deliberately separate from override, so the people # who can deploy are not automatically the people who can bypass Git. roles: - name: deployer description: Can sync, cannot change the definition. policies: - p, proj:platform:deployer, applications, sync, platform/*, allow - p, proj:platform:deployer, applications, get, platform/*, allow groups: - your-org:platform-engineers