Skip to content

Commit

Permalink
metal3: fix config for disabled provisioning network (#30)
Browse files Browse the repository at this point in the history
Currently the defaults assume a provisioning network is enabled, and
it's not possible to disable because some containers crashloop
waiting for PROVISIONING_IP to be ready.

To resolve this we can optionally set the PROVISIONING_IP to the
hostIP, which allows a configuration like this to run without any
dedicated provisioning network:

  global:
    enable_dnsmasq: false
    enable_pxe_boot: false
    provisioningInterface: ""
    provisioningIP: ""

Note this will only work for virtualmedia deployments since PXE is
disabled in this mode.
  • Loading branch information
hardys authored Sep 8, 2023
1 parent ee6ad66 commit 3bc43f3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
Binary file modified assets/metal3-deploy/metal3-deploy-0.1.0.tgz
Binary file not shown.
18 changes: 12 additions & 6 deletions charts/metal3-deploy/0.1.0/charts/ironic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ spec:
name: {{ .configMapRefname }}
{{- end }}
{{- end }}
{{- if .env }}
{{- if or .env (and .requireProvisioningIP (eq $.Values.global.provisioningIP "")) }}
env:
{{- range .env }}
{{- range .env }}
- name: {{ .name }}
valueFrom:
{{- if .secretKeyRefKey }}
{{- if .secretKeyRefKey }}
secretKeyRef:
key: {{ .secretKeyRefKey }}
name: {{ .secretKeyRefName }}
Expand All @@ -90,9 +90,15 @@ spec:
configMapKeyRef:
key: {{ .configMapKeyRefKey }}
name: {{ .configMapKeyRefName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if and .requireProvisioningIP (eq $.Values.global.provisioningIP "") }}
- name: PROVISIONING_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- end }}
{{- end }}
{{- if .execCommand }}
livenessProbe:
exec:
Expand Down
3 changes: 3 additions & 0 deletions charts/metal3-deploy/0.1.0/charts/ironic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ ironic:
- name: MARIADB_PASSWORD
secretKeyRefKey: password
secretKeyRefName: ironic-mariadb
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand All @@ -395,6 +396,7 @@ ironic:
secretKeyRefName: ironic-mariadb
envFrom:
- configMapRefname: ironic-bmo
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand All @@ -411,6 +413,7 @@ ironic:
command: /bin/runhttpd
envFrom:
- configMapRefname: ironic-bmo
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand Down
18 changes: 12 additions & 6 deletions packages/ironic/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ spec:
name: {{ .configMapRefname }}
{{- end }}
{{- end }}
{{- if .env }}
{{- if or .env (and .requireProvisioningIP (eq $.Values.global.provisioningIP "")) }}
env:
{{- range .env }}
{{- range .env }}
- name: {{ .name }}
valueFrom:
{{- if .secretKeyRefKey }}
{{- if .secretKeyRefKey }}
secretKeyRef:
key: {{ .secretKeyRefKey }}
name: {{ .secretKeyRefName }}
Expand All @@ -90,9 +90,15 @@ spec:
configMapKeyRef:
key: {{ .configMapKeyRefKey }}
name: {{ .configMapKeyRefName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if and .requireProvisioningIP (eq $.Values.global.provisioningIP "") }}
- name: PROVISIONING_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{- end }}
{{- end }}
{{- if .execCommand }}
livenessProbe:
exec:
Expand Down
6 changes: 5 additions & 1 deletion packages/ironic/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ ironic:
- name: MARIADB_PASSWORD
secretKeyRefKey: password
secretKeyRefName: ironic-mariadb
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand All @@ -395,6 +396,7 @@ ironic:
secretKeyRefName: ironic-mariadb
envFrom:
- configMapRefname: ironic-bmo
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand All @@ -411,6 +413,7 @@ ironic:
command: /bin/runhttpd
envFrom:
- configMapRefname: ironic-bmo
requireProvisioningIP: true
image:
repository: registry.opensuse.org/isv/metal3/bci/ironic/containerfile/suse/ironic
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -450,6 +453,7 @@ persistence:
# size of the ironic shared volume
size: "1Gi"
# accessMode of the ironic shared volume PVC
accessMode: "ReadWriteMany"
# If empty defaults to ReadWriteOnce when replicaCount=1 otherwise ReadWriteMany
accessMode: ""
# flag to indicate to keep pvc upon helm uninstall
keep: false

0 comments on commit 3bc43f3

Please sign in to comment.