Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions helm/cluster-openstack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Expand the name of the chart.
{{- end -}}

{{- define "infrastructureApiVersion" -}}
infrastructure.cluster.x-k8s.io/v1alpha6
infrastructure.cluster.x-k8s.io/v1beta1
{{- end -}}

{{/*
Expand Down Expand Up @@ -159,11 +159,10 @@ Here we are generating a hash suffix to trigger upgrade when only it is necessar
using only the parameters used in openstack_machine_template.yaml.
*/}}
{{- define "osmtSpec" -}}
cloudName: {{ $.cloudName | quote }}
flavor: {{ .currentClass.flavor | quote }}
identityRef:
name: {{ $.cloudConfig }}
kind: Secret
cloudName: {{ $.cloudName | quote }}
{{- if not $.nodeCIDR }}
networks:
- filter:
Expand All @@ -174,12 +173,13 @@ networks:
{{- end }}
{{- if .currentClass.bootFromVolume }}
rootVolume:
diskSize: {{ .currentClass.diskSize }}
sizeGiB: {{ .currentClass.diskSize }}
{{- if .currentClass.volumeType }}
volumeType: {{ .currentClass.volumeType | quote }}
type: {{ .currentClass.volumeType | quote }}
{{- end }}
{{- end }}
image: {{ .currentClass.image | quote }}
image:
id: {{ .currentClass.image | quote }}
{{- end -}}

{{- define "osmtRevision" -}}
Expand Down
2 changes: 2 additions & 0 deletions helm/cluster-openstack/templates/coredns.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# use the `_coredns.tpl` from `cluster-shared`
{{- if $.Values.includeCoredns -}}
{{- include "coredns" .}}
{{- end -}}
4 changes: 4 additions & 0 deletions helm/cluster-openstack/templates/kubeadm_control_plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ spec:
extraArgs:
cloud-provider: external
enable-admission-plugins: {{ .Values.apiServer.enableAdmissionPlugins }}
{{- if not .Values.bootstrapManagementCluster }}
encryption-provider-config: /etc/kubernetes/encryption/config.yaml
{{- end }}
feature-gates: {{ .Values.apiServer.featureGates }}
kubelet-preferred-address-types: "InternalIP"
{{- if (semverCompare "~1.24.0" $.Values.kubernetesVersion) }}
Expand Down Expand Up @@ -110,12 +112,14 @@ spec:
files:
{{- include "sshFiles" . | nindent 6 }}
{{- include "kubeProxyFiles" . | nindent 6 }}
{{- if not .Values.bootstrapManagementCluster }}
- path: /etc/kubernetes/encryption/config.yaml
permissions: "0600"
contentFrom:
secret:
name: {{ include "resource.default.name" $ }}-encryption-provider-config
key: encryption
{{- end }}
{{- range $kubeadmPatch, $_ := .Files.Glob "files/etc/patches/**" }}
- path: {{ (printf "/tmp/kubeadm/patches/%s" (base $kubeadmPatch)) }}
content: |-
Expand Down
33 changes: 18 additions & 15 deletions helm/cluster-openstack/templates/openstack_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
tags:
- giant_swarm_cluster_{{ .Values.managementCluster }}_{{ include "resource.default.name" $ }}
{{- end }}
cloudName: {{ .Values.cloudName | quote }}
{{- if .Values.controlPlane.availabilityZones }}
controlPlaneAvailabilityZones:
{{- range .Values.controlPlane.availabilityZones }}
Expand All @@ -22,26 +21,28 @@ spec:
{{- end }}
identityRef:
name: {{ .Values.cloudConfig }}
kind: Secret
cloudName: {{ .Values.cloudName | quote }}
apiServerLoadBalancer:
enabled: true
allowedCidrs:
allowedCIDRs:
{{- range .Values.apiServerLoadBalancer.allowedCidrs }}
- {{ . | quote }}
{{- end }}
managedSecurityGroups: true
managedSecurityGroups:
allowAllInClusterTraffic: true
{{- if .Values.nodeCIDR }}
nodeCidr: {{ .Values.nodeCIDR | quote }}
managedSubnets:
- cidr: {{ .Values.nodeCIDR | quote }}
{{- else }}
network:
name: {{ .Values.networkName }}
subnet:
name: {{ .Values.subnetName }}
{{- end }}
{{- if .Values.externalNetworkID }}
externalNetworkId: {{ .Values.externalNetworkID | quote }}
externalNetwork:
id: {{ .Values.externalNetworkID | quote }}
{{- end }}
allowAllInClusterTraffic: true
{{- if .Values.dnsNameservers }}
dnsNameservers:
{{- range .Values.dnsNameservers }}
Expand All @@ -50,18 +51,20 @@ spec:
{{- end }}
bastion:
enabled: false
instance:
spec:
flavor: {{ .Values.bastion.flavor | quote }}
{{- if not .Values.nodeCIDR }}
networks:
- filter:
name: {{ .Values.networkName }}
subnets:
ports:
network:
- filter:
name: {{ .Values.subnetName }}
name: {{ .Values.networkName }}
subnets:
- filter:
name: {{ .Values.subnetName }}
{{- end }}
{{- if .Values.bastion.bootFromVolume }}
rootVolume:
diskSize: {{ .Values.bastion.diskSize }}
sizeGiB: {{ .Values.bastion.diskSize }}
{{- end }}
image: {{ .Values.bastion.image | quote }}
image:
id: {{ .Values.bastion.image | quote }}
3 changes: 3 additions & 0 deletions helm/cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ kubectlImage: {}
rollout:
before: false
certExpiryDays: 14

includeCoredns: true
bootstrapManagementCluster: false