diff --git a/charts/maas/templates/bin/_start.sh.tpl b/charts/maas/templates/bin/_start.sh.tpl index af5b2d0..f5d4bef 100644 --- a/charts/maas/templates/bin/_start.sh.tpl +++ b/charts/maas/templates/bin/_start.sh.tpl @@ -52,5 +52,10 @@ done if [[ $sh_set = false ]]; then exit 1 fi +{{- if .Values.conf.maas.force_gpt }} +# Forcing the use of GPT irrespective of boot disk size +# https://github.com/maas/maas/blob/2.3/src/maasserver/models/partitiontable.py#L51-L53 +sed -i '/^GPT_REQUIRED_SIZE =/c\GPT_REQUIRED_SIZE = 0' /usr/lib/python3/dist-packages/maasserver/models/partitiontable.py +{{- end }} set -e exec /sbin/init --log-target=console 3>&1 diff --git a/charts/maas/values.yaml b/charts/maas/values.yaml index 0087799..63535d1 100644 --- a/charts/maas/values.yaml +++ b/charts/maas/values.yaml @@ -235,6 +235,12 @@ conf: secret: namespace: maas name: maas-api-key + # By default, MAAS will use MBR for boot disks smaller than 2 TiB. + # Set force_gpt: true to always use GPT. + # NOTE: This is not a standard MAAS setting, and enabling it will cause + # modification of a file during maas-region pod startup: + # /usr/lib/python3/dist-packages/maasserver/models/partitiontable.py + force_gpt: false extra_settings: # Additional settings available via maas $PROFILE maas set-config # Marks if the initial intro has been completed: true or false