-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding new variables for redhat hybrid cloud console shipping
simplifying configmap and secret setup making pvc creation conditional on ship_target type being directory
- Loading branch information
Showing
6 changed files
with
96 additions
and
36 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
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 |
---|---|---|
@@ -1,23 +1,42 @@ | ||
--- | ||
# Check to make sure provided pvc exists, error loudly if not. Otherwise, the management pod will just stay in pending state forever. | ||
- name: Check provided PVC claim exists | ||
kubernetes.core.k8s_info: | ||
name: "{{ _metrics_utility_pvc_claim }}" | ||
kind: PersistentVolumeClaim | ||
namespace: "{{ ansible_operator_meta.namespace }}" | ||
when: | ||
- _metrics_utility_pvc_claim | length | ||
- name: Setup PVC if using directory ship target | ||
block: | ||
|
||
- name: Create PVC for metrics-utility | ||
# Check to make sure provided pvc exists | ||
- name: Check provided PVC claim exists | ||
kubernetes.core.k8s_info: | ||
name: "{{ _metrics_utility_pvc_claim }}" | ||
kind: PersistentVolumeClaim | ||
namespace: "{{ ansible_operator_meta.namespace }}" | ||
when: | ||
- _metrics_utility_pvc_claim | length | ||
|
||
- name: Create PVC for metrics-utility | ||
kubernetes.core.k8s: | ||
kind: PersistentVolumeClaim | ||
definition: "{{ lookup('template', 'storage/metrics-utility.yaml.j2') }}" | ||
|
||
when: _metrics_utility_ship_target == "directory" | ||
|
||
- name: Create default metrics-utility Kubernetes CronJobs | ||
kubernetes.core.k8s: | ||
kind: PersistentVolumeClaim | ||
definition: "{{ lookup('template', 'storage/metrics-utility.yaml.j2') }}" | ||
definition: "{{ lookup('template', item.template) }}" | ||
apply: true | ||
wait: true | ||
vars: | ||
cronjob_name: "{{ item.name }}" | ||
loop: | ||
- {name: 'metrics-utility-gather', template: 'cronjobs/metrics-utility-gather.yaml.j2'} | ||
- {name: 'metrics-utility-report', template: 'cronjobs/metrics-utility-report.yaml.j2'} | ||
|
||
- name: Create Kubernetes CronJobs for metrics-utility | ||
- name: Create metrics-utility Kubernetes CronJob for Red Hat Hybrid Cloud Console | ||
kubernetes.core.k8s: | ||
definition: "{{ lookup('template', item) }}" | ||
definition: "{{ lookup('template', item.template) }}" | ||
apply: true | ||
wait: true | ||
vars: | ||
cronjob_name: "{{ item.name }}" | ||
metrics_utility_ship_target: crc # TODO - Update to console when changed | ||
loop: | ||
- cronjobs/metrics-utility-gather.yaml.j2 | ||
- cronjobs/metrics-utility-report.yaml.j2 | ||
- {name: 'metrics-utility-gather-console', template: 'cronjobs/metrics-utility-gather.yaml.j2'} | ||
when: _metrics_utility_console_enabled |
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