Skip to content

Commit

Permalink
Always install remote access token for lookup service use.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 27, 2024
1 parent 869db67 commit 083964d
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ workshopBaseImagePullPolicy: #@ workshop_base_image_pull_policy
#@ if data.values.lookupService.enabled:
--- #@ template.replace(library.get("lookup-service").with_data_values(lookup_service_values(), plain=True).eval())
#@ end

--- #@ template.replace(library.get("lookup-service-token").with_data_values({}, plain=True).eval())
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! Cluster role bindings for the remote access.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: educates-remote-access
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: educates-remote-access
subjects:
- kind: ServiceAccount
name: remote-access
namespace: educates
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! Cluster role for the remote access clients.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: educates-remote-access
rules:
- apiGroups:
- training.educates.dev
resources:
- trainingportals
- workshopenvironments
- workshopsessions
- workshopallocations
- workshops
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#! ServiceAccount for remote access clients.
apiVersion: v1
kind: ServiceAccount
metadata:
name: remote-access
namespace: educates
annotations:
kapp.k14s.io/change-group: "educates/sa-with-separate-token-secret"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
#! Cluster role bindings for the lookup service.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -12,17 +11,3 @@ subjects:
- kind: ServiceAccount
name: lookup-service
namespace: educates
---
#! Cluster role bindings for the remote access.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: educates-remote-access
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: educates-remote-access
subjects:
- kind: ServiceAccount
name: remote-access
namespace: educates
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
#! Cluster role for the lookup service application.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -73,30 +72,3 @@ rules:
- get
- list
- watch
---
#! Cluster role for the remote access clients.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: educates-remote-access
rules:
- apiGroups:
- training.educates.dev
resources:
- trainingportals
- workshopenvironments
- workshopsessions
- workshopallocations
- workshops
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
---
#! ServiceAccount to run the lookup service application.
apiVersion: v1
kind: ServiceAccount
metadata:
name: lookup-service
namespace: educates
---
#! ServiceAccount for remote access clients.
apiVersion: v1
kind: ServiceAccount
metadata:
name: remote-access
namespace: educates
annotations:
kapp.k14s.io/change-group: "educates/sa-with-separate-token-secret"

0 comments on commit 083964d

Please sign in to comment.