Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the v1beta1 API group +kubebuilder:object:generate=true +groupName=sumengzs.cn
Index ¶
Constants ¶
const ( // SecretTokenKey is the name of secret token key. SecretTokenKey = "token" // SecretCADataKey is the name of secret caBundle key. SecretCADataKey = "caBundle" )
const ( Group = "sumengzs.cn" Version = "v1beta1" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: Group, Version: Version} // 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 )
Functions ¶
This section is empty.
Types ¶
type APIEnablement ¶
type APIEnablement struct { // GroupVersion is the group and version this APIEnablement is for. GroupVersion string `json:"groupVersion,omitempty"` // Resources is a list of APIResource. // +optional Resources []APIResource `json:"resources,omitempty"` }
APIEnablement is a list of API resource, it is used to expose the name of the resources supported in a specific group and version.
func (*APIEnablement) DeepCopy ¶
func (in *APIEnablement) DeepCopy() *APIEnablement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEnablement.
func (*APIEnablement) DeepCopyInto ¶
func (in *APIEnablement) DeepCopyInto(out *APIEnablement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type APIResource ¶
type APIResource struct { // Name is the plural name of the resource. // +required Name string `json:"name,omitempty"` // Kind is the kind for the resource (e.g. 'Deployment' is the kind for resource 'deployments') // +required Kind string `json:"kind,omitempty"` }
APIResource specifies the name and kind names for the resource.
func (*APIResource) DeepCopy ¶
func (in *APIResource) DeepCopy() *APIResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResource.
func (*APIResource) DeepCopyInto ¶
func (in *APIResource) DeepCopyInto(out *APIResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` // +optional Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster
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 ClusterSpec ¶
type ClusterSpec struct { // Provider of the cluster, this field is just for description // +optional Provider string `json:"provider,omitempty"` // Desired state of the cluster // +optional Disabled bool `json:"disabled,omitempty"` // Connect used to connect to cluster api server. // You can choose one of the following three ways to connect: // + ConnectConfig.Secret // + ConnectConfig.Config // + ConnectConfig.Token Connect ConnectConfig `json:"connect"` // Region represents the region of the member cluster locate in. // +optional Region Region `json:"region,omitempty"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
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 { // Version represents version of the member cluster. // +optional Version string `json:"version,omitempty"` // APIEnablements represents the list of APIs installed in the member cluster. // +optional APIEnablements []APIEnablement `json:"apiEnablements,omitempty"` // Conditions is an array of current cluster conditions. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // NodeSummary represents the summary of nodes status in the member cluster. // +optional NodeSummary *NodeSummary `json:"nodeSummary,omitempty"` }
ClusterStatus defines the observed state of Cluster
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 ConfigRef ¶
type ConfigRef struct { //Secret used to encode and decode Config to protect Config from being leaked. // +optional Secret *SecretRef `json:"secret,omitempty"` // The Config used to connect to the cluster. // There is no need to encrypt when joining. // When saving data, it will automatically use Secret for encryption. If Secret exists. Config []byte `json:"config,omitempty"` }
func (*ConfigRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigRef.
func (*ConfigRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConnectConfig ¶
type ConnectConfig struct { // It is relatively safe to use Secret to save token and CABundle in the cluster. // It is recommended and has the highest priority. // If you want to do this, the data definition of Secret must meet the following conditions: // - secret.data.token // - secret.data.caBundle // +optional Secret *SecretRef `json:"secret,omitempty"` // Config needs to use a configuration file to connect. If you have defined a Secret, //it will use the Secret for encoding and decoding to ensure data security. Moderate recommendation. // config usually can be /etc/kubernetes/admin.conf or ~/.kube/config // +optional Config *ConfigRef `json:"config,omitempty"` // The Token display declares the token and CABundle connected to the cluster, // which is not safe, not recommended, and has the lowest priority. // +optional Token *TokenRef `json:"token,omitempty"` // InsecureSkipTLSVerification indicates that the cluster pool should not confirm the validity of the serving // certificate of the cluster it is connecting to. This will make the HTTPS connection between the cluster pool // and the member cluster insecure. // Defaults to false. // +optional InsecureSkipTLSVerification bool `json:"insecureSkipTLSVerification,omitempty"` // Kubernetes API Server endpoint. // hostname:port, IP or IP:port. // Example: https://10.10.0.1:6443 // +optional Endpoint string `json:"endpoint,omitempty"` // ProxyURL is the proxy URL for the cluster. // If not empty, the multi-cluster control plane will use this proxy to talk to the cluster. // More details please refer to: https://github.com/kubernetes/client-go/issues/351 // +optional ProxyURL string `json:"proxyURL,omitempty"` // ProxyHeader is the HTTP header required by proxy server. // The key in the key-value pair is HTTP header key and value is the associated header payloads. // For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3'). // +optional ProxyHeader map[string]string `json:"proxyHeader,omitempty"` }
func (*ConnectConfig) DeepCopy ¶
func (in *ConnectConfig) DeepCopy() *ConnectConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectConfig.
func (*ConnectConfig) DeepCopyInto ¶
func (in *ConnectConfig) DeepCopyInto(out *ConnectConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSummary ¶
type NodeSummary struct { // TotalNum is the total number of nodes in the cluster. // +optional TotalNum int32 `json:"total,omitempty"` // ReadyNum is the number of ready nodes in the cluster. // +optional ReadyNum int32 `json:"ready,omitempty"` }
NodeSummary represents the summary of nodes status in a specific cluster.
func (*NodeSummary) DeepCopy ¶
func (in *NodeSummary) DeepCopy() *NodeSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSummary.
func (*NodeSummary) DeepCopyInto ¶
func (in *NodeSummary) DeepCopyInto(out *NodeSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Region ¶
type Region struct { // Zone represents the zone of the member cluster locate in. // +optional Zone string `json:"zone,omitempty"` // Country represents the country of the member cluster locate in. // +optional Country string `json:"country,omitempty"` // Province represents the province of the member cluster locate in. // +optional Province string `json:"province,omitempty"` // City represents the city of the member cluster locate in. // +optional City string `json:"city,omitempty"` }
func (*Region) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Region.
func (*Region) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretRef ¶
type SecretRef struct { // Namespace is the namespace for the resource being referenced. Namespace string `json:"namespace"` // Name is the name of resource being referenced. Name string `json:"name"` }
func (*SecretRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TokenRef ¶
type TokenRef struct { // CABundle contains the certificate authority information. // +optional CABundle []byte `json:"caBundle,omitempty"` // Token contain the token authority information. // +optional Token string `json:"token,omitempty"` }
func (*TokenRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenRef.
func (*TokenRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.