Skip to content

Commit 590ab43

Browse files
authored
Zitadel role: some leftovers from the last review. (#505)
1 parent 19b4857 commit 590ab43

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

control-plane/roles/zitadel/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ You can look up all the default values of this role [here](defaults/main.yaml).
2121
| Name | Mandatory | Description |
2222
| ------------------------- | --------- | -------------------------------------------------------------------------------------- |
2323
| zitadel_chart_version | | The chart version for deploying zitadel |
24+
| zitadel_namespace | | The namespace into which zitadel is deployed |
2425
| zitadel_init_image | yes | The zitadel-init image tag |
2526
| zitadel_init_image_tag | yes | The zitadel-init image name |
2627
| zitadel_image_tag | | An optional image overwrite for zitadel when not using the default from the helm chart |
27-
| zitadel_external_domain | | The external domain used by zitadel |
28+
| zitadel_external_domain | yes | The external domain used by zitadel |
2829
| zitadel_image_pull_policy | | The image pull policy to use for zitadel-init |
2930
| zitadel_ingress_dns | | The DNS ingress domain used for the ingress-controller |
3031
| zitadel_initial_instance | | The name of the initial instance |

control-plane/roles/zitadel/defaults/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ zitadel_init_image_tag: v0.2.0
77
zitadel_image_tag: v4.7.0
88

99
zitadel_endpoint: zitadel.{{ metal_control_plane_ingress_dns }}
10+
zitadel_namespace: "{{ metal_control_plane_namespace }}"
1011
zitadel_external_domain:
1112
zitadel_ingress_dns: https://zitadel.{{ metal_control_plane_ingress_dns }}:443
1213
zitadel_port: 443
@@ -23,8 +24,7 @@ zitadel_db_password: change-me
2324

2425
zitadel_enabled_ingress: true
2526

26-
zitadel_init_config:
27-
{}
27+
zitadel_init_config: {}
2828
# static_users:
2929
# - first_name: Olli
3030
# last_name: Owner
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
galaxy_info:
3+
role_name: zitadel
4+
author: metal-stack
5+
description: Deploys zitadel into the control plane.
6+
license: MIT
7+
min_ansible_version: "2.10"
8+
galaxy_tags: []
9+
10+
platforms:
11+
- name: GenericLinux
12+
versions:
13+
- all
14+
15+
dependencies:
16+
- role: metal-roles/common/roles/defaults
17+
- role: metal-roles/control-plane/roles/defaults

control-plane/roles/zitadel/tasks/main.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- zitadel_chart_version is not none
1414
- zitadel_init_image is not none
1515
- zitadel_init_image_tag is not none
16+
- zitadel_external_domain is not none
1617

1718
- name: Deploy static users secret
1819
kubernetes.core.k8s:
@@ -21,7 +22,7 @@
2122
kind: Secret
2223
metadata:
2324
name: zitadel-init-config
24-
namespace: "{{ metal_control_plane_namespace }}"
25+
namespace: "{{ zitadel_namespace }}"
2526
type: Opaque
2627
stringData:
2728
config.yaml: "{{ zitadel_init_config | to_json }}"
@@ -32,7 +33,7 @@
3233
chart_ref: zitadel
3334
chart_version: "{{ zitadel_chart_version }}"
3435
chart_repo_url: https://charts.zitadel.com/
35-
release_namespace: "{{ metal_control_plane_namespace }}"
36+
release_namespace: "{{ zitadel_namespace }}"
3637
create_namespace: true
3738
values: "{{ lookup('template', 'values.yaml.j2') | from_yaml }}"
3839
wait: true
@@ -41,20 +42,20 @@
4142
kubernetes.core.k8s:
4243
state: absent
4344
definition: "{{ lookup('template', 'zitadel-init.yaml') }}"
44-
namespace: "{{ metal_control_plane_namespace }}"
45+
namespace: "{{ zitadel_namespace }}"
4546

4647
- name: Create init job
4748
kubernetes.core.k8s:
4849
state: present
4950
definition: "{{ lookup('template', 'zitadel-init.yaml') }}"
50-
namespace: "{{ metal_control_plane_namespace }}"
51+
namespace: "{{ zitadel_namespace }}"
5152

5253
- name: Wait for Secret zitadel-client-credentials
5354
kubernetes.core.k8s_info:
5455
api_version: v1
5556
kind: Secret
5657
name: zitadel-client-credentials
57-
namespace: "{{ metal_control_plane_namespace }}"
58+
namespace: "{{ zitadel_namespace }}"
5859
register: secret_info
5960
until: secret_info.resources | length > 0
6061
retries: 10

control-plane/roles/zitadel/templates/zitadel-init.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
- "--zitadel-external-domain={{ zitadel_external_domain }}"
4646
- "--zitadel-port={{ zitadel_port }}"
4747
- "--zitadel-pat=$(ZITADEL_PAT)"
48-
- "--namespace={{ metal_control_plane_namespace }}"
48+
- "--namespace={{ zitadel_namespace }}"
4949
- "--secret=zitadel-client-credentials"
5050
- "--zitadel-skip-verify-tls={{ zitadel_skip_verify_tls }}"
5151
- "--zitadel-insecure={{ zitadel_insecure }}"

0 commit comments

Comments
 (0)