Migrate to v1alpha5 resources

This commit is contained in:
Matt Pryor 2022-04-29 15:26:37 +01:00
parent b6ea2791c3
commit eb42ecf8bd
6 changed files with 20 additions and 13 deletions

View File

@ -1,5 +1,5 @@
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackCluster
metadata:
name: {{ include "openstack-cluster.clusterName" . }}
@ -33,7 +33,8 @@ spec:
{{- end }}
{{- end }}
{{- with .Values.apiServer }}
managedAPIServerLoadBalancer: {{ .enableLoadBalancer }}
apiServerLoadBalancer:
enabled: {{ .enableLoadBalancer }}
disableAPIServerFloatingIP: {{ not .associateFloatingIP }}
{{- with .floatingIP }}
apiServerFloatingIP: {{ . }}

View File

@ -11,6 +11,6 @@ spec:
kind: KubeadmControlPlane
name: {{ include "openstack-cluster.componentName" (list . "control-plane") }}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackCluster
name: {{ include "openstack-cluster.clusterName" . }}

View File

@ -79,7 +79,7 @@ spec:
labels: {{ include "openstack-cluster.controlPlaneSelectorLabels" . | nindent 8 }}
infrastructureRef:
kind: OpenStackMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
name: {{ include "openstack-cluster.controlplane.mt.name" . }}
{{- with .Values.controlPlane.nodeDrainTimeout }}
nodeDrainTimeout: {{ . }}

View File

@ -15,11 +15,14 @@ template:
{{- end }}
{{- if gt (float64 .Values.controlPlane.machineRootVolumeSize) 0.0 }}
rootVolume:
sourceType: image
sourceUUID: {{ .Values.machineImageId | required ".Values.machineImageId is required when using a root volume" }}
diskSize: {{ .Values.controlPlane.machineRootVolumeSize }}
{{- end }}
{{- if .Values.machineImageId }}
imageUUID: {{ .Values.machineImageId }}
{{- else if .Values.machineImage }}
image: {{ tpl .Values.machineImage . }}
{{- else }}
image: {{ tpl (required ".Values.machineImage is required when not using a root volume" .Values.machineImage) . }}
{{- fail "Either machineImage or machineImageId is required" }}
{{- end }}
{{- with .Values.controlPlane.machineNetworking.networks }}
networks: {{ toYaml . | nindent 6 }}
@ -38,7 +41,7 @@ template:
{{- include "openstack-cluster.componentName" (list . "control-plane") }}-{{ trunc 8 $checksum }}
{{- end }}
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackMachineTemplate
metadata:
name: {{ include "openstack-cluster.controlplane.mt.name" . }}

View File

@ -46,7 +46,7 @@ spec:
kind: KubeadmConfigTemplate
name: {{ include "openstack-cluster.nodegroup.kct.name" (list $ $nodeGroup) }}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackMachineTemplate
name: {{ include "openstack-cluster.nodegroup.mt.name" (list $ $nodeGroup) }}
nodeDrainTimeout: {{ $nodeGroup.nodeDrainTimeout }}

View File

@ -17,11 +17,14 @@ template:
{{- end }}
{{- if gt (float64 $nodeGroup.machineRootVolumeSize) 0.0 }}
rootVolume:
sourceType: image
sourceUUID: {{ $ctx.Values.machineImageId | required ".Values.machineImageId is required when using a root volume" }}
diskSize: {{ $nodeGroup.machineRootVolumeSize }}
{{- end }}
{{- if $ctx.Values.machineImageId }}
imageUUID: {{ $ctx.Values.machineImageId }}
{{- else if $ctx.Values.machineImage }}
image: {{ tpl $ctx.Values.machineImage $ctx }}
{{- else }}
image: {{ tpl (required ".Values.machineImage is required when not using a root volume" $ctx.Values.machineImage) $ctx }}
{{- fail "Either machineImage or machineImageId is required" }}
{{- end }}
{{- with $nodeGroup.machineNetworking.networks }}
networks: {{ toYaml . | nindent 6 }}
@ -45,7 +48,7 @@ template:
{{- range $nodeGroupOverrides := .Values.nodeGroups }}
{{- $nodeGroup := deepCopy $.Values.nodeGroupDefaults | mustMerge $nodeGroupOverrides }}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackMachineTemplate
metadata:
name: {{ include "openstack-cluster.nodegroup.mt.name" (list $ $nodeGroup) }}