Compare commits
4 Commits
419e8a0814
...
44a6a19b56
Author | SHA256 | Date | |
---|---|---|---|
44a6a19b56
|
|||
0abc65b0b3
|
|||
82b1d2effd
|
|||
e8397cec19
|
@@ -61,3 +61,19 @@ Create the name of the service account to use
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the URL to use for connecting to the Ironic servers (e.g. API, cache)
|
||||
*/}}
|
||||
{{- define "baremetal-operator.ironicHttpHost" -}}
|
||||
{{- $ironicIP := include "metal3.provisioningIP" . -}}
|
||||
{{- with .Values.global }}
|
||||
{{- if .provisioningHostname }}
|
||||
{{- .provisioningHostname }}
|
||||
{{- else if regexMatch ".*:.*" $ironicIP}}
|
||||
{{- print "[" $ironicIP "]" }}
|
||||
{{- else }}
|
||||
{{- $ironicIP }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
{{- $enableTLS := .Values.global.enable_tls }}
|
||||
{{- $enableVMediaTLS := .Values.global.enable_vmedia_tls }}
|
||||
{{- $protocol := ternary "https" "http" $enableTLS }}
|
||||
{{- $ironicIP := .Values.global.ironicIP | default "" }}
|
||||
{{- $ironicApiHost := print $ironicIP ":6385" }}
|
||||
{{- $ironicBootHost := print $ironicIP ":6180" }}
|
||||
{{- $ironicCacheHost := print $ironicIP ":6180" }}
|
||||
{{- $ironicHost := include "baremetal-operator.ironicHttpHost" . | required "Missing host information for BMO to connect to Ironic" }}
|
||||
{{- $ironicApiHost := print $ironicHost ":6385" }}
|
||||
{{- $ironicBootHost := print $ironicHost ":6180" }}
|
||||
{{- $ironicCacheHost := print $ironicHost ":6180" }}
|
||||
{{- $deployArch := .Values.global.deployArchitecture }}
|
||||
|
||||
apiVersion: v1
|
||||
@@ -12,8 +12,8 @@ data:
|
||||
IRONIC_ENDPOINT: "{{ $protocol }}://{{ $ironicApiHost }}/v1/"
|
||||
# Switch VMedia to HTTP if enable_vmedia_tls is false
|
||||
{{- if and $enableTLS $enableVMediaTLS }}
|
||||
{{- $ironicBootHost = print $ironicIP ":" .Values.global.vmediaTLSPort }}
|
||||
{{- $ironicCacheHost = print $ironicIP ":" .Values.global.vmediaTLSPort }}
|
||||
{{- $ironicBootHost = print $ironicHost ":" .Values.global.vmediaTLSPort }}
|
||||
{{- $ironicCacheHost = print $ironicHost ":" .Values.global.vmediaTLSPort }}
|
||||
{{- $protocol = "https" }}
|
||||
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
||||
{{- else }}
|
||||
|
@@ -96,3 +96,19 @@ Get the formatted "External" hostname or IP address
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the subjectAltNames section to be set on the Certificate
|
||||
*/}}
|
||||
{{- define "ironic.subjectAltNames" -}}
|
||||
{{- with .Values.global }}
|
||||
{{- if .provisioningHostname }}
|
||||
dnsNames:
|
||||
- {{ .provisioningHostname }}
|
||||
{{- end -}}
|
||||
{{- if or .ironicIP .provisioningIP }}
|
||||
ipAddresses:
|
||||
- {{ coalesce .ironicIP .provisioningIP }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@@ -6,8 +6,7 @@ metadata:
|
||||
spec:
|
||||
commonName: ironic-ca
|
||||
isCA: true
|
||||
ipAddresses:
|
||||
- {{ .Values.global.ironicIP }}
|
||||
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||
issuerRef:
|
||||
kind: Issuer
|
||||
name: selfsigned-issuer
|
||||
@@ -19,8 +18,7 @@ metadata:
|
||||
name: ironic-cert
|
||||
spec:
|
||||
commonName: ironic-cert
|
||||
ipAddresses:
|
||||
- {{ .Values.global.ironicIP }}
|
||||
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||
issuerRef:
|
||||
kind: Issuer
|
||||
name: ca-issuer
|
||||
@@ -33,8 +31,7 @@ metadata:
|
||||
name: ironic-vmedia-cert
|
||||
spec:
|
||||
commonName: ironic-vmedia-cert
|
||||
ipAddresses:
|
||||
- {{ .Values.global.ironicIP }}
|
||||
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||
issuerRef:
|
||||
kind: Issuer
|
||||
name: ca-issuer
|
||||
|
@@ -34,16 +34,13 @@ data:
|
||||
{{- if .Values.global.provisioningInterface }}
|
||||
PROVISIONING_INTERFACE: {{ .Values.global.provisioningInterface }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.provisioningIP }}
|
||||
PROVISIONING_IP: {{ .Values.global.provisioningIP }}
|
||||
{{- if or .Values.global.ironicIP .Values.global.provisioningIP }}
|
||||
PROVISIONING_IP: {{ include "metal3.provisioningIP" . }}
|
||||
{{- else if .Values.global.provisioningHostname }}
|
||||
IRONIC_URL_HOSTNAME: {{ .Values.global.provisioningHostname }}
|
||||
{{- end }}
|
||||
IRONIC_FAST_TRACK: "true"
|
||||
LISTEN_ALL_INTERFACES: "true"
|
||||
{{- if .Values.global.ironicIP }}
|
||||
IRONIC_IP: {{ .Values.global.ironicIP }}
|
||||
{{- end }}
|
||||
LISTEN_ALL_INTERFACES: {{ .Values.global.listenOnAll }}
|
||||
{{- if ( .Values.global.enable_tls ) }}
|
||||
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
||||
IRONIC_KERNEL_PARAMS: {{ .Values.global.ironicKernelParams }} tls.enabled=true
|
||||
|
@@ -58,6 +58,8 @@ global:
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
listenOnAll: "true"
|
||||
|
||||
images:
|
||||
ironic:
|
||||
repository: registry.opensuse.org/isv/suse/edge/metal3/containers/images/ironic
|
||||
|
@@ -60,3 +60,18 @@ Create the name of the service account to use
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Produce the correct IP or hostname for Ironic provisioning
|
||||
*/}}
|
||||
{{- define "metal3.provisioningIP" -}}
|
||||
{{- with .Values.global }}
|
||||
{{- if and .provisioningHostname (or .provisioningIP .ironicIP) }}
|
||||
{{ fail "Please provide either provisioningHostname or provisioningIP (note: ironic IP is deprecated)" }}
|
||||
{{- end }}
|
||||
{{- if and .provisioningIP .ironicIP }}
|
||||
{{ fail "Please provide either ironicIP or provisioningIP (note: ironicIP is deprecated)" }}
|
||||
{{- end }}
|
||||
{{- coalesce .ironicIP .provisioningIP }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
Reference in New Issue
Block a user