Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Add Node IPAM support for vSphere (#3899)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
Co-authored-by: Edwin Xie <exie@vmware.com>
Co-authored-by: Aidan Obley <aobley@vmware.com>
  • Loading branch information
4 people authored Nov 29, 2022
1 parent 51912dd commit 4915076
Show file tree
Hide file tree
Showing 16 changed files with 653 additions and 19 deletions.
40 changes: 36 additions & 4 deletions packages/tkg-clusterclass-vsphere/bundle/config/upstream/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,22 @@ spec:
ipv6Primary:
type: boolean
default: false
addressesFromPools:
type: array
items:
type: object
properties:
apiGroup:
type: string
kind:
type: string
name:
type: string
required:
- apiGroup
- kind
- name
default: []
default:
ipv6Primary: false
- name: proxy
Expand Down Expand Up @@ -817,8 +833,16 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
- apiGroup: {{ .apiGroup }}
kind: {{ .kind }}
name: {{ .name }}
{{- end }}
{{- end }}
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VSphereMachineTemplate
Expand Down Expand Up @@ -846,8 +870,16 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily -}} dhcp6: true {{- end }}
{{ if list "IPv4" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp4: true {{- end }}
{{ if list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily | and (empty .network.addressesFromPools) -}} dhcp6: true {{- end }}
{{ if .network.addressesFromPools -}}
addressesFromPools:
{{- range .network.addressesFromPools }}
- apiGroup: {{ .apiGroup }}
kind: {{ .kind }}
name: {{ .name }}
{{- end }}
{{- end }}
- name: ipv6localhost
enabledIf: '{{ list "IPv6" "DualStack" | has .builtin.cluster.network.ipFamily }}'
definitions:
Expand Down
3 changes: 3 additions & 0 deletions providers/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ providers:
- name: docker
url: providers/infrastructure-docker/v1.2.4/infrastructure-components.yaml
type: InfrastructureProvider
- name: ipam-in-cluster
url: providers/infrastructure-ipam-in-cluster/v0.1.0/ipam-components.yaml
type: InfrastructureProvider
cert-manager:
url: providers/cert-manager/v1.9.1/cert-manager.yaml
version: "v1.9.1"
3 changes: 3 additions & 0 deletions providers/config_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ TKG_PROXY_CA_CERT: ""
#! IP Family setting
TKG_IP_FAMILY:

#! IPAM settings
NODE_IPAM_IP_POOL_NAME: ""

#! Configure cloud provider permissions for TMC enablement. Only affects AWS at present.
DISABLE_TMC_CLOUD_PERMISSIONS: false

Expand Down
Loading

0 comments on commit 4915076

Please # to comment.