William Travis Holton c5444c6737
Reduce indentation of allowedCidrs (#262)
* allowedCidrs is separate from loadBalancerProvider but was being
  rendered as child of that key.
2024-02-18 20:59:47 +00:00

73 lines
2.1 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
kind: OpenStackCluster
metadata:
name: {{ include "openstack-cluster.clusterName" . }}
labels: {{ include "openstack-cluster.labels" . | nindent 4 }}
annotations:
# We let Cluster API clean up this resource
# Deleting it ourselves, which CAPI is not expecting, can cause some nasty race conditions
helm.sh/resource-policy: keep
# NOTE: Argo won't delete this object itself as it has an owner reference to the cluster
spec:
identityRef:
kind: Secret
name: {{ include "openstack-cluster.cloudCredentialsSecretName" . }}
cloudName: openstack
{{- with .Values.controlPlaneEndpoint }}
controlPlaneEndpoint: {{ toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.clusterNetworking }}
{{- with .dnsNameservers }}
dnsNameservers: {{ toYaml . | nindent 4 }}
{{- end }}
managedSecurityGroups: {{ .manageSecurityGroups }}
allowAllInClusterTraffic: {{ .allowAllInClusterTraffic }}
{{- with .externalNetworkId }}
externalNetworkId: {{ . }}
{{- end }}
{{- with .internalNetwork }}
{{- if or .networkFilter .subnetFilter }}
{{- with .networkFilter }}
network: {{ . | toYaml | nindent 4 }}
{{- end }}
{{- with .subnetFilter }}
subnet: {{ . | toYaml | nindent 4 }}
{{- end }}
{{- else }}
nodeCidr: {{ .nodeCidr }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.apiServer }}
{{- if .enableLoadBalancer }}
apiServerLoadBalancer:
enabled: true
{{- if .loadBalancerProvider }}
provider: {{ .loadBalancerProvider }}
{{- end }}
{{- if .allowedCidrs }}
allowedCidrs:
{{- range .allowedCidrs }}
- {{ . }}
{{- end}}
{{- end }}
{{- end }}
disableAPIServerFloatingIP: {{ not .associateFloatingIP }}
{{- with .floatingIP }}
apiServerFloatingIP: {{ . }}
{{- end }}
{{- with .fixedIP }}
apiServerFixedIP: {{ . }}
{{- end }}
apiServerPort: {{ .port }}
{{- end }}
{{- with .Values.controlPlane }}
{{- if .omitFailureDomain }}
controlPlaneOmitAvailabilityZone: true
{{- else if .failureDomains }}
controlPlaneAvailabilityZones: {{ toYaml .failureDomains | nindent 4 }}
{{- end }}
{{- end }}