Skip to content

Commit

Permalink
Add Provider Network Support (#17)
Browse files Browse the repository at this point in the history
Continuation of the previous.
  • Loading branch information
spjmurray authored Aug 21, 2024
1 parent 1acc2ea commit 9b003b2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-api-cluster-openstack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: cluster-api-cluster-openstack
description: A Helm chart to deploy a Kubernetes Cluster
type: application
version: v0.5.2
version: v0.5.3
icon: https://raw.githubusercontent.com/unikorn-cloud/helm-cluster-api/main/icons/default.png
2 changes: 1 addition & 1 deletion charts/cluster-api-cluster-openstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api-cluster-openstack
targetRevision: v0.5.2
targetRevision: v0.5.3
helm:
releaseName: foo
# Remove the default work queue.
Expand Down
9 changes: 6 additions & 3 deletions charts/cluster-api-cluster-openstack/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ spec:
{{- end }}
managedSecurityGroups:
allowAllInClusterTraffic: true
{{- if .Values.network.networkID }}
{{- if .Values.network.provider }}
network:
id: {{ .Values.network.networkID }}
{{- end }}
id: {{ .Values.network.provider.networkID }}
subnets:
- id: {{ .Values.network.provider.subnetID }}
{{- else }}
managedSubnets:
- cidr: {{ .Values.network.nodeCIDR }}
dnsNameservers: {{ toJson .Values.network.dnsNameservers }}
{{- end }}
{{- with $net := .Values.openstack.externalNetworkID }}
externalNetwork:
id: {{ $net }}
Expand Down
16 changes: 14 additions & 2 deletions charts/cluster-api-cluster-openstack/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,20 @@
"dnsNameservers": {
"$ref": "#/$defs/nonEmptyIPV4List"
},
"networkID": {
"type": "string"
"provider": {
"type": "object",
"required": [
"networkID",
"subnetID"
],
"properties": {
"networkID": {
"type": "string"
},
"subnetID": {
"type": "string"
}
}
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions charts/cluster-api-cluster-openstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,8 @@ network:

# If specified defines an existing nwtork to use, if not defined a network
# will be created by CAPO. This allows you to use non-standard network
# types e.g. a VLAN to be used for baremetal nodes.
# networkID: 8f526b54-fab3-435d-b4b3-f65fd8474b8a
# types e.g. a VLAN to be used for baremetal nodes. The subnet must have a
# router attached.
# provider:
# networkID: 8f526b54-fab3-435d-b4b3-f65fd8474b8a
# subnetID: e3b15dd0-17e4-47c0-bc6c-1b8ea1f1018f

0 comments on commit 9b003b2

Please sign in to comment.