-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add Persistence Agent ClusterRole and Binding (#324)
Apply auth manifests (KF 1.8) for the KFP Persistence Agent, including the ClusterRole, ClusterRoleBinding, and ServiceAccount that allow the workload to get, list, and watch workflows/scheduledworkflows, as well as get namespaces. Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@canonical.com>
- Loading branch information
Showing
6 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
charmed-kubeflow-chisme | ||
lightkube | ||
ops | ||
serialized-data-interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
charms/kfp-persistence/src/templates/auth_manifests.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Source manifests/apps/pipeline/upstream/base/installs/multi-user/persistence-agent/ | ||
# These manifest files have been modified to suit the needs of the charm; the app label, metadata name, | ||
# and namespace fields will be rendered with information from the application and the model. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app: {{ app_name }} | ||
name: {{ app_name }}-role | ||
rules: | ||
- apiGroups: | ||
- argoproj.io | ||
resources: | ||
- workflows | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- kubeflow.org | ||
resources: | ||
- scheduledworkflows | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- pipelines.kubeflow.org | ||
resources: | ||
- scheduledworkflows | ||
- workflows | ||
verbs: | ||
- report | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- namespaces | ||
verbs: | ||
- get | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ app_name }}-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ app_name }}-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ app_name }}-sa | ||
namespace: {{ namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ app_name }}-sa | ||
namespace: {{ namespace }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters