Skip to content

Commit 15e12ad

Browse files
author
Joshua Reed
committed
Initial conversion of types. All is broken. : )
1 parent 22abffb commit 15e12ad

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

api/v1beta1/cloudstackcluster_types.go

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,35 @@ type CloudStackIdentityReference struct {
3939
Name string `json:"name"`
4040
}
4141

42+
type Network struct {
43+
// Cloudstack Network ID the cluster is built in.
44+
Id string `json:"networkID,omitempty"`
45+
46+
// Cloudstack Network Type the cluster is built in.
47+
// + optional
48+
Type string `json:"networkType,omitempty"`
49+
50+
// Name of the infrastructure identity to be used.
51+
// +optional
52+
Name string `json:"name"`
53+
}
54+
55+
type Zone struct {
56+
// The Zone name.
57+
// + optional
58+
Name string `json:"name"`
59+
60+
// The CS zone ID the cluster is built in.
61+
// + optional
62+
Id string `json:"iD"`
63+
64+
// The network within the Zone to use.
65+
Network Network `json:"network"`
66+
}
67+
4268
// CloudStackClusterSpec defines the desired state of CloudStackCluster.
4369
type CloudStackClusterSpec struct {
44-
// CloudStack Zone name.
45-
Zone string `json:"zone"`
46-
47-
// CloudStack guest network name.
48-
Network string `json:"network,omitempty"`
70+
Zones []Zone `json:"zones"`
4971

5072
// The kubernetes control plane endpoint.
5173
ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
@@ -68,15 +90,6 @@ type CloudStackClusterStatus struct {
6890
// Reflects the readiness of the CS cluster.
6991
Ready bool `json:"ready"`
7092

71-
// The CS zone ID the cluster is built in.
72-
ZoneID string `json:"zoneID"`
73-
74-
// Cloudstack Network ID the cluster is built in.
75-
NetworkID string `json:"networkID,omitempty"`
76-
77-
// Cloudstack Network Type the cluster is built in.
78-
NetworkType string `json:"networkType,omitempty"`
79-
8093
// Cloudstack Domain ID the cluster is built in.
8194
DomainID string `json:"domainID,omitempty"`
8295

0 commit comments

Comments
 (0)