Skip to content

Commit

Permalink
use correct conditional policy location in app-config
Browse files Browse the repository at this point in the history
rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
Omar-AlJaljuli committed Jan 28, 2025
1 parent 13c1ba6 commit 9ea2d71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ibm/pipelines/jobs/operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ initiate_operator_deployments() {
deploy_rhdh_operator "${DIR}" "${NAME_SPACE}"

configure_namespace "${NAME_SPACE_RBAC}"
prepare_operator_app_config "${DIR}/resources/config_map/app-config-rhdh-rbac.yaml"
local rbac_rhdh_base_url="https://backstage-${RELEASE_NAME_RBAC}-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${rbac_rhdh_base_url}"
create_dynamic_plugins_config "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "/tmp/configmap-dynamic-plugins-rbac.yaml"
Expand Down
9 changes: 8 additions & 1 deletion .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,15 @@ data:

create_conditional_policies_operator() {
local destination_file=$1
yq '.upstream.backstage.initContainers[0].command[2]' "${DIR}/value_files/values_showcase-rbac.yaml" | head -n -4 | tail -n +2 > ${destination_file}
yq '.upstream.backstage.initContainers[0].command[2]' "${DIR}/value_files/values_showcase-rbac.yaml" | head -n -4 | tail -n +2 > $destination_file
sed -i 's/\\\$/\$/g' $destination_file
}

prepare_operator_app_config() {
local config_file=$1
yq e -i '.permission.rbac.conditionalPoliciesFile = "./rbac/conditional-policies.yaml"' ${config_file}
}

create_app_config_map_k8s() {
local config_file=$1
local project=$2
Expand Down

0 comments on commit 9ea2d71

Please sign in to comment.