-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added service account creation step in quick start docs (#1324)
* added service account creation step in quick start docs Signed-off-by: Daniel Soifer <daniel.soifer@codefresh.io> * moved service account yaml to rbac dir Signed-off-by: Daniel Soifer <daniel.soifer@codefresh.io> * added bare minimum workflow rbac to example docs Signed-off-by: Daniel Soifer <daniel.soifer@codefresh.io>
- Loading branch information
1 parent
29c1450
commit 27bad79
Showing
3 changed files
with
74 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: operate-workflow-sa | ||
--- | ||
# Similarly you can use a ClusterRole and ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: operate-workflow-role | ||
rules: | ||
- apiGroups: | ||
- argoproj.io | ||
verbs: | ||
- "*" | ||
resources: | ||
- workflows | ||
- workflowtemplates | ||
- cronworkflows | ||
- clusterworkflowtemplates | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: operate-workflow-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: operate-workflow-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: operate-workflow-sa |
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,35 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: workflow-role | ||
rules: | ||
# pod get/watch is used to identify the container IDs of the current pod | ||
# pod patch is used to annotate the step's outputs back to controller (e.g. artifact location) | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- watch | ||
- patch | ||
# logs get/watch are used to get the pods logs for script outputs, and for log archival | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods/log | ||
verbs: | ||
- get | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: workflow-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: workflow-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default |