Skip to content

Commit

Permalink
abort if operator is not allowed to do it
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed May 2, 2022
1 parent 928d886 commit 69c563f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions roles/default/kiali-deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@
# restrict to 40 chars, not 63, because instance_name is a prefix and we need to prepend additional chars for some resource names (like "-service-account")
- kiali_vars.deployment.instance_name is not regex('^(?![0-9]+$)(?!-)[a-z0-9-]{,40}(?<!-)$')

- name: Only allow ad-hoc containers when appropriate
fail:
msg: "The operator is forbidden from installing additional containers into the Kiali pod."
when:
- kiali_vars.deployment.additional_pod_containers_yaml|length > 0
- lookup('env', 'ALLOW_AD_HOC_CONTAINERS') | default('false', True) != "true"

- set_fact:
status_environment: "{{ status_environment | default({}) | combine({item.0: item.1}) }}"
loop: "{{ data[0] | zip(data[1]) | list }}"
Expand Down

0 comments on commit 69c563f

Please sign in to comment.