Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some small things when working with vsphere provisioner #13

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
20 changes: 17 additions & 3 deletions charts/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ spec:
{{- else if eq $.Values.cloudprovider "azure" }}
kind: AzureConfig
{{- end}}
name: {{ $nodepool.name }}
name: nc-{{ $.Values.cluster.name }}-{{ $nodepool.name }}
{{- if $nodepool.os }}
machineOS: {{ $nodepool.os }}
{{- end}}
paused: {{ $nodepool.paused }}
displayName: {{ $nodepool.displayName }}
{{- if $nodepool.rollingUpdate }}
Expand Down Expand Up @@ -81,6 +84,9 @@ spec:
kind: AzureConfig
{{- end}}
name: {{ $nodepool.name }}
{{- if $nodepool.os }}
machineOS: {{ $nodepool.os }}
{{- end}}
paused: {{ $nodepool.paused }}
displayName: {{ $nodepool.displayName }}
{{- if $nodepool.rollingUpdate }}
Expand Down Expand Up @@ -137,10 +143,14 @@ spec:
# service-cidr: "10.43.0.0/16"
# Port range to reserve for services with NodePort visibility (default: "30000-32767")
# service-node-port-range: "30000-32767"
# Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert
# tls-san: []
{{- if .Values.cluster.tlsSan }}
tls-san:
{{ toYaml .Values.cluster.tlsSan | indent 8 }}
{{- end }}

# machineSelectorConfig:
machineSelectorConfig:
{{ toYaml .Values.rke.machineSelectorConfig | indent 6 }}
# - config:
# Node name
# node-name: ""
Expand All @@ -164,6 +174,10 @@ spec:
# cloud-provider-name: ""
# Cloud provider configuration file path
# cloud-provider-config: ""
{{- if .Values.rke.registries }}
registries:
{{ toYaml .Values.rke.registries | indent 6 }}
{{- end }}
{{- if .Values.rke.localClusterAuthEndpoint.enabled }}
localClusterAuthEndpoint:
enabled: {{ .Values.rke.localClusterAuthEndpoint.enabled }}
Expand Down
18 changes: 12 additions & 6 deletions charts/templates/nodeconfig-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: rke-machine-config.cattle.io/v1
kind: VmwarevsphereConfig
metadata:
name: {{ $nodepool.name }}
name: nc-{{ $.Values.cluster.name }}-{{ $nodepool.name }}
namespace: fleet-default
common:
{{- if $nodepool.labels }}
Expand All @@ -15,7 +15,8 @@ common:
{{ toYaml $nodepool.taints | indent 4 }}
{{- end }}
{{- if $nodepool.cfgparam }}
cfgparam: {{ $nodepool.cfgparam }}
cfgparam:
{{ toYaml $nodepool.cfgparam | indent 4 }}
{{- end }}
cloneFrom: {{ $nodepool.cloneFrom }}
cloudConfig: |
Expand All @@ -33,14 +34,16 @@ folder: {{ $nodepool.folder }}
hostsystem: {{ $nodepool.hostsystem }}
memorySize: {{ $nodepool.memorySize | quote }}
network: {{ $nodepool.network }}
os: {{ $nodepool.os | default "linux"}}
pool: {{ $nodepool.pool }}
sshPort: {{ $nodepool.sshPort | quote }}
sshUser: {{ $nodepool.sshUser }}
sshUserGroup: {{ $nodepool.sshUserGroup }}
tag: {{ $nodepool.tag }}
vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }}
vappIpprotocol: {{ $nodepool.vappIpprotocol }}
vappProperty: {{ $nodepool.vappProperty }}
vappProperty:
{{ toYaml $nodepool.vappProperty | indent 4 }}
vappTransport: {{ $nodepool.vappTransport }}
vcenter: {{ $nodepool.vcenter }}
vcenterPort: {{ $nodepool.vcenterPort | quote }}
Expand All @@ -51,7 +54,7 @@ vcenterPort: {{ $nodepool.vcenterPort | quote }}
apiVersion: rke-machine-config.cattle.io/v1
kind: VmwarevsphereConfig
metadata:
name: {{ $nodepool.name }}
name: nc-{{ $.Values.cluster.name }}-{{ $nodepool.name }}
namespace: fleet-default
common:
{{- if $nodepool.labels }}
Expand All @@ -63,7 +66,8 @@ common:
{{ toYaml $nodepool.taints | indent 4 }}
{{- end }}
{{- if $nodepool.cfgparam }}
cfgparam: {{ $nodepool.cfgparam }}
cfgparam:
{{ toYaml $nodepool.cfgparam | indent 4 }}
{{- end }}
cloneFrom: {{ $nodepool.cloneFrom }}
cloudConfig: |
Expand All @@ -81,14 +85,16 @@ folder: {{ $nodepool.folder }}
hostsystem: {{ $nodepool.hostsystem }}
memorySize: {{ $nodepool.memorySize | quote }}
network: {{ $nodepool.network }}
os: {{ $nodepool.os | default "linux"}}
pool: {{ $nodepool.pool }}
sshPort: {{ $nodepool.sshPort | quote }}
sshUser: {{ $nodepool.sshUser }}
sshUserGroup: {{ $nodepool.sshUserGroup }}
tag: {{ $nodepool.tag }}
vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }}
vappIpprotocol: {{ $nodepool.vappIpprotocol }}
vappProperty: {{ $nodepool.vappProperty }}
vappProperty:
{{ toYaml $nodepool.vappProperty | indent 4 }}
vappTransport: {{ $nodepool.vappTransport }}
vcenter: {{ $nodepool.vcenter }}
vcenterPort: {{ $nodepool.vcenterPort }}
Expand Down
8 changes: 7 additions & 1 deletion charts/values-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ nodepools:
# specify nodepool size
quantity: 1

# specify nodepool os (linux, windows)
os: linux

# Pause node pool
paused: false

Expand Down Expand Up @@ -64,7 +67,7 @@ nodepools:

# vSphere vm configuration parameters (used for guestinfo)
# cfgparam: []

# - disk.enableUUID=TRUE
# If you choose creation type clone a name of what you want to clone is required
# cloneFrom: ""

Expand Down Expand Up @@ -132,6 +135,9 @@ nodepools:

# vSphere vApp properties
# vappProperty: []
# - guestinfo.interface.0.ip.0.address=ip:vLan100_K8S
# - guestinfo.interface.0.ip.0.netmask=${netmask:vLan100_K8S}
# - guestinfo.interface.0.route.0.gateway=${gateway:vLan100_K8S}

# 'vSphere OVF environment transports to use for properties. Supported values are: iso and com.vmware.guestInfo'
# vappTransport: ""
Expand Down
19 changes: 19 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ cluster:
# specify cluster annotations
annotations: {}

# Add additional hostnames or IPv4/IPv6 addresses as Subject Alternative Names on the server TLS cert
# tlsSan:
# - 10.10.10.10
# - kube-api.example.com

# specify cloud credential secret name, do not need to be provided if using custom driver
cloudCredentialSecretName: ""

Expand All @@ -22,6 +27,9 @@ rke:
# enable local auth endpoint
localClusterAuthEndpoint:
enabled: false
machineSelectorConfig:
# - config:
# system-default-registry: registry.example.com
# specify fqdn of local access endpoint
# fqdn: foo.bar.example
# specify cacert of local access endpoint
Expand All @@ -31,6 +39,17 @@ rke:
# clusterMembers:
# - principalName: "local://u-z8zl5"
# roleTemplateName: "cluster-member"
registries:
# configs:
# {}
# authConfigSecretName: string
# caBundle: string
# insecureSkipVerify: boolean
# tlsSecretName: string
# mirrors:
# '*':
# endpoint:
# - https://registry.example.com

# enable monitoring
monitoring:
Expand Down
Binary file modified cluster-template-0.0.1.tgz
Binary file not shown.