-
Notifications
You must be signed in to change notification settings - Fork 640
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
- Loading branch information
Showing
6 changed files
with
129 additions
and
13 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
73 changes: 73 additions & 0 deletions
73
roles/installer/templates/cronjobs/metrics-utility-gather-console.yaml.j2
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ ansible_operator_meta.name }}-metrics-utility-gather-console | ||
namespace: '{{ ansible_operator_meta.namespace }}' | ||
labels: | ||
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-metrics-utility-gather-console' | ||
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} | ||
{{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }} | ||
spec: | ||
schedule: "{{ _metrics_utility_cronjob_gather_schedule }}" | ||
jobTemplate: | ||
spec: | ||
backoffLimit: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-metrics-utility-gather-console' | ||
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=12) | trim }} | ||
{{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=12) | trim }} | ||
spec: | ||
{% if image_pull_secret is defined %} | ||
imagePullSecrets: | ||
- name: {{ image_pull_secret }} | ||
{% elif image_pull_secrets | length > 0 %} | ||
imagePullSecrets: | ||
{% for secret in image_pull_secrets %} | ||
- name: {{ secret }} | ||
{% endfor %} | ||
{% endif %} | ||
containers: | ||
- name: {{ ansible_operator_meta.name }}-metrics-utility-gather-console | ||
image: "{{ _metrics_utility_image }}" | ||
imagePullPolicy: "{{ image_pull_policy }}" | ||
resources: | ||
requests: | ||
memory: "100Mi" | ||
cpu: "100m" | ||
command: | ||
- /bin/sh | ||
- -c | ||
- metrics-utility gather_automation_controller_billing_data --ship --until=10m | ||
envFrom: | ||
- configMapRef: | ||
name: {{ _metrics_utility_console_configmap }} | ||
{% if _metrics_utility_console_secret is defined %} | ||
- secretRef: | ||
name: {{ _metrics_utility_console_secret }} | ||
{% endif %} | ||
volumeMounts: | ||
- name: "{{ ansible_operator_meta.name }}-application-credentials" | ||
mountPath: "/etc/tower/conf.d/credentials.py" | ||
subPath: credentials.py | ||
readOnly: true | ||
- name: {{ ansible_operator_meta.name }}-settings | ||
mountPath: /etc/tower/settings.py | ||
subPath: settings.py | ||
readOnly: true | ||
volumes: | ||
- name: "{{ ansible_operator_meta.name }}-application-credentials" | ||
secret: | ||
secretName: "{{ ansible_operator_meta.name }}-app-credentials" | ||
items: | ||
- key: credentials.py | ||
path: 'credentials.py' | ||
- name: {{ ansible_operator_meta.name }}-settings | ||
configMap: | ||
name: '{{ ansible_operator_meta.name }}-{{ deployment_type }}-configmap' | ||
items: | ||
- key: settings | ||
path: settings.py | ||
restartPolicy: OnFailure |
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