Skip to content

Commit 13234fc

Browse files
author
Malte Münch
authored
Merge pull request #1 from SovereignCloudStack/yawol
Updates for yawol LoadBalancer
2 parents 0507cce + 8069ab2 commit 13234fc

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
22
name: csp-helper-chart
33
description: A Helm chart to deploy SCS cluster-api-provider-v2 per-tenant resources
4-
version: 0.2.0
5-
appVersion: "0.2.0"
4+
version: 0.4.0
5+
appVersion: "0.4.0"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# openstack-csp-helper
2-
31
This chart can be used to create a new namespace and two secrets for the clusterstacks approach. It reads clouds.yaml files in its raw form either with username and password or with an application credential. The chart is intended to be used once per Openstack-Project/Tenant. It is meant to prepare one corresponding namespace in the cluster-API management cluster (1:1 relation between openstackproject and cluster-namespace). The recommended way to invoke the chart is:
42

53
```
6-
helm upgrade -i <tenant>-credentials -n <tenant> --create-namespace https://github.com/SovereignCloudStack/openstack-csp-helper/releases/download/v0.3.0/v0.3.0.tgz -f clouds.yaml
4+
helm upgrade -i <tenant>-credentials -n <tenant> --create-namespace https://github.com/SovereignCloudStack/openstack-csp-helper/releases/latest/download/openstack-csp-helper.tgz -f clouds.yaml
75
```
6+
7+
If using the Wooctavia cluster stack, add `--set yawol=true` to the helm command.

templates/_helpers.tpl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Checks whether we have a regular clouds.yaml or one with application credentials
3636
{{ get (get (get .Values.clouds (include "cloud_name" .)) "auth") "user_domain_name" }}
3737
{{- end }}
3838

39+
{{- define "auth_domain_name" -}}
40+
{{ get (get (get .Values.clouds (include "cloud_name" .)) "auth") "domain_name" }}
41+
{{- end }}
42+
3943
{{- define "auth_application_credential_id" -}}
4044
{{ get (get (get .Values.clouds (include "cloud_name" .)) "auth") "application_credential_id" }}
4145
{{- end }}
@@ -49,12 +53,12 @@ Checks whether we have a regular clouds.yaml or one with application credentials
4953
{{- end }}
5054

5155
{{- define "isAppCredential" -}}
52-
{{- if and
53-
( include "auth_username" .)
56+
{{- if and
57+
( include "auth_username" .)
5458
(not ( include "auth_application_credential_id" . ))
5559
-}}
56-
{{- else if and
57-
( not ( include "auth_username" . ))
60+
{{- else if and
61+
( not ( include "auth_username" . ))
5862
( include "auth_application_credential_id" . )
5963
-}}
6064
true
@@ -77,12 +81,14 @@ application-credential-secret={{ include "auth_application_credential_secret" .
7781
username={{ include "auth_username" . }}
7882
password={{ include "auth_password" . }}
7983
user-domain-name={{ include "auth_user_domain_name" . }}
84+
domain-name={{ default (include "auth_user_domain_name" .) (include "auth_domain_name" .) }}
8085
tenant-id={{ include "auth_project_id" . }}
86+
project-id={{ include "auth_project_id" . }}
8187
{{ end }}
8288

8389
[LoadBalancer]
90+
enabled={{ not (.Values.yawol | default false) }}
8491
manage-security-groups=true
85-
use-octavia=true
8692
enable-ingress-hostname=true
8793
create-monitor=true
8894
{{- end }}
@@ -96,6 +102,9 @@ Templates the secret that contains cloud.conf as needed by the openstack CCM
96102
apiVersion: v1
97103
data:
98104
cloud.conf: {{ include "cloud.conf" . | b64enc }}
105+
{{- if .Values.yawol }}
106+
cloudprovider.conf: {{ include "cloud.conf" . | b64enc }}
107+
{{- end }}
99108
kind: Secret
100109
metadata:
101110
name: cloud-config

0 commit comments

Comments
 (0)