apiVersion: v1 kind: ServiceAccount metadata: name: gramps-deployer namespace: gramps --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: gramps-deployer namespace: gramps rules: - apiGroups: [""] resources: ["configmaps", "endpoints", "persistentvolumeclaims", "pods", "serviceaccounts", "services"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] # The upstream subcharts look up these two existing Secrets while rendering. # CI cannot list Secrets or read gramps-runtime (OIDC, S3, and app credentials). - apiGroups: [""] resources: ["secrets"] resourceNames: ["gramps-postgresql", "gramps-valkey", "postgresql"] verbs: ["get"] - apiGroups: ["apps"] resources: ["deployments", "replicasets", "statefulsets"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["batch"] resources: ["jobs"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["networking.k8s.io"] resources: ["ingresses", "networkpolicies"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["policy"] resources: ["poddisruptionbudgets"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: gramps-deployer namespace: gramps subjects: - kind: ServiceAccount name: gramps-deployer namespace: gramps roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: gramps-deployer --- apiVersion: v1 kind: Secret metadata: name: gramps-deployer-token namespace: gramps annotations: kubernetes.io/service-account.name: gramps-deployer type: kubernetes.io/service-account-token