Skip to content

Commit 32f139b

Browse files
Dixit SathwaraDixit Sathwara
authored andcommitted
[patch] add the new var
1 parent 3cf0b9c commit 32f139b

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/mas/devops/preinstall_rbac.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
DEFAULT_PREINSTALL_MAS_RBAC_ROOT = "/opt/app-root/rbac"
2323

2424

25-
def _validate_preinstall_mas_rbac_permission_mode(permissionMode: str) -> None:
26-
if permissionMode not in {"cluster", "namespaced", "minimal"}:
27-
raise ValueError(f"Unsupported permission mode: {permissionMode}")
28-
29-
3025
def _validate_selected_apps(selectedApps: list[str] | None) -> set[str]:
3126
if not selectedApps:
3227
return set()
@@ -80,6 +75,11 @@ def _should_apply_preinstall_mas_rbac_file(fileName: str, permissionMode: str) -
8075
if not (lowerName.endswith(".yml") or lowerName.endswith(".yaml")):
8176
return False
8277

78+
# TODO: Sort out this openshift-ingress exception properly.
79+
# For now, always apply this manifest in any permission mode.
80+
if lowerName == "role-essential-core-entitymgr-suite-openshift-ingress.yaml":
81+
return True
82+
8383
if permissionMode == "cluster":
8484
return lowerName.startswith("cluster-role-")
8585

@@ -164,7 +164,7 @@ def _discover_preinstall_mas_rbac_files(
164164
)
165165
)
166166

167-
return sorted(set(manifestFiles))
167+
return list(dict.fromkeys(manifestFiles))
168168

169169

170170
def _get_preinstall_mas_rbac_namespaces(masInstanceId: str, permissionMode: str, selectedApps: set[str]) -> set[str]:

src/mas/devops/templates/pipelinerun-install.yml.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,10 @@ spec:
561561
- name: mas_permission_mode
562562
value: "{{ mas_permission_mode }}"
563563
{%- endif %}
564+
{%- if mas_internal_certificate_issuer_kind is defined and mas_internal_certificate_issuer_kind != "" %}
565+
- name: mas_internal_certificate_issuer_kind
566+
value: "{{ mas_internal_certificate_issuer_kind }}"
567+
{%- endif %}
564568

565569
# MAS Workspace
566570
# -------------------------------------------------------------------------

0 commit comments

Comments
 (0)