feat: Add version/metadata API endpoint
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -16,14 +16,16 @@
|
||||
{ 'components': (
|
||||
metacluster_chartvalues |
|
||||
combine({ 'clusterapi': components.clusterapi }) |
|
||||
combine({ 'kubevip' : components.kubevip }) )
|
||||
combine({ 'kubevip' : components.kubevip }) ),
|
||||
'appliance': {
|
||||
'version': (applianceversion)
|
||||
}
|
||||
} | to_nice_yaml(indent=2, width=4096)
|
||||
}}
|
||||
|
||||
- name: Aggregate chart_values into dict
|
||||
ansible.builtin.set_fact:
|
||||
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | default('') | from_yaml) } }) }}"
|
||||
# when: item.value.chart_values is defined
|
||||
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
@ -0,0 +1,27 @@
|
||||
- block:
|
||||
- name: Install json-server chart
|
||||
kubernetes.core.helm:
|
||||
name: json-server
|
||||
chart_ref: /opt/metacluster/helm-charts/json-server
|
||||
release_namespace: json-server
|
||||
create_namespace: true
|
||||
wait: false
|
||||
kubeconfig: "{{ kubeconfig.path }}"
|
||||
values: "{{ components['json-server'].chart_values }}"
|
||||
|
||||
- name: Ensure json-server API availability
|
||||
ansible.builtin.uri:
|
||||
url: https://version.{{ vapp['metacluster.fqdn'] }}/healthz
|
||||
method: GET
|
||||
register: api_readycheck
|
||||
until:
|
||||
- api_readycheck.json.status is defined
|
||||
- api_readycheck.json.status == 'running'
|
||||
retries: "{{ playbook.retries }}"
|
||||
delay: "{{ (storage_benchmark | int) * (playbook.delay.long | int) }}"
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
validate_certs: no
|
||||
status_code: [200, 201]
|
||||
body_format: json
|
@ -1,5 +1,6 @@
|
||||
- import_tasks: init.yml
|
||||
- import_tasks: k3s.yml
|
||||
- import_tasks: json-server.yml
|
||||
- import_tasks: assets.yml
|
||||
- import_tasks: kube-vip.yml
|
||||
- import_tasks: storage.yml
|
||||
|
Reference in New Issue
Block a user