-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cloud credits API to azimuth-ops
- Loading branch information
1 parent
fd1332f
commit b3ec925
Showing
4 changed files
with
105 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
|
||
# The chart to use | ||
coral_credits_chart_repo: https://stackhpc.github.io/coral-credits | ||
coral_credits_chart_name: coral-credits | ||
coral_credits_chart_version: 0.3.1-dev.0.add-servicemonitor.5 | ||
|
||
# Release information for the coral credits release | ||
coral_credits_release_namespace: "{{ azimuth_release_namespace | default('azimuth') }}" | ||
coral_credits_release_name: coral-credits | ||
|
||
# The timeout to wait for coral credits API to become ready | ||
coral_credits_wait_timeout: 10m | ||
|
||
# Ingress settings | ||
# The hostname for Coral credits ingress resources | ||
coral_credits_ingress_host: >- | ||
{{- | ||
"{}.{}".format(coral_credits_ingress_subdomain, ingress_base_domain) | ||
if coral_credits_ingress_subdomain is defined and ingress_base_domain is defined | ||
else undef(hint = 'coral_credits_ingress_subdomain is required') | ||
}} | ||
# Subdomain for the Coral credits ingress host | ||
coral_credits_ingress_subdomain: "coral" | ||
# Annotations for coral_credits ingress resources | ||
coral_credits_ingress_annotations: "{{ ingress_annotations | default({}) }}" | ||
# Indicates whether TLS should be enabled | ||
coral_credits_ingress_tls_enabled: "{{ ingress_tls_enabled | default(True) }}" | ||
# The TLS secret name (can be null) | ||
coral_credits_ingress_tls_secret_name: "{{ ingress_tls_secret_name | default('coral-cedits-tls') }}" | ||
# Any TLS-specific annotations | ||
coral_credits_ingress_tls_annotations: "{{ ingress_tls_annotations | default({}) }}" | ||
# Wildcard TLS certificate, if available | ||
coral_credits_ingress_tls_certificate: "{{ ingress_tls_wildcard_certificate | default(None) }}" | ||
coral_credits_ingress_tls_key: >- | ||
{{- | ||
ingress_tls_wildcard_key | ||
if ingress_tls_wildcard_key is defined | ||
else undef(hint = 'coral_credits_ingress_tls_key is required') | ||
}} | ||
# The admin username to use for coral credits | ||
coral_credits_admin_username: admin | ||
# The admin password to use for coral credits | ||
coral_credits_admin_password: >- | ||
{{ undef(hint = 'coral_credits_admin_password is required') }} | ||
# The values for the release | ||
coral_credits_release_defaults: | ||
ingress: | ||
host: "{{ coral_credits_ingress_host }}" | ||
annotations: "{{ coral_credits_ingress_annotations }}" | ||
tls: | ||
enabled: "{{ coral_credits_ingress_tls_enabled }}" | ||
secretName: "{{ coral_credits_ingress_tls_secret_name }}" | ||
annotations: "{{ coral_credits_ingress_tls_annotations }}" | ||
settings: | ||
superuserUsername: "{{ coral_credits_admin_username }}" | ||
superuserPassword: "{{ coral_credits_admin_password }}" | ||
|
||
coral_credits_release_overrides: {} | ||
coral_credits_release_values: >- | ||
{{- | ||
coral_credits_release_defaults | | ||
combine(coral_credits_release_overrides, recursive = True) | ||
}} |
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,31 @@ | ||
--- | ||
|
||
- name: Install wildcard TLS certificate | ||
command: kubectl apply -f - | ||
args: | ||
stdin: "{{ coral_credits_ingress_tls_wildcard_secret_definition | to_nice_yaml }}" | ||
vars: | ||
coral_credits_ingress_tls_wildcard_secret_definition: | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "{{ coral_credits_ingress_tls_secret_name }}" | ||
namespace: "{{ coral_credits_release_namespace }}" | ||
type: kubernetes.io/tls | ||
stringData: | ||
tls.crt: "{{ coral_credits_ingress_tls_certificate }}" | ||
tls.key: "{{ coral_credits_ingress_tls_key }}" | ||
when: coral_credits_ingress_tls_certificate | ||
|
||
- name: Install Coral Credits API on target Kubernetes cluster | ||
kubernetes.core.helm: | ||
chart_ref: "{{ coral_credits_chart_name }}" | ||
chart_repo_url: "{{ coral_credits_chart_repo }}" | ||
chart_version: "{{ coral_credits_chart_version }}" | ||
release_namespace: "{{ coral_credits_release_namespace }}" | ||
release_name: "{{ coral_credits_release_name }}" | ||
release_values: "{{ coral_credits_release_values }}" | ||
atomic: yes | ||
create_namespace: yes | ||
wait: yes | ||
wait_timeout: "{{ coral_credits_wait_timeout }}" |