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

Basic cluster reconciler #150

Merged
Merged
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
8 changes: 7 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions pkg/apis/openstackproviderconfig/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ type RootVolume struct {
type OpenstackClusterProviderSpec struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// NodeCIDR is the OpenStack Subnet to be created. Cluster actuator will create a
// network, a subnet with NodeCIDR, and a router connected to this subnet.
// If you leave this empty, no network will be created.
NodeCIDR string `json:"nodeCidr,omitempty"`
// ExternalNetworkID is the ID of an external OpenStack Network. This is necessary
// to get public internet to the VMs.
ExternalNetworkID string `json:"externalNetworkId,omitempty"`
}

// +genclient
Expand All @@ -119,6 +127,33 @@ type OpenstackClusterProviderStatus struct {

// CAPrivateKey is a PEM encoded PKCS1 CA PrivateKey for the control plane nodes.
CAPrivateKey []byte

// Network contains all information about the created OpenStack Network.
// It includes Subnets and Router.
Network *Network `json:"network,omitempty"`
}

// Network represents basic information about the associated OpenStach Neutron Network
type Network struct {
Name string `json:"name"`
ID string `json:"id"`

Subnet *Subnet `json:"subnet,omitempty"`
Router *Router `json:"router,omitempty"`
}

// Subnet represents basic information about the associated OpenStack Neutron Subnet
type Subnet struct {
Name string `json:"name"`
ID string `json:"id"`

CIDR string `json:"cidr"`
}

// Router represents basic information about the associated OpenStack Neutron Router
type Router struct {
Name string `json:"name"`
ID string `json:"id"`
}

func init() {
Expand Down
63 changes: 63 additions & 0 deletions pkg/apis/openstackproviderconfig/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading