Skip to content

Commit

Permalink
executor: Validate configMaps and secrets present inside cluster or n…
Browse files Browse the repository at this point in the history
…ot (#984)

Signed-off-by: Amit Bhatt <[email protected]>
  • Loading branch information
amitbhatt818 authored and Karthik Satchitanand committed Dec 9, 2019
1 parent 0b1e14f commit 62eedb3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions executor/experiment_volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
executable: /bin/bash
register: c_mount_path_configmap

- name: validate configmap present inside cluster or not.
shell: >
kubectl get configmaps -n {{c_app_ns}} --no-headers -o=custom-columns=NAME:".metadata.name"
args:
executable: /bin/bash
register: config_present

- name: Check existence of config map
fail:
msg: "config map {{ item }} doesn't exist in cluster"
when: item not in config_present.stdout_lines
with_items: "{{ c_map_name.stdout_lines }}"

when: configMap_defined != ''

- block:
Expand Down

0 comments on commit 62eedb3

Please sign in to comment.