-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Create a separate ServiceAccount for use by the Smart Gateway workloads. This requires changes to the Operator RBAC permissions so that it can create ClusterRoles, ClusterRoleBindings, and ServiceAcccounts. Implement Ansible changes to the smartgateway role so that the appropriate resources are created in the cluster, and assigned the RBAC permissions to the Smart Gateway workload. Move the Deployment of Smart Gateways from using the default ServiceAccount, and instead use the new smart-gateway ServiceAccount. Signed-off-by: Leif Madsen <lmadsen@redhat.com> Resolves: rhbz#2082310
- Loading branch information
1 parent
da8845c
commit e13398a
Showing
7 changed files
with
257 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
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,24 +1,24 @@ | ||
kind: RoleBinding | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: smart-gateway-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: smart-gateway-operator | ||
namespace: service-telemetry | ||
roleRef: | ||
kind: Role | ||
kind: ClusterRole | ||
name: smart-gateway-operator | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: smart-gateway-auth-delegator | ||
name: smart-gateway-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: placeholder | ||
name: smart-gateway-operator | ||
roleRef: | ||
kind: Role | ||
name: smart-gateway-operator | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system:auth-delegator |
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
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,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: smart-gateway | ||
rules: | ||
- apiGroups: | ||
- authentication.k8s.io | ||
resources: | ||
- tokenreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- authorization.k8s.io | ||
resources: | ||
- subjectaccessreviews | ||
verbs: | ||
- create |