-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create appropriate role/rolebinding for tenant in OpenShift (#74)
When running in OpenShift, tenant cointainer is dumping errors when being started. This fix sets appropriate role and rolebinding to use anyuid service account only for OpenShift deployment Resolves: #73 Signed-off-by: Sergio Arroutbi <[email protected]>
- Loading branch information
Showing
4 changed files
with
48 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
15 changes: 15 additions & 0 deletions
15
build/helm/keylime/charts/keylime-tenant/templates/role.yaml
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,15 @@ | ||
{{ if .Values.global.openshift }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ include "tenant.roleName" . }} | ||
rules: | ||
- apiGroups: | ||
- security.openshift.io | ||
resources: | ||
- securitycontextconstraints | ||
resourceNames: | ||
- anyuid | ||
verbs: | ||
- use | ||
{{ end }} |
14 changes: 14 additions & 0 deletions
14
build/helm/keylime/charts/keylime-tenant/templates/rolebinding.yaml
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,14 @@ | ||
{{ if .Values.global.openshift }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ include "tenant.roleBindingName" . }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ include "tenant.roleName" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "tenant.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{ end }} |
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 |
---|---|---|
|
@@ -50,3 +50,8 @@ nodeSelector: {} | |
tolerations: [] | ||
|
||
affinity: {} | ||
|
||
role: | ||
name: "" | ||
roleBinding: | ||
name: "" |