diff --git a/argocd/application-infisical-operator-rbac.yaml b/argocd/application-infisical-operator-rbac.yaml new file mode 100644 index 0000000..3fd718b --- /dev/null +++ b/argocd/application-infisical-operator-rbac.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: infisical-operator-rbac + namespace: argocd +spec: + destination: + namespace: infisical-operator + server: https://kubernetes.default.svc + project: default + source: + path: infisical-operator-rbac + repoURL: https://git.chemavx.xyz/chemavx/k8s-manifests + targetRevision: main + ignoreDifferences: + # token controller injects .data into the Secret; don't let selfHeal wipe it + - group: "" + kind: Secret + name: infisical-token-reviewer + jsonPointers: + - /data + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/infisical-operator-rbac/clusterrolebinding-token-reviewer.yaml b/infisical-operator-rbac/clusterrolebinding-token-reviewer.yaml new file mode 100644 index 0000000..6f60dba --- /dev/null +++ b/infisical-operator-rbac/clusterrolebinding-token-reviewer.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: infisical-token-reviewer-auth-delegator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator # grants TokenReview create +subjects: + - kind: ServiceAccount + name: infisical-token-reviewer + namespace: infisical-operator diff --git a/infisical-operator-rbac/secret-token-reviewer.yaml b/infisical-operator-rbac/secret-token-reviewer.yaml new file mode 100644 index 0000000..c86aaae --- /dev/null +++ b/infisical-operator-rbac/secret-token-reviewer.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: infisical-token-reviewer + namespace: infisical-operator + annotations: + kubernetes.io/service-account.name: infisical-token-reviewer +type: kubernetes.io/service-account-token +# .data is populated by the cluster token controller — never committed to git. +# ArgoCD ignores /data on this Secret (see application-infisical-operator-rbac.yaml). diff --git a/infisical-operator-rbac/serviceaccount-token-reviewer.yaml b/infisical-operator-rbac/serviceaccount-token-reviewer.yaml new file mode 100644 index 0000000..84e6bb4 --- /dev/null +++ b/infisical-operator-rbac/serviceaccount-token-reviewer.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: infisical-token-reviewer + namespace: infisical-operator