v1alpha1

package
v0.0.0-...-b3f0fa4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=ocice.oracle.com

Index

Constants

View Source
const (
	ClusterKind           = "Cluster"
	ClusterResourcePlural = "clusters"
	ClusterControllerName = "clusters"
)

Cluster names

View Source
const (
	NodePoolKind           = "NodePool"
	NodePoolResourcePlural = "nodepools"
	NodePoolControllerName = "nodepools"
)

NodePool names

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Register scheme and api resources

View Source
var ClusterValidation = apiextv1beta1.CustomResourceValidation{
	OpenAPIV3Schema: &apiextv1beta1.JSONSchemaProps{
		Properties: map[string]apiextv1beta1.JSONSchemaProps{
			"metadata": common.MetaDataValidation,
			"spec": {
				Required: []string{"compartmentRef", "vcnRef", "serviceLbSubnetRefs", "kubernetesVersion"},
				Properties: map[string]apiextv1beta1.JSONSchemaProps{
					"compartmentRef": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
					"vcnRef": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
					"serviceLbSubnetRefs": {
						Type: common.ValidationTypeArray,
					},
					"kubernetesVersion": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
				},
			},
		},
	},
}

ClusterValidation describes the cluster validation schema

View Source
var NodePoolValidation = apiextv1beta1.CustomResourceValidation{
	OpenAPIV3Schema: &apiextv1beta1.JSONSchemaProps{
		Properties: map[string]apiextv1beta1.JSONSchemaProps{
			"metadata": common.MetaDataValidation,
			"spec": {
				Required: []string{"compartmentRef", "clusterRef", "subnetRefs", "kubernetesVersion"},
				Properties: map[string]apiextv1beta1.JSONSchemaProps{
					"compartmentRef": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
					"clusterRef": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
					"subnetRefs": {
						Type: common.ValidationTypeArray,
					},
					"kubernetesVersion": {
						Type:    common.ValidationTypeString,
						Pattern: common.AnyStringValidationRegex,
					},
				},
			},
		},
	},
}

NodePoolValidation describes the nodePool validation schema

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: group.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is the group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              ClusterSpec   `json:"spec"`
	Status            ClusterStatus `json:"status,omitempty"`
}

Cluster describes a cluster

func (*Cluster) AddDependent

func (s *Cluster) AddDependent(kind string, obj runtime.Object) error

AddDependent adds a cluster dependent

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Cluster) GetGroupVersionResource

func (s *Cluster) GetGroupVersionResource() schema.GroupVersionResource

GetGroupVersionResource returns the group version of the cluster type

func (*Cluster) GetResourceID

func (s *Cluster) GetResourceID() string

GetResourceID returns the oci id of the cluster

func (*Cluster) GetResourcePlural

func (s *Cluster) GetResourcePlural() string

GetResourcePlural returns the plural name of the cluster type

func (*Cluster) GetResourceState

func (s *Cluster) GetResourceState() common.ResourceState

GetResourceState returns the current state of the iresource

func (*Cluster) IsDependentRegistered

func (s *Cluster) IsDependentRegistered(kind string, obj runtime.Object) (bool, error)

IsDependentRegistered returns true if the cluster dependent is registered

func (*Cluster) IsResource

func (s *Cluster) IsResource() bool

IsResource returns true if there is an oci id, otherwise false

func (*Cluster) RemoveDependent

func (s *Cluster) RemoveDependent(kind string, obj runtime.Object) error

RemoveDependent removes a cluster dependent

func (*Cluster) SetResource

func (s *Cluster) SetResource(r *ocice.Cluster) *Cluster

SetResource sets the resource in cluster status

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Cluster `json:"items"`
}

ClusterList is a list of Cluster items

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterList) DeepCopyObject

func (in *ClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterResource

type ClusterResource struct {
	*ocice.Cluster
}

ClusterResource describes a cluster resource from oci

func (*ClusterResource) DeepCopy

func (in *ClusterResource) DeepCopy() (out *ClusterResource)

DeepCopy the backed oci resource

func (*ClusterResource) DeepCopyInto

func (in *ClusterResource) DeepCopyInto(out *ClusterResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterSpec

type ClusterSpec struct {
	CompartmentRef      string   `json:"compartmentRef"`
	ServiceLbSubnetRefs []string `json:"serviceLbSubnetRefs"`
	VcnRef              string   `json:"vcnRef"`

	KubernetesVersion *string                     `mandatory:"true" json:"kubernetesVersion"`
	Options           *ocice.ClusterCreateOptions `mandatory:"false" json:"options"`

	common.Dependency
}

ClusterSpec describes a cluster spec

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

DeepCopy the cluster spec

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterStatus

type ClusterStatus struct {
	common.ResourceStatus

	KubeConfig *string          `json:"kubeconfig,omitempty"`
	Resource   *ClusterResource `json:"resource,omitempty"`

	WorkRequestId     *string                      `json:"workRequestId,omitempty"`
	WorkRequestStatus *ocice.WorkRequestStatusEnum `json:"workRequestStatus,omitempty"`
}

ClusterStatus describes a cluster status

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePool

type NodePool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              NodePoolSpec   `json:"spec"`
	Status            NodePoolStatus `json:"status,omitempty"`
}

NodePool describes a nodePool

func (*NodePool) AddDependent

func (s *NodePool) AddDependent(kind string, obj runtime.Object) error

AddDependent adds a nodePool dependent

func (*NodePool) DeepCopy

func (in *NodePool) DeepCopy() *NodePool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePool.

func (*NodePool) DeepCopyInto

func (in *NodePool) DeepCopyInto(out *NodePool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodePool) DeepCopyObject

func (in *NodePool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NodePool) GetGroupVersionResource

func (s *NodePool) GetGroupVersionResource() schema.GroupVersionResource

GetGroupVersionResource returns the group version of the nodePool type

func (*NodePool) GetResourceID

func (s *NodePool) GetResourceID() string

GetResourceID returns the oci id of the nodePool

func (*NodePool) GetResourcePlural

func (s *NodePool) GetResourcePlural() string

GetResourcePlural returns the plural name of the nodePool type

func (*NodePool) GetResourceState

func (s *NodePool) GetResourceState() common.ResourceState

GetResourceState returns the current state of the iresource

func (*NodePool) IsDependentRegistered

func (s *NodePool) IsDependentRegistered(kind string, obj runtime.Object) (bool, error)

IsDependentRegistered returns true if the nodePool dependent is registered

func (*NodePool) IsResource

func (s *NodePool) IsResource() bool

IsResource returns true if there is an oci id, otherwise false

func (*NodePool) RemoveDependent

func (s *NodePool) RemoveDependent(kind string, obj runtime.Object) error

RemoveDependent removes a nodePool dependent

func (*NodePool) SetResource

func (s *NodePool) SetResource(r *ocice.NodePool) *NodePool

SetResource sets the resource in nodePool status

type NodePoolList

type NodePoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []NodePool `json:"items"`
}

NodePoolList is a list of NodePool items

func (*NodePoolList) DeepCopy

func (in *NodePoolList) DeepCopy() *NodePoolList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolList.

func (*NodePoolList) DeepCopyInto

func (in *NodePoolList) DeepCopyInto(out *NodePoolList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodePoolList) DeepCopyObject

func (in *NodePoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodePoolResource

type NodePoolResource struct {
	*ocice.NodePool
}

NodePoolResource describes a nodePool resource from oci

func (*NodePoolResource) DeepCopy

func (in *NodePoolResource) DeepCopy() (out *NodePoolResource)

DeepCopy the backed oci resource

func (*NodePoolResource) DeepCopyInto

func (in *NodePoolResource) DeepCopyInto(out *NodePoolResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePoolSpec

type NodePoolSpec struct {
	CompartmentRef string `json:"compartmentRef"`
	ClusterRef     string `json:"clusterRef"`

	// The references of the subnets in which to place nodes for this node pool.
	SubnetRefs []string `mandatory:"true" json:"subnetRefs"`

	// The version of Kubernetes to install on the nodes in the node pool.
	KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"`

	// The name of the image running on the nodes in the node pool.
	NodeImageName *string `mandatory:"true" json:"nodeImageName"`

	// The name of the node shape of the nodes in the node pool.
	NodeShape *string `mandatory:"true" json:"nodeShape"`

	// A list of key/value pairs to add to nodes after they join the Kubernetes cluster.
	InitialNodeLabels []ocice.KeyValue `mandatory:"false" json:"initialNodeLabels"`

	// The SSH public key to add to each node in the node pool.
	SshPublicKey *string `mandatory:"false" json:"sshPublicKey"`

	// The number of nodes to create in each subnet.
	QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"`

	common.Dependency
}

NodePoolSpec describes a nodePool spec

func (*NodePoolSpec) DeepCopy

func (in *NodePoolSpec) DeepCopy() *NodePoolSpec

DeepCopy the nodePool spec

func (*NodePoolSpec) DeepCopyInto

func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodePoolStatus

type NodePoolStatus struct {
	common.ResourceStatus
	Resource *NodePoolResource `json:"resource,omitempty"`

	WorkRequestId     *string                      `json:"workRequestId,omitempty"`
	WorkRequestStatus *ocice.WorkRequestStatusEnum `json:"workRequestStatus,omitempty"`
}

NodePoolStatus describes a nodePool status

func (*NodePoolStatus) DeepCopy

func (in *NodePoolStatus) DeepCopy() *NodePoolStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePoolStatus.

func (*NodePoolStatus) DeepCopyInto

func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL