-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable RBAC for 1.2 and 1.1. Patch introduces a new ENV variable ENABLE_RBAC to enable RBAC, by setting ENABLE_RBAC=true
- Loading branch information
1 parent
40b0117
commit 808b191
Showing
7 changed files
with
150 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
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,8 @@ | ||
--- | ||
permission: | ||
enabled: true | ||
rbac: | ||
policies-csv-file: './rbac/rbac-policy.csv' | ||
admin: | ||
users: | ||
- name: user:default/test1 |
53 changes: 53 additions & 0 deletions
53
ci-scripts/rhdh-setup/template/backstage/helm/extravolume-patch-1.1.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,53 @@ | ||
--- | ||
extraVolumeMounts: | ||
- name: dynamic-plugins-root | ||
mountPath: /opt/app-root/src/dynamic-plugins-root | ||
- name: rbac-policy | ||
mountPath: /opt/app-root/src/rbac | ||
extraVolumes: | ||
- name: dynamic-plugins-root | ||
ephemeral: | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
# -- Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins. | ||
storage: 2Gi | ||
- name: dynamic-plugins | ||
configMap: | ||
defaultMode: 420 | ||
name: dynamic-plugins | ||
optional: true | ||
- name: rbac-policy | ||
configMap: | ||
defaultMode: 420 | ||
name: rbac-policy | ||
- name: dynamic-plugins-npmrc | ||
secret: | ||
defaultMode: 420 | ||
optional: true | ||
secretName: dynamic-plugins-npmrc | ||
initContainers: | ||
- name: install-dynamic-plugins | ||
image: '{{ include "backstage.image" . }}' | ||
command: | ||
- ./install-dynamic-plugins.sh | ||
- /dynamic-plugins-root | ||
env: | ||
- name: NPM_CONFIG_USERCONFIG | ||
value: /opt/app-root/src/.npmrc.dynamic-plugins | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /dynamic-plugins-root | ||
name: dynamic-plugins-root | ||
- mountPath: /opt/app-root/src/dynamic-plugins.yaml | ||
name: dynamic-plugins | ||
readOnly: true | ||
subPath: dynamic-plugins.yaml | ||
- mountPath: /opt/app-root/src/.npmrc.dynamic-plugins | ||
name: dynamic-plugins-npmrc | ||
readOnly: true | ||
subPath: .npmrc | ||
workingDir: /opt/app-root/src |
61 changes: 61 additions & 0 deletions
61
ci-scripts/rhdh-setup/template/backstage/helm/extravolume-patch-1.2.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,61 @@ | ||
--- | ||
extraVolumeMounts: | ||
- name: dynamic-plugins-root | ||
mountPath: /opt/app-root/src/dynamic-plugins-root | ||
- name: diststatic | ||
mountPath: /opt/app-root/src/packages/app/dist/static | ||
- name: rbac-policy | ||
mountPath: /opt/app-root/src/rbac | ||
extraVolumes: | ||
- name: dynamic-plugins-root | ||
ephemeral: | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
# -- Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins. | ||
storage: 2Gi | ||
- name: dynamic-plugins | ||
configMap: | ||
defaultMode: 420 | ||
name: dynamic-plugins | ||
optional: true | ||
- name: rbac-policy | ||
configMap: | ||
defaultMode: 420 | ||
name: rbac-policy | ||
- name: dynamic-plugins-npmrc | ||
secret: | ||
defaultMode: 420 | ||
optional: true | ||
secretName: dynamic-plugins-npmrc | ||
- name: npmcacache | ||
emptyDir: {} | ||
- name: diststatic | ||
emptyDir: {} | ||
initContainers: | ||
- name: install-dynamic-plugins | ||
image: '{{ include "backstage.image" . }}' | ||
command: | ||
- ./install-dynamic-plugins.sh | ||
- /dynamic-plugins-root | ||
env: | ||
- name: NPM_CONFIG_USERCONFIG | ||
value: /opt/app-root/src/.npmrc.dynamic-plugins | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /dynamic-plugins-root | ||
name: dynamic-plugins-root | ||
- mountPath: /opt/app-root/src/dynamic-plugins.yaml | ||
name: dynamic-plugins | ||
readOnly: true | ||
subPath: dynamic-plugins.yaml | ||
- mountPath: /opt/app-root/src/.npmrc.dynamic-plugins | ||
name: dynamic-plugins-npmrc | ||
readOnly: true | ||
subPath: .npmrc | ||
- mountPath: /opt/app-root/src/.npm/_cacache | ||
name: npmcacache | ||
workingDir: /opt/app-root/src |
3 changes: 3 additions & 0 deletions
3
ci-scripts/rhdh-setup/template/backstage/helm/rbac-plugin-patch.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,3 @@ | ||
--- | ||
- package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-rbac | ||
disabled: false |
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,11 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: rbac-policy | ||
data: | ||
rbac-policy.csv: | | ||
p, role:default/perf_admin, kubernetes.proxy, use, allow | ||
p, role:default/perf_admin, catalog-entity, read, allow | ||
p, role:default/perf_admin, catalog.entity.create, create, allow | ||
p, role:default/perf_admin, catalog.location.create, create, allow | ||
p, role:default/perf_admin, catalog.location.read, read, allow |