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 }}
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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 }}
|
{{- $enableTLS := .Values.global.enable_tls }}
|
||||||
{{- $enableVMediaTLS := .Values.global.enable_vmedia_tls }}
|
{{- $enableVMediaTLS := .Values.global.enable_vmedia_tls }}
|
||||||
{{- $protocol := ternary "https" "http" $enableTLS }}
|
{{- $protocol := ternary "https" "http" $enableTLS }}
|
||||||
{{- $ironicIP := .Values.global.ironicIP | default "" }}
|
{{- $ironicHost := include "baremetal-operator.ironicHttpHost" . | required "Missing host information for BMO to connect to Ironic" }}
|
||||||
{{- $ironicApiHost := print $ironicIP ":6385" }}
|
{{- $ironicApiHost := print $ironicHost ":6385" }}
|
||||||
{{- $ironicBootHost := print $ironicIP ":6180" }}
|
{{- $ironicBootHost := print $ironicHost ":6180" }}
|
||||||
{{- $ironicCacheHost := print $ironicIP ":6180" }}
|
{{- $ironicCacheHost := print $ironicHost ":6180" }}
|
||||||
{{- $deployArch := .Values.global.deployArchitecture }}
|
{{- $deployArch := .Values.global.deployArchitecture }}
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -12,8 +12,8 @@ data:
|
|||||||
IRONIC_ENDPOINT: "{{ $protocol }}://{{ $ironicApiHost }}/v1/"
|
IRONIC_ENDPOINT: "{{ $protocol }}://{{ $ironicApiHost }}/v1/"
|
||||||
# Switch VMedia to HTTP if enable_vmedia_tls is false
|
# Switch VMedia to HTTP if enable_vmedia_tls is false
|
||||||
{{- if and $enableTLS $enableVMediaTLS }}
|
{{- if and $enableTLS $enableVMediaTLS }}
|
||||||
{{- $ironicBootHost = print $ironicIP ":" .Values.global.vmediaTLSPort }}
|
{{- $ironicBootHost = print $ironicHost ":" .Values.global.vmediaTLSPort }}
|
||||||
{{- $ironicCacheHost = print $ironicIP ":" .Values.global.vmediaTLSPort }}
|
{{- $ironicCacheHost = print $ironicHost ":" .Values.global.vmediaTLSPort }}
|
||||||
{{- $protocol = "https" }}
|
{{- $protocol = "https" }}
|
||||||
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
@@ -96,3 +96,19 @@ Get the formatted "External" hostname or IP address
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- 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:
|
spec:
|
||||||
commonName: ironic-ca
|
commonName: ironic-ca
|
||||||
isCA: true
|
isCA: true
|
||||||
ipAddresses:
|
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||||
- {{ .Values.global.ironicIP }}
|
|
||||||
issuerRef:
|
issuerRef:
|
||||||
kind: Issuer
|
kind: Issuer
|
||||||
name: selfsigned-issuer
|
name: selfsigned-issuer
|
||||||
@@ -19,8 +18,7 @@ metadata:
|
|||||||
name: ironic-cert
|
name: ironic-cert
|
||||||
spec:
|
spec:
|
||||||
commonName: ironic-cert
|
commonName: ironic-cert
|
||||||
ipAddresses:
|
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||||
- {{ .Values.global.ironicIP }}
|
|
||||||
issuerRef:
|
issuerRef:
|
||||||
kind: Issuer
|
kind: Issuer
|
||||||
name: ca-issuer
|
name: ca-issuer
|
||||||
@@ -33,8 +31,7 @@ metadata:
|
|||||||
name: ironic-vmedia-cert
|
name: ironic-vmedia-cert
|
||||||
spec:
|
spec:
|
||||||
commonName: ironic-vmedia-cert
|
commonName: ironic-vmedia-cert
|
||||||
ipAddresses:
|
{{- include "ironic.subjectAltNames" . | indent 2 }}
|
||||||
- {{ .Values.global.ironicIP }}
|
|
||||||
issuerRef:
|
issuerRef:
|
||||||
kind: Issuer
|
kind: Issuer
|
||||||
name: ca-issuer
|
name: ca-issuer
|
||||||
|
@@ -34,16 +34,13 @@ data:
|
|||||||
{{- if .Values.global.provisioningInterface }}
|
{{- if .Values.global.provisioningInterface }}
|
||||||
PROVISIONING_INTERFACE: {{ .Values.global.provisioningInterface }}
|
PROVISIONING_INTERFACE: {{ .Values.global.provisioningInterface }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.global.provisioningIP }}
|
{{- if or .Values.global.ironicIP .Values.global.provisioningIP }}
|
||||||
PROVISIONING_IP: {{ .Values.global.provisioningIP }}
|
PROVISIONING_IP: {{ include "metal3.provisioningIP" . }}
|
||||||
{{- else if .Values.global.provisioningHostname }}
|
{{- else if .Values.global.provisioningHostname }}
|
||||||
IRONIC_URL_HOSTNAME: {{ .Values.global.provisioningHostname }}
|
IRONIC_URL_HOSTNAME: {{ .Values.global.provisioningHostname }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
IRONIC_FAST_TRACK: "true"
|
IRONIC_FAST_TRACK: "true"
|
||||||
LISTEN_ALL_INTERFACES: "true"
|
LISTEN_ALL_INTERFACES: {{ .Values.global.listenOnAll }}
|
||||||
{{- if .Values.global.ironicIP }}
|
|
||||||
IRONIC_IP: {{ .Values.global.ironicIP }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if ( .Values.global.enable_tls ) }}
|
{{- if ( .Values.global.enable_tls ) }}
|
||||||
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
RESTART_CONTAINER_CERTIFICATE_UPDATED: "true"
|
||||||
IRONIC_KERNEL_PARAMS: {{ .Values.global.ironicKernelParams }} tls.enabled=true
|
IRONIC_KERNEL_PARAMS: {{ .Values.global.ironicKernelParams }} tls.enabled=true
|
||||||
|
@@ -58,6 +58,8 @@ global:
|
|||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
listenOnAll: "true"
|
||||||
|
|
||||||
images:
|
images:
|
||||||
ironic:
|
ironic:
|
||||||
repository: registry.opensuse.org/isv/suse/edge/metal3/containers/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 }}
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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