Documentation
¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the infrastructure v1alpha2 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Index ¶
- Constants
- Variables
- type APIEndpoint
- type BuildParams
- type IngressRule
- type IngressRules
- type Instance
- type InstanceState
- type Network
- type NetworkSpec
- type NifcloudCluster
- type NifcloudClusterList
- type NifcloudClusterSpec
- type NifcloudClusterStatus
- type NifcloudMachine
- type NifcloudMachineList
- type NifcloudMachineSpec
- type NifcloudMachineStatus
- type SecurityGroup
- type SecurityGroupProtocol
- type SecurityGroupRole
- type Tag
Constants ¶
const ApiTermination = false
DisableApiTermination should be false to delete server with NifcloudAPI
const ( // Finalizer is a label to allow ReconcileCluster to clean up // all resouces associated with NifcloudClustr before removing // from api server ClusterFinalizer = "nifcloudcluster.infrastructure.cluster.x-k8s.io" )
const ( // MachineFinalizer allow reconciler to clean up Nifcloud Machine resources // before removing these instances MachineFinalizer = "nifcloudmachine.infrastructure.cluster.x-k8s.io" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( InstancePending = InstanceState("pending") InstanceRunning = InstanceState("running") InstanceStopped = InstanceState("stopped") InstanceWaiting = InstanceState("waiting") )
var ( // SSH entry point role SecurityGroupBastion = SecurityGroupRole("bastion") // kubernets controleplane node role SecurityGroupControlPlane = SecurityGroupRole("controlplane") // kubernetes workload node role SecurityGroupNode = SecurityGroupRole("node") )
var ( SecurityGroupProtocolAny = SecurityGroupProtocol("ANY") SecurityGroupProtocolTCP = SecurityGroupProtocol("TCP") SecurityGroupProtocolUDP = SecurityGroupProtocol("UDP") )
Functions ¶
This section is empty.
Types ¶
type APIEndpoint ¶
type APIEndpoint struct { // the hostname on which the API server is serving Host string `json:"host"` // the port on which the API server is serving Port int32 `json:"port"` }
func (*APIEndpoint) DeepCopy ¶
func (in *APIEndpoint) DeepCopy() *APIEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint.
func (*APIEndpoint) DeepCopyInto ¶
func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BuildParams ¶
func (*BuildParams) DeepCopy ¶
func (in *BuildParams) DeepCopy() *BuildParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildParams.
func (*BuildParams) DeepCopyInto ¶
func (in *BuildParams) DeepCopyInto(out *BuildParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IngressRule ¶
type IngressRule struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Protocol SecurityGroupProtocol `json:"protocol"` FromPort int64 `json:"fromPort"` ToPort int64 `json:"toPort"` // List of CIDR blocks to allow access from. Cannot be specified with SourceSecurityGroupID. // +optional CidrBlocks []string `json:"cidrBlocks,omitempty"` // The security group id to allow access from. Cannot be specified with CidrBlocks. // +optional SourceSecurityGroupName []string `json:"sourceSecurityGroupName,omitempty"` }
func (*IngressRule) DeepCopy ¶
func (in *IngressRule) DeepCopy() *IngressRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.
func (*IngressRule) DeepCopyInto ¶
func (in *IngressRule) DeepCopyInto(out *IngressRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IngressRule) Equals ¶
func (i *IngressRule) Equals(o *IngressRule) bool
func (IngressRule) String ¶
func (i IngressRule) String() string
type IngressRules ¶
type IngressRules []*IngressRule
func (IngressRules) DeepCopy ¶
func (in IngressRules) DeepCopy() IngressRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRules.
func (IngressRules) DeepCopyInto ¶
func (in IngressRules) DeepCopyInto(out *IngressRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IngressRules) Difference ¶
func (i IngressRules) Difference(o IngressRules) (out IngressRules)
type Instance ¶
type Instance struct { // UID is an instance identifier UID string `json:"uid"` // ID is a name of nifcloud instance ID string `json:"id,omitemptuy"` // Zone is machine location Zone string `json:"zone,omitempty"` // State is current state of nicloud instance State InstanceState `json:"state,omitempty"` // Type is machine type of nicloud instance Type string `json:"type,omitempty"` // ImageID is an image running on nicloud instance ImageID string `json:"imageID,omitempty"` // UserData is cloud-init script UserData *string `json:"userData,omitempty"` // security group names SecurityGroups []string `json:"securityGroups,omitempty"` // A name of SSh key pair SSHKeyName string `json:"sshKeyName,omitempty"` // tags in instance Tag Tag `json:"tag,omitempty"` // The public IPv4 address assigned to the instance PublicIP string `json:"publicIP,omitempty"` // The private IPv4 address assigned to the instance PrivateIP string `json:"privateIP,omitempty"` // Address containes a list of apiserver endpoints Addresses []corev1.NodeAddress `json:"addresses,omitempty"` // a list of networkinterface which attached the instance NetworkInterfaces []string `json:"networkInterfaces,omitempty"` }
func (*Instance) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (*Instance) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceState ¶
type InstanceState string
InstanceState describes the state of an nifcloud instance.
type Network ¶
type Network struct { // SecurityGroups is a map from a name of role/kind to spesific role filewall SecurityGroups map[SecurityGroupRole]SecurityGroup `json:"securityGroups,omitempty"` }
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkSpec ¶
type NetworkSpec struct { }
func (*NetworkSpec) DeepCopy ¶
func (in *NetworkSpec) DeepCopy() *NetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.
func (*NetworkSpec) DeepCopyInto ¶
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NifcloudCluster ¶
type NifcloudCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NifcloudClusterSpec `json:"spec,omitempty"` Status NifcloudClusterStatus `json:"status,omitempty"` }
NifcloudCluster is the Schema for the nifcloudclusters API
func (*NifcloudCluster) DeepCopy ¶
func (in *NifcloudCluster) DeepCopy() *NifcloudCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudCluster.
func (*NifcloudCluster) DeepCopyInto ¶
func (in *NifcloudCluster) DeepCopyInto(out *NifcloudCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NifcloudCluster) DeepCopyObject ¶
func (in *NifcloudCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NifcloudClusterList ¶
type NifcloudClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NifcloudCluster `json:"items"` }
NifcloudClusterList contains a list of NifcloudCluster
func (*NifcloudClusterList) DeepCopy ¶
func (in *NifcloudClusterList) DeepCopy() *NifcloudClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudClusterList.
func (*NifcloudClusterList) DeepCopyInto ¶
func (in *NifcloudClusterList) DeepCopyInto(out *NifcloudClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NifcloudClusterList) DeepCopyObject ¶
func (in *NifcloudClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NifcloudClusterSpec ¶
type NifcloudClusterSpec struct { // NetworkSpec includes nifcloud network configurations NetworkSpec NetworkSpec `json:"networkSpec,omitempty"` // Zone is a nifcloud zone which cluster lives on Zone string `json:"zone,omitempty"` // Region ins a nifcloud region Region string `json:"region,omitempty"` // SSHKeyName is the name of ssh key to attach to the bastion SSHKeyName string `json:"sshKeyName,omitempty"` }
NifcloudClusterSpec defines the desired state of NifcloudCluster
func (*NifcloudClusterSpec) DeepCopy ¶
func (in *NifcloudClusterSpec) DeepCopy() *NifcloudClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudClusterSpec.
func (*NifcloudClusterSpec) DeepCopyInto ¶
func (in *NifcloudClusterSpec) DeepCopyInto(out *NifcloudClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NifcloudClusterStatus ¶
type NifcloudClusterStatus struct { // cluster network configurations Network Network `json:"network,omitempty"` // bastion instatnce information Bastion *Instance `json:"bastion,omitempty"` // cluster resource is ready to available or not Ready bool `json:"ready,omitempty"` APIEndpoints []APIEndpoint `json:"apiEndpoints,omitempty"` // +optional ErrorReason string `json:"failureReason,omitempty"` // +optional ErrorMessage string `json:"failureMessage,omitempty"` }
NifcloudClusterStatus defines the observed state of NifcloudCluster
func (*NifcloudClusterStatus) DeepCopy ¶
func (in *NifcloudClusterStatus) DeepCopy() *NifcloudClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudClusterStatus.
func (*NifcloudClusterStatus) DeepCopyInto ¶
func (in *NifcloudClusterStatus) DeepCopyInto(out *NifcloudClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NifcloudMachine ¶
type NifcloudMachine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NifcloudMachineSpec `json:"spec,omitempty"` Status NifcloudMachineStatus `json:"status,omitempty"` }
NifcloudMachine is the Schema for the nifcloudmachines API
func (*NifcloudMachine) DeepCopy ¶
func (in *NifcloudMachine) DeepCopy() *NifcloudMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudMachine.
func (*NifcloudMachine) DeepCopyInto ¶
func (in *NifcloudMachine) DeepCopyInto(out *NifcloudMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NifcloudMachine) DeepCopyObject ¶
func (in *NifcloudMachine) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NifcloudMachineList ¶
type NifcloudMachineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NifcloudMachine `json:"items"` }
NifcloudMachineList contains a list of NifcloudMachine
func (*NifcloudMachineList) DeepCopy ¶
func (in *NifcloudMachineList) DeepCopy() *NifcloudMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudMachineList.
func (*NifcloudMachineList) DeepCopyInto ¶
func (in *NifcloudMachineList) DeepCopyInto(out *NifcloudMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NifcloudMachineList) DeepCopyObject ¶
func (in *NifcloudMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NifcloudMachineSpec ¶
type NifcloudMachineSpec struct { // the identifier for the provider's machine instance ProviderID *string `json:"providerID,omitempty"` // InstanceID is corresponding to nifcloud `instance id` InstanceID string `json:"instanceID,omitempty"` // ImageID is instance os image ImageID string `json:"imageID,omitempty"` // AvailabilityZone is reference to nifcloud availability zone for this instance AvailabilityZone *string `json:"availabilityZone,omitempty"` // KeyName is a ssh key name to attach to this instance KeyName string `json:"keyName,omitempty"` // InstanceType is reference to nifcloud instance type InstanceType string `json:"instanceType,omitempty"` // PublicType specifies whether this machine get public IP address or not // +optional PublicType string `json:"publicType,omitempty"` // NetworkInterfaces is a list of nifcloud networkInterfaceSet // max 2 entry : public,private // +optional // +kubebuilder:validation:MaxItems=2 NetworkInterfaces []string `json:"networkInterfaces,omitempty"` }
NifcloudMachineSpec defines the desired state of NifcloudMachine
func (*NifcloudMachineSpec) DeepCopy ¶
func (in *NifcloudMachineSpec) DeepCopy() *NifcloudMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudMachineSpec.
func (*NifcloudMachineSpec) DeepCopyInto ¶
func (in *NifcloudMachineSpec) DeepCopyInto(out *NifcloudMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NifcloudMachineStatus ¶
type NifcloudMachineStatus struct { // Ready is a flag whether this resouce is available or not Ready bool `json:"ready"` // Address contains apiserver endpoints Address []v1.NodeAddress `json:"address,omitempty"` // InstanceState is the state of the nifcloud instance InstanceState *InstanceState `json:"instanceState,omitempty"` // Bootstrap data has been sended to server SendBootstrap bool `json:"sendBootstrap,omitempty"` // +optional ErrorReason *errors.MachineStatusError `json:"errorReason,omitempty"` // +optional ErrorMessage *string `json:"errorMessage,omitempty"` }
NifcloudMachineStatus defines the observed state of NifcloudMachine
func (*NifcloudMachineStatus) DeepCopy ¶
func (in *NifcloudMachineStatus) DeepCopy() *NifcloudMachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NifcloudMachineStatus.
func (*NifcloudMachineStatus) DeepCopyInto ¶
func (in *NifcloudMachineStatus) DeepCopyInto(out *NifcloudMachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityGroup ¶
type SecurityGroup struct { // ID is an identifier ID string `json:"id"` // security(firewall) group name Name string `json:"name"` // ingress rules of the group // +optional IngressRules IngressRules `json:"ingressRules"` }
SecurityGroup defines nifcloud firewall group
func (*SecurityGroup) DeepCopy ¶
func (in *SecurityGroup) DeepCopy() *SecurityGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup.
func (*SecurityGroup) DeepCopyInto ¶
func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecurityGroup) String ¶
func (s *SecurityGroup) String() string
type SecurityGroupProtocol ¶
type SecurityGroupProtocol string
SecurityGroupProtocol defines the protocol type for a security group rule.
type SecurityGroupRole ¶
type SecurityGroupRole string
SecurityGroupRole defines the unique role of a security group.
type Tag ¶
func BuildTags ¶
func BuildTags(params BuildParams) Tag
func (Tag) ConvToString ¶
convert tags to string which is set to description
func (Tag) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag.
func (Tag) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.