Skip to content

Commit 2d96db6

Browse files
committed
OpenStackCluster: Add explicit optional tags
1 parent cdc16d2 commit 2d96db6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

api/v1beta1/openstackcluster_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type OpenStackClusterSpec struct {
3434
// subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4
3535
// subnet is supported. If you leave this empty, no network will be created.
3636
// +kubebuilder:validation:MaxItems=1
37+
// +optional
3738
ManagedSubnets []SubnetSpec `json:"managedSubnets,omitempty"`
3839

3940
// Router specifies an existing router to be used if ManagedSubnets are
@@ -63,6 +64,7 @@ type OpenStackClusterSpec struct {
6364

6465
// ExternalRouterIPs is an array of externalIPs on the respective subnets.
6566
// This is necessary if the router needs a fixed ip in a specific subnet.
67+
// +optional
6668
ExternalRouterIPs []ExternalRouterIPParam `json:"externalRouterIPs,omitempty"`
6769

6870
// ExternalNetwork is the OpenStack Network to be used to get public internet to the VMs.
@@ -131,6 +133,7 @@ type OpenStackClusterSpec struct {
131133

132134
// Tags for all resources in cluster
133135
// +listType=set
136+
// +optional
134137
Tags []string `json:"tags,omitempty"`
135138

136139
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
@@ -139,6 +142,7 @@ type OpenStackClusterSpec struct {
139142

140143
// ControlPlaneAvailabilityZones is the az to deploy control plane to
141144
// +listType=set
145+
// +optional
142146
ControlPlaneAvailabilityZones []string `json:"controlPlaneAvailabilityZones,omitempty"`
143147

144148
// Indicates whether to omit the az for control plane nodes, allowing the Nova scheduler
@@ -167,15 +171,19 @@ type OpenStackClusterStatus struct {
167171
Ready bool `json:"ready"`
168172

169173
// Network contains information about the created OpenStack Network.
174+
// +optional
170175
Network *NetworkStatusWithSubnets `json:"network,omitempty"`
171176

172177
// externalNetwork contains information about the external network used for default ingress and egress traffic.
178+
// +optional
173179
ExternalNetwork *NetworkStatus `json:"externalNetwork,omitempty"`
174180

175181
// Router describes the default cluster router
182+
// +optional
176183
Router *Router `json:"router,omitempty"`
177184

178185
// APIServerLoadBalancer describes the api server load balancer if one exists
186+
// +optional
179187
APIServerLoadBalancer *LoadBalancer `json:"apiServerLoadBalancer,omitempty"`
180188

181189
// FailureDomains represent OpenStack availability zones
@@ -184,14 +192,18 @@ type OpenStackClusterStatus struct {
184192
// ControlPlaneSecurityGroups contains all the information about the OpenStack
185193
// Security Group that needs to be applied to control plane nodes.
186194
// TODO: Maybe instead of two properties, we add a property to the group?
195+
// +optional
187196
ControlPlaneSecurityGroup *SecurityGroupStatus `json:"controlPlaneSecurityGroup,omitempty"`
188197

189198
// WorkerSecurityGroup contains all the information about the OpenStack Security
190199
// Group that needs to be applied to worker nodes.
200+
// +optional
191201
WorkerSecurityGroup *SecurityGroupStatus `json:"workerSecurityGroup,omitempty"`
192202

203+
// +optional
193204
BastionSecurityGroup *SecurityGroupStatus `json:"bastionSecurityGroup,omitempty"`
194205

206+
// +optional
195207
Bastion *BastionStatus `json:"bastion,omitempty"`
196208

197209
// FailureReason will be set in the event that there is a terminal problem

docs/book/src/api/v1beta1/api.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ OpenStackClusterSpec
7777
</em>
7878
</td>
7979
<td>
80+
<em>(Optional)</em>
8081
<p>ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network,
8182
subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4
8283
subnet is supported. If you leave this empty, no network will be created.</p>
@@ -154,6 +155,7 @@ To use this field, the Openstack installation requires the net-mtu neutron API e
154155
</em>
155156
</td>
156157
<td>
158+
<em>(Optional)</em>
157159
<p>ExternalRouterIPs is an array of externalIPs on the respective subnets.
158160
This is necessary if the router needs a fixed ip in a specific subnet.</p>
159161
</td>
@@ -308,6 +310,7 @@ Kubernetes cluster, which also disables SecurityGroups</p>
308310
</em>
309311
</td>
310312
<td>
313+
<em>(Optional)</em>
311314
<p>Tags for all resources in cluster</p>
312315
</td>
313316
</tr>
@@ -333,6 +336,7 @@ sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint
333336
</em>
334337
</td>
335338
<td>
339+
<em>(Optional)</em>
336340
<p>ControlPlaneAvailabilityZones is the az to deploy control plane to</p>
337341
</td>
338342
</tr>
@@ -1951,6 +1955,7 @@ It may not be empty and may not contain commas.</p>
19511955
</em>
19521956
</td>
19531957
<td>
1958+
<em>(Optional)</em>
19541959
<p>ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network,
19551960
subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4
19561961
subnet is supported. If you leave this empty, no network will be created.</p>
@@ -2028,6 +2033,7 @@ To use this field, the Openstack installation requires the net-mtu neutron API e
20282033
</em>
20292034
</td>
20302035
<td>
2036+
<em>(Optional)</em>
20312037
<p>ExternalRouterIPs is an array of externalIPs on the respective subnets.
20322038
This is necessary if the router needs a fixed ip in a specific subnet.</p>
20332039
</td>
@@ -2182,6 +2188,7 @@ Kubernetes cluster, which also disables SecurityGroups</p>
21822188
</em>
21832189
</td>
21842190
<td>
2191+
<em>(Optional)</em>
21852192
<p>Tags for all resources in cluster</p>
21862193
</td>
21872194
</tr>
@@ -2207,6 +2214,7 @@ sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint
22072214
</em>
22082215
</td>
22092216
<td>
2217+
<em>(Optional)</em>
22102218
<p>ControlPlaneAvailabilityZones is the az to deploy control plane to</p>
22112219
</td>
22122220
</tr>
@@ -2294,6 +2302,7 @@ NetworkStatusWithSubnets
22942302
</em>
22952303
</td>
22962304
<td>
2305+
<em>(Optional)</em>
22972306
<p>Network contains information about the created OpenStack Network.</p>
22982307
</td>
22992308
</tr>
@@ -2307,6 +2316,7 @@ NetworkStatus
23072316
</em>
23082317
</td>
23092318
<td>
2319+
<em>(Optional)</em>
23102320
<p>externalNetwork contains information about the external network used for default ingress and egress traffic.</p>
23112321
</td>
23122322
</tr>
@@ -2320,6 +2330,7 @@ Router
23202330
</em>
23212331
</td>
23222332
<td>
2333+
<em>(Optional)</em>
23232334
<p>Router describes the default cluster router</p>
23242335
</td>
23252336
</tr>
@@ -2333,6 +2344,7 @@ LoadBalancer
23332344
</em>
23342345
</td>
23352346
<td>
2347+
<em>(Optional)</em>
23362348
<p>APIServerLoadBalancer describes the api server load balancer if one exists</p>
23372349
</td>
23382350
</tr>
@@ -2359,6 +2371,7 @@ SecurityGroupStatus
23592371
</em>
23602372
</td>
23612373
<td>
2374+
<em>(Optional)</em>
23622375
<p>ControlPlaneSecurityGroups contains all the information about the OpenStack
23632376
Security Group that needs to be applied to control plane nodes.
23642377
TODO: Maybe instead of two properties, we add a property to the group?</p>
@@ -2374,6 +2387,7 @@ SecurityGroupStatus
23742387
</em>
23752388
</td>
23762389
<td>
2390+
<em>(Optional)</em>
23772391
<p>WorkerSecurityGroup contains all the information about the OpenStack Security
23782392
Group that needs to be applied to worker nodes.</p>
23792393
</td>
@@ -2388,6 +2402,7 @@ SecurityGroupStatus
23882402
</em>
23892403
</td>
23902404
<td>
2405+
<em>(Optional)</em>
23912406
</td>
23922407
</tr>
23932408
<tr>
@@ -2400,6 +2415,7 @@ BastionStatus
24002415
</em>
24012416
</td>
24022417
<td>
2418+
<em>(Optional)</em>
24032419
</td>
24042420
</tr>
24052421
<tr>
@@ -2496,6 +2512,7 @@ OpenStackClusterSpec
24962512
</em>
24972513
</td>
24982514
<td>
2515+
<em>(Optional)</em>
24992516
<p>ManagedSubnets describe OpenStack Subnets to be created. Cluster actuator will create a network,
25002517
subnets with the defined CIDR, and a router connected to these subnets. Currently only one IPv4
25012518
subnet is supported. If you leave this empty, no network will be created.</p>
@@ -2573,6 +2590,7 @@ To use this field, the Openstack installation requires the net-mtu neutron API e
25732590
</em>
25742591
</td>
25752592
<td>
2593+
<em>(Optional)</em>
25762594
<p>ExternalRouterIPs is an array of externalIPs on the respective subnets.
25772595
This is necessary if the router needs a fixed ip in a specific subnet.</p>
25782596
</td>
@@ -2727,6 +2745,7 @@ Kubernetes cluster, which also disables SecurityGroups</p>
27272745
</em>
27282746
</td>
27292747
<td>
2748+
<em>(Optional)</em>
27302749
<p>Tags for all resources in cluster</p>
27312750
</td>
27322751
</tr>
@@ -2752,6 +2771,7 @@ sigs.k8s.io/cluster-api/api/v1beta1.APIEndpoint
27522771
</em>
27532772
</td>
27542773
<td>
2774+
<em>(Optional)</em>
27552775
<p>ControlPlaneAvailabilityZones is the az to deploy control plane to</p>
27562776
</td>
27572777
</tr>

0 commit comments

Comments
 (0)