1
0
mirror of https://github.com/rancher/types.git synced 2025-06-27 05:56:50 +00:00

Add generated code

This commit is contained in:
Darren Shepherd 2017-11-10 21:58:55 -07:00
parent 1d1da066b5
commit 2d8cd96180
43 changed files with 1659 additions and 0 deletions

View File

@ -0,0 +1,8 @@
package client
const (
AKSConfigType = "aksConfig"
)
type AKSConfig struct {
}

View File

@ -0,0 +1,12 @@
package client
const (
AttachedVolumeType = "attachedVolume"
AttachedVolumeFieldDevicePath = "devicePath"
AttachedVolumeFieldName = "name"
)
type AttachedVolume struct {
DevicePath string `json:"devicePath,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -0,0 +1,28 @@
package client
import (
"github.com/rancher/norman/clientbase"
)
type Client struct {
clientbase.APIBaseClient
Cluster ClusterOperations
ClusterNode ClusterNodeOperations
}
func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
baseClient, err := clientbase.NewAPIClient(opts)
if err != nil {
return nil, err
}
client := &Client{
APIBaseClient: baseClient,
}
client.Cluster = newClusterClient(client)
client.ClusterNode = newClusterNodeClient(client)
return client, nil
}

View File

@ -0,0 +1,85 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
ClusterType = "cluster"
ClusterFieldAPIVersion = "apiVersion"
ClusterFieldKind = "kind"
ClusterFieldObjectMeta = "objectMeta"
ClusterFieldSpec = "spec"
ClusterFieldStatus = "status"
)
type Cluster struct {
types.Resource
APIVersion string `json:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty"`
ObjectMeta ObjectMeta `json:"objectMeta,omitempty"`
Spec ClusterSpec `json:"spec,omitempty"`
Status *ClusterStatus `json:"status,omitempty"`
}
type ClusterCollection struct {
types.Collection
Data []Cluster `json:"data,omitempty"`
client *ClusterClient
}
type ClusterClient struct {
apiClient *Client
}
type ClusterOperations interface {
List(opts *types.ListOpts) (*ClusterCollection, error)
Create(opts *Cluster) (*Cluster, error)
Update(existing *Cluster, updates interface{}) (*Cluster, error)
ById(id string) (*Cluster, error)
Delete(container *Cluster) error
}
func newClusterClient(apiClient *Client) *ClusterClient {
return &ClusterClient{
apiClient: apiClient,
}
}
func (c *ClusterClient) Create(container *Cluster) (*Cluster, error) {
resp := &Cluster{}
err := c.apiClient.Ops.DoCreate(ClusterType, container, resp)
return resp, err
}
func (c *ClusterClient) Update(existing *Cluster, updates interface{}) (*Cluster, error) {
resp := &Cluster{}
err := c.apiClient.Ops.DoUpdate(ClusterType, &existing.Resource, updates, resp)
return resp, err
}
func (c *ClusterClient) List(opts *types.ListOpts) (*ClusterCollection, error) {
resp := &ClusterCollection{}
err := c.apiClient.Ops.DoList(ClusterType, opts, resp)
resp.client = c
return resp, err
}
func (cc *ClusterCollection) Next() (*ClusterCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &ClusterCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *ClusterClient) ById(id string) (*Cluster, error) {
resp := &Cluster{}
err := c.apiClient.Ops.DoById(ClusterType, id, resp)
return resp, err
}
func (c *ClusterClient) Delete(container *Cluster) error {
return c.apiClient.Ops.DoResourceDelete(ClusterType, &container.Resource)
}

View File

@ -0,0 +1,12 @@
package client
const (
ClusterComponentStatusType = "clusterComponentStatus"
ClusterComponentStatusFieldConditions = "conditions"
ClusterComponentStatusFieldName = "name"
)
type ClusterComponentStatus struct {
Conditions []ComponentCondition `json:"conditions,omitempty"`
Name string `json:"name,omitempty"`
}

View File

@ -0,0 +1,18 @@
package client
const (
ClusterConditionType = "clusterCondition"
ClusterConditionFieldLastTransitionTime = "lastTransitionTime"
ClusterConditionFieldLastUpdateTime = "lastUpdateTime"
ClusterConditionFieldReason = "reason"
ClusterConditionFieldStatus = "status"
ClusterConditionFieldType = "type"
)
type ClusterCondition struct {
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
Reason string `json:"reason,omitempty"`
Status string `json:"status,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -0,0 +1,85 @@
package client
import (
"github.com/rancher/norman/types"
)
const (
ClusterNodeType = "clusterNode"
ClusterNodeFieldAPIVersion = "apiVersion"
ClusterNodeFieldKind = "kind"
ClusterNodeFieldObjectMeta = "objectMeta"
ClusterNodeFieldSpec = "spec"
ClusterNodeFieldStatus = "status"
)
type ClusterNode struct {
types.Resource
APIVersion string `json:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty"`
ObjectMeta ObjectMeta `json:"objectMeta,omitempty"`
Spec NodeSpec `json:"spec,omitempty"`
Status NodeStatus `json:"status,omitempty"`
}
type ClusterNodeCollection struct {
types.Collection
Data []ClusterNode `json:"data,omitempty"`
client *ClusterNodeClient
}
type ClusterNodeClient struct {
apiClient *Client
}
type ClusterNodeOperations interface {
List(opts *types.ListOpts) (*ClusterNodeCollection, error)
Create(opts *ClusterNode) (*ClusterNode, error)
Update(existing *ClusterNode, updates interface{}) (*ClusterNode, error)
ById(id string) (*ClusterNode, error)
Delete(container *ClusterNode) error
}
func newClusterNodeClient(apiClient *Client) *ClusterNodeClient {
return &ClusterNodeClient{
apiClient: apiClient,
}
}
func (c *ClusterNodeClient) Create(container *ClusterNode) (*ClusterNode, error) {
resp := &ClusterNode{}
err := c.apiClient.Ops.DoCreate(ClusterNodeType, container, resp)
return resp, err
}
func (c *ClusterNodeClient) Update(existing *ClusterNode, updates interface{}) (*ClusterNode, error) {
resp := &ClusterNode{}
err := c.apiClient.Ops.DoUpdate(ClusterNodeType, &existing.Resource, updates, resp)
return resp, err
}
func (c *ClusterNodeClient) List(opts *types.ListOpts) (*ClusterNodeCollection, error) {
resp := &ClusterNodeCollection{}
err := c.apiClient.Ops.DoList(ClusterNodeType, opts, resp)
resp.client = c
return resp, err
}
func (cc *ClusterNodeCollection) Next() (*ClusterNodeCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &ClusterNodeCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *ClusterNodeClient) ById(id string) (*ClusterNode, error) {
resp := &ClusterNode{}
err := c.apiClient.Ops.DoById(ClusterNodeType, id, resp)
return resp, err
}
func (c *ClusterNodeClient) Delete(container *ClusterNode) error {
return c.apiClient.Ops.DoResourceDelete(ClusterNodeType, &container.Resource)
}

View File

@ -0,0 +1,14 @@
package client
const (
ClusterSpecType = "clusterSpec"
ClusterSpecFieldAKSConfig = "aksConfig"
ClusterSpecFieldGKEConfig = "gkeConfig"
ClusterSpecFieldRKEConfig = "rkeConfig"
)
type ClusterSpec struct {
AKSConfig *AKSConfig `json:"aksConfig,omitempty"`
GKEConfig *GKEConfig `json:"gkeConfig,omitempty"`
RKEConfig *RKEConfig `json:"rkeConfig,omitempty"`
}

View File

@ -0,0 +1,22 @@
package client
const (
ClusterStatusType = "clusterStatus"
ClusterStatusFieldAPIEndpoint = "apiEndpoint"
ClusterStatusFieldAllocatable = "allocatable"
ClusterStatusFieldCACert = "caCert"
ClusterStatusFieldCapacity = "capacity"
ClusterStatusFieldComponentStatuses = "componentStatuses"
ClusterStatusFieldConditions = "conditions"
ClusterStatusFieldServiceAccountToken = "serviceAccountToken"
)
type ClusterStatus struct {
APIEndpoint string `json:"apiEndpoint,omitempty"`
Allocatable map[string]string `json:"allocatable,omitempty"`
CACert string `json:"caCert,omitempty"`
Capacity map[string]string `json:"capacity,omitempty"`
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
Conditions []ClusterCondition `json:"conditions,omitempty"`
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
}

View File

@ -0,0 +1,16 @@
package client
const (
ComponentConditionType = "componentCondition"
ComponentConditionFieldError = "error"
ComponentConditionFieldMessage = "message"
ComponentConditionFieldStatus = "status"
ComponentConditionFieldType = "type"
)
type ComponentCondition struct {
Error string `json:"error,omitempty"`
Message string `json:"message,omitempty"`
Status string `json:"status,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -0,0 +1,12 @@
package client
const (
ContainerImageType = "containerImage"
ContainerImageFieldNames = "names"
ContainerImageFieldSizeBytes = "sizeBytes"
)
type ContainerImage struct {
Names []string `json:"names,omitempty"`
SizeBytes int64 `json:"sizeBytes,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
DaemonEndpointType = "daemonEndpoint"
DaemonEndpointFieldPort = "port"
)
type DaemonEndpoint struct {
Port int64 `json:"port,omitempty"`
}

View File

@ -0,0 +1,8 @@
package client
const (
ETCDServiceType = "etcdService"
)
type ETCDService struct {
}

View File

@ -0,0 +1,34 @@
package client
const (
GKEConfigType = "gkeConfig"
GKEConfigFieldClusterIpv4Cidr = "clusterIpv4Cidr"
GKEConfigFieldCredentialPath = "credentialPath"
GKEConfigFieldDescription = "description"
GKEConfigFieldDiskSizeGb = "diskSizeGb"
GKEConfigFieldEnableAlphaFeature = "enableAlphaFeature"
GKEConfigFieldInitialClusterVersion = "initialClusterVersion"
GKEConfigFieldInitialNodeCount = "initialNodeCount"
GKEConfigFieldLabels = "labels"
GKEConfigFieldMachineType = "machineType"
GKEConfigFieldNodePoolID = "nodePoolID"
GKEConfigFieldProjectID = "projectID"
GKEConfigFieldUpdateConfig = "updateConfig"
GKEConfigFieldZone = "zone"
)
type GKEConfig struct {
ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"`
CredentialPath string `json:"credentialPath,omitempty"`
Description string `json:"description,omitempty"`
DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
EnableAlphaFeature bool `json:"enableAlphaFeature,omitempty"`
InitialClusterVersion string `json:"initialClusterVersion,omitempty"`
InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
MachineType string `json:"machineType,omitempty"`
NodePoolID string `json:"nodePoolID,omitempty"`
ProjectID string `json:"projectID,omitempty"`
UpdateConfig gkeUpdateConfig `json:"updateConfig,omitempty"`
Zone string `json:"zone,omitempty"`
}

View File

@ -0,0 +1,14 @@
package client
const (
gkeUpdateConfigType = "gkeUpdateConfig"
gkeUpdateConfigFieldMasterVersion = "masterVersion"
gkeUpdateConfigFieldNodeCount = "nodeCount"
gkeUpdateConfigFieldNodeVersion = "nodeVersion"
)
type gkeUpdateConfig struct {
MasterVersion string `json:"masterVersion,omitempty"`
NodeCount int64 `json:"nodeCount,omitempty"`
NodeVersion string `json:"nodeVersion,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
InitializerType = "initializer"
InitializerFieldName = "name"
)
type Initializer struct {
Name string `json:"name,omitempty"`
}

View File

@ -0,0 +1,12 @@
package client
const (
InitializersType = "initializers"
InitializersFieldPending = "pending"
InitializersFieldResult = "result"
)
type Initializers struct {
Pending []Initializer `json:"pending,omitempty"`
Result *Status `json:"result,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
KubeAPIServiceType = "kubeAPIService"
KubeAPIServiceFieldServiceClusterIPRange = "serviceClusterIPRange"
)
type KubeAPIService struct {
ServiceClusterIPRange string `json:"serviceClusterIPRange,omitempty"`
}

View File

@ -0,0 +1,12 @@
package client
const (
KubeControllerServiceType = "kubeControllerService"
KubeControllerServiceFieldClusterCIDR = "clusterCIDR"
KubeControllerServiceFieldServiceClusterIPRange = "serviceClusterIPRange"
)
type KubeControllerService struct {
ClusterCIDR string `json:"clusterCIDR,omitempty"`
ServiceClusterIPRange string `json:"serviceClusterIPRange,omitempty"`
}

View File

@ -0,0 +1,14 @@
package client
const (
KubeletServiceType = "kubeletService"
KubeletServiceFieldClusterDNSServer = "clusterDNSServer"
KubeletServiceFieldClusterDomain = "clusterDomain"
KubeletServiceFieldInfraContainerImage = "infraContainerImage"
)
type KubeletService struct {
ClusterDNSServer string `json:"clusterDNSServer,omitempty"`
ClusterDomain string `json:"clusterDomain,omitempty"`
InfraContainerImage string `json:"infraContainerImage,omitempty"`
}

View File

@ -0,0 +1,8 @@
package client
const (
KubeproxyServiceType = "kubeproxyService"
)
type KubeproxyService struct {
}

View File

@ -0,0 +1,14 @@
package client
const (
ListMetaType = "listMeta"
ListMetaFieldContinue = "continue"
ListMetaFieldResourceVersion = "resourceVersion"
ListMetaFieldSelfLink = "selfLink"
)
type ListMeta struct {
Continue string `json:"continue,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty"`
SelfLink string `json:"selfLink,omitempty"`
}

View File

@ -0,0 +1,12 @@
package client
const (
NodeAddressType = "nodeAddress"
NodeAddressFieldAddress = "address"
NodeAddressFieldType = "type"
)
type NodeAddress struct {
Address string `json:"address,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
NodeConditionType = "nodeCondition"
NodeConditionFieldLastHeartbeatTime = "lastHeartbeatTime"
NodeConditionFieldLastTransitionTime = "lastTransitionTime"
NodeConditionFieldMessage = "message"
NodeConditionFieldReason = "reason"
NodeConditionFieldStatus = "status"
NodeConditionFieldType = "type"
)
type NodeCondition struct {
LastHeartbeatTime string `json:"lastHeartbeatTime,omitempty"`
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
Message string `json:"message,omitempty"`
Reason string `json:"reason,omitempty"`
Status string `json:"status,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -0,0 +1,14 @@
package client
const (
NodeConfigSourceType = "nodeConfigSource"
NodeConfigSourceFieldAPIVersion = "apiVersion"
NodeConfigSourceFieldConfigMapRef = "configMapRef"
NodeConfigSourceFieldKind = "kind"
)
type NodeConfigSource struct {
APIVersion string `json:"apiVersion,omitempty"`
ConfigMapRef *ObjectReference `json:"configMapRef,omitempty"`
Kind string `json:"kind,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
NodeDaemonEndpointsType = "nodeDaemonEndpoints"
NodeDaemonEndpointsFieldKubeletEndpoint = "kubeletEndpoint"
)
type NodeDaemonEndpoints struct {
KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
NodeSpecType = "nodeSpec"
NodeSpecFieldConfigSource = "configSource"
NodeSpecFieldExternalID = "externalID"
NodeSpecFieldPodCIDR = "podCIDR"
NodeSpecFieldProviderID = "providerID"
NodeSpecFieldTaints = "taints"
NodeSpecFieldUnschedulable = "unschedulable"
)
type NodeSpec struct {
ConfigSource *NodeConfigSource `json:"configSource,omitempty"`
ExternalID string `json:"externalID,omitempty"`
PodCIDR string `json:"podCIDR,omitempty"`
ProviderID string `json:"providerID,omitempty"`
Taints []Taint `json:"taints,omitempty"`
Unschedulable bool `json:"unschedulable,omitempty"`
}

View File

@ -0,0 +1,28 @@
package client
const (
NodeStatusType = "nodeStatus"
NodeStatusFieldAddresses = "addresses"
NodeStatusFieldAllocatable = "allocatable"
NodeStatusFieldCapacity = "capacity"
NodeStatusFieldConditions = "conditions"
NodeStatusFieldDaemonEndpoints = "daemonEndpoints"
NodeStatusFieldImages = "images"
NodeStatusFieldNodeInfo = "nodeInfo"
NodeStatusFieldPhase = "phase"
NodeStatusFieldVolumesAttached = "volumesAttached"
NodeStatusFieldVolumesInUse = "volumesInUse"
)
type NodeStatus struct {
Addresses []NodeAddress `json:"addresses,omitempty"`
Allocatable map[string]string `json:"allocatable,omitempty"`
Capacity map[string]string `json:"capacity,omitempty"`
Conditions []NodeCondition `json:"conditions,omitempty"`
DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty"`
Images []ContainerImage `json:"images,omitempty"`
NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty"`
Phase string `json:"phase,omitempty"`
VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty"`
VolumesInUse []string `json:"volumesInUse,omitempty"`
}

View File

@ -0,0 +1,28 @@
package client
const (
NodeSystemInfoType = "nodeSystemInfo"
NodeSystemInfoFieldArchitecture = "architecture"
NodeSystemInfoFieldBootID = "bootID"
NodeSystemInfoFieldContainerRuntimeVersion = "containerRuntimeVersion"
NodeSystemInfoFieldKernelVersion = "kernelVersion"
NodeSystemInfoFieldKubeProxyVersion = "kubeProxyVersion"
NodeSystemInfoFieldKubeletVersion = "kubeletVersion"
NodeSystemInfoFieldMachineID = "machineID"
NodeSystemInfoFieldOSImage = "osImage"
NodeSystemInfoFieldOperatingSystem = "operatingSystem"
NodeSystemInfoFieldSystemUUID = "systemUUID"
)
type NodeSystemInfo struct {
Architecture string `json:"architecture,omitempty"`
BootID string `json:"bootID,omitempty"`
ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"`
KernelVersion string `json:"kernelVersion,omitempty"`
KubeProxyVersion string `json:"kubeProxyVersion,omitempty"`
KubeletVersion string `json:"kubeletVersion,omitempty"`
MachineID string `json:"machineID,omitempty"`
OSImage string `json:"osImage,omitempty"`
OperatingSystem string `json:"operatingSystem,omitempty"`
SystemUUID string `json:"systemUUID,omitempty"`
}

View File

@ -0,0 +1,40 @@
package client
const (
ObjectMetaType = "objectMeta"
ObjectMetaFieldAnnotations = "annotations"
ObjectMetaFieldClusterName = "clusterName"
ObjectMetaFieldCreationTimestamp = "creationTimestamp"
ObjectMetaFieldDeletionGracePeriodSeconds = "deletionGracePeriodSeconds"
ObjectMetaFieldDeletionTimestamp = "deletionTimestamp"
ObjectMetaFieldFinalizers = "finalizers"
ObjectMetaFieldGenerateName = "generateName"
ObjectMetaFieldGeneration = "generation"
ObjectMetaFieldInitializers = "initializers"
ObjectMetaFieldLabels = "labels"
ObjectMetaFieldName = "name"
ObjectMetaFieldNamespace = "namespace"
ObjectMetaFieldOwnerReferences = "ownerReferences"
ObjectMetaFieldResourceVersion = "resourceVersion"
ObjectMetaFieldSelfLink = "selfLink"
ObjectMetaFieldUID = "uid"
)
type ObjectMeta struct {
Annotations map[string]string `json:"annotations,omitempty"`
ClusterName string `json:"clusterName,omitempty"`
CreationTimestamp string `json:"creationTimestamp,omitempty"`
DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"`
DeletionTimestamp string `json:"deletionTimestamp,omitempty"`
Finalizers []string `json:"finalizers,omitempty"`
GenerateName string `json:"generateName,omitempty"`
Generation int64 `json:"generation,omitempty"`
Initializers *Initializers `json:"initializers,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Name string `json:"name,omitempty"`
Namespace string `json:"namespace,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty"`
SelfLink string `json:"selfLink,omitempty"`
UID string `json:"uid,omitempty"`
}

View File

@ -0,0 +1,22 @@
package client
const (
ObjectReferenceType = "objectReference"
ObjectReferenceFieldAPIVersion = "apiVersion"
ObjectReferenceFieldFieldPath = "fieldPath"
ObjectReferenceFieldKind = "kind"
ObjectReferenceFieldName = "name"
ObjectReferenceFieldNamespace = "namespace"
ObjectReferenceFieldResourceVersion = "resourceVersion"
ObjectReferenceFieldUID = "uid"
)
type ObjectReference struct {
APIVersion string `json:"apiVersion,omitempty"`
FieldPath string `json:"fieldPath,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
Namespace string `json:"namespace,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty"`
UID string `json:"uid,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
OwnerReferenceType = "ownerReference"
OwnerReferenceFieldAPIVersion = "apiVersion"
OwnerReferenceFieldBlockOwnerDeletion = "blockOwnerDeletion"
OwnerReferenceFieldController = "controller"
OwnerReferenceFieldKind = "kind"
OwnerReferenceFieldName = "name"
OwnerReferenceFieldUID = "uid"
)
type OwnerReference struct {
APIVersion string `json:"apiVersion,omitempty"`
BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"`
Controller *bool `json:"controller,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
UID string `json:"uid,omitempty"`
}

View File

@ -0,0 +1,16 @@
package client
const (
RKEConfigType = "rkeConfig"
RKEConfigFieldAuthType = "authType"
RKEConfigFieldHosts = "hosts"
RKEConfigFieldNetworkPlugin = "networkPlugin"
RKEConfigFieldServices = "services"
)
type RKEConfig struct {
AuthType string `json:"authType,omitempty"`
Hosts []RKEConfigHost `json:"hosts,omitempty"`
NetworkPlugin string `json:"networkPlugin,omitempty"`
Services RKEConfigServices `json:"services,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
RKEConfigHostType = "rkeConfigHost"
RKEConfigHostFieldAdvertiseAddress = "advertiseAddress"
RKEConfigHostFieldDockerSocket = "dockerSocket"
RKEConfigHostFieldHostname = "hostname"
RKEConfigHostFieldIP = "ip"
RKEConfigHostFieldRole = "role"
RKEConfigHostFieldUser = "user"
)
type RKEConfigHost struct {
AdvertiseAddress string `json:"advertiseAddress,omitempty"`
DockerSocket string `json:"dockerSocket,omitempty"`
Hostname string `json:"hostname,omitempty"`
IP string `json:"ip,omitempty"`
Role []string `json:"role,omitempty"`
User string `json:"user,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
RKEConfigServicesType = "rkeConfigServices"
RKEConfigServicesFieldEtcd = "etcd"
RKEConfigServicesFieldKubeAPI = "kubeAPI"
RKEConfigServicesFieldKubeController = "kubeController"
RKEConfigServicesFieldKubelet = "kubelet"
RKEConfigServicesFieldKubeproxy = "kubeproxy"
RKEConfigServicesFieldScheduler = "scheduler"
)
type RKEConfigServices struct {
Etcd ETCDService `json:"etcd,omitempty"`
KubeAPI KubeAPIService `json:"kubeAPI,omitempty"`
KubeController KubeControllerService `json:"kubeController,omitempty"`
Kubelet KubeletService `json:"kubelet,omitempty"`
Kubeproxy KubeproxyService `json:"kubeproxy,omitempty"`
Scheduler SchedulerService `json:"scheduler,omitempty"`
}

View File

@ -0,0 +1,8 @@
package client
const (
SchedulerServiceType = "schedulerService"
)
type SchedulerService struct {
}

View File

@ -0,0 +1,24 @@
package client
const (
StatusType = "status"
StatusFieldAPIVersion = "apiVersion"
StatusFieldCode = "code"
StatusFieldDetails = "details"
StatusFieldKind = "kind"
StatusFieldListMeta = "listMeta"
StatusFieldMessage = "message"
StatusFieldReason = "reason"
StatusFieldStatus = "status"
)
type Status struct {
APIVersion string `json:"apiVersion,omitempty"`
Code int64 `json:"code,omitempty"`
Details *StatusDetails `json:"details,omitempty"`
Kind string `json:"kind,omitempty"`
ListMeta ListMeta `json:"listMeta,omitempty"`
Message string `json:"message,omitempty"`
Reason string `json:"reason,omitempty"`
Status string `json:"status,omitempty"`
}

View File

@ -0,0 +1,14 @@
package client
const (
StatusCauseType = "statusCause"
StatusCauseFieldField = "field"
StatusCauseFieldMessage = "message"
StatusCauseFieldType = "type"
)
type StatusCause struct {
Field string `json:"field,omitempty"`
Message string `json:"message,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -0,0 +1,20 @@
package client
const (
StatusDetailsType = "statusDetails"
StatusDetailsFieldCauses = "causes"
StatusDetailsFieldGroup = "group"
StatusDetailsFieldKind = "kind"
StatusDetailsFieldName = "name"
StatusDetailsFieldRetryAfterSeconds = "retryAfterSeconds"
StatusDetailsFieldUID = "uid"
)
type StatusDetails struct {
Causes []StatusCause `json:"causes,omitempty"`
Group string `json:"group,omitempty"`
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
RetryAfterSeconds int64 `json:"retryAfterSeconds,omitempty"`
UID string `json:"uid,omitempty"`
}

View File

@ -0,0 +1,16 @@
package client
const (
TaintType = "taint"
TaintFieldEffect = "effect"
TaintFieldKey = "key"
TaintFieldTimeAdded = "timeAdded"
TaintFieldValue = "value"
)
type Taint struct {
Effect string `json:"effect,omitempty"`
Key string `json:"key,omitempty"`
TimeAdded string `json:"timeAdded,omitempty"`
Value string `json:"value,omitempty"`
}

View File

@ -0,0 +1,143 @@
package v1
import (
"sync"
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
)
var (
ClusterGroupVersionKind = schema.GroupVersionKind{
Version: "v1",
Group: "io.cattle.cluster",
Kind: "Cluster",
}
ClusterResource = metav1.APIResource{
Name: "clusters",
SingularName: "cluster",
Namespaced: false,
Kind: ClusterGroupVersionKind.Kind,
}
)
type ClusterHandlerFunc func(key string, obj *Cluster) error
type ClusterController interface {
Informer() cache.SharedIndexInformer
AddHandler(handler ClusterHandlerFunc)
Enqueue(namespace, name string)
Start(threadiness int, ctx context.Context) error
}
type ClusterInterface interface {
Create(*Cluster) (*Cluster, error)
Get(name string, opts metav1.GetOptions) (*Cluster, error)
Update(*Cluster) (*Cluster, error)
Delete(name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ClusterList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() (ClusterController, error)
}
type clusterController struct {
controller.GenericController
}
func (c *clusterController) AddHandler(handler ClusterHandlerFunc) {
c.GenericController.AddHandler(func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
return handler(key, obj.(*Cluster))
})
}
type clusterFactory struct {
}
func (c clusterFactory) Object() runtime.Object {
return &Cluster{}
}
func (c clusterFactory) List() runtime.Object {
return &ClusterList{}
}
func NewClusterClient(namespace string, config rest.Config) (ClusterInterface, error) {
objectClient, err := clientbase.NewObjectClient(namespace, config, &ClusterResource, ClusterGroupVersionKind, clusterFactory{})
return &clusterClient{
objectClient: objectClient,
}, err
}
func (s *clusterClient) Controller() (ClusterController, error) {
s.Lock()
defer s.Unlock()
if s.controller != nil {
return s.controller, nil
}
controller, err := controller.NewGenericController(ClusterGroupVersionKind.Kind+"Controller",
s.objectClient)
if err != nil {
return nil, err
}
s.controller = &clusterController{
GenericController: controller,
}
return s.controller, nil
}
type clusterClient struct {
sync.Mutex
objectClient *clientbase.ObjectClient
controller ClusterController
}
func (s *clusterClient) Create(o *Cluster) (*Cluster, error) {
obj, err := s.objectClient.Create(o)
return obj.(*Cluster), err
}
func (s *clusterClient) Get(name string, opts metav1.GetOptions) (*Cluster, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*Cluster), err
}
func (s *clusterClient) Update(o *Cluster) (*Cluster, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*Cluster), err
}
func (s *clusterClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *clusterClient) List(opts metav1.ListOptions) (*ClusterList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ClusterList), err
}
func (s *clusterClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
func (s *clusterClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}

View File

@ -0,0 +1,143 @@
package v1
import (
"sync"
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
)
var (
ClusterNodeGroupVersionKind = schema.GroupVersionKind{
Version: "v1",
Group: "io.cattle.cluster",
Kind: "ClusterNode",
}
ClusterNodeResource = metav1.APIResource{
Name: "clusternodes",
SingularName: "clusternode",
Namespaced: false,
Kind: ClusterNodeGroupVersionKind.Kind,
}
)
type ClusterNodeHandlerFunc func(key string, obj *ClusterNode) error
type ClusterNodeController interface {
Informer() cache.SharedIndexInformer
AddHandler(handler ClusterNodeHandlerFunc)
Enqueue(namespace, name string)
Start(threadiness int, ctx context.Context) error
}
type ClusterNodeInterface interface {
Create(*ClusterNode) (*ClusterNode, error)
Get(name string, opts metav1.GetOptions) (*ClusterNode, error)
Update(*ClusterNode) (*ClusterNode, error)
Delete(name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ClusterNodeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() (ClusterNodeController, error)
}
type clusterNodeController struct {
controller.GenericController
}
func (c *clusterNodeController) AddHandler(handler ClusterNodeHandlerFunc) {
c.GenericController.AddHandler(func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
return handler(key, obj.(*ClusterNode))
})
}
type clusterNodeFactory struct {
}
func (c clusterNodeFactory) Object() runtime.Object {
return &ClusterNode{}
}
func (c clusterNodeFactory) List() runtime.Object {
return &ClusterNodeList{}
}
func NewClusterNodeClient(namespace string, config rest.Config) (ClusterNodeInterface, error) {
objectClient, err := clientbase.NewObjectClient(namespace, config, &ClusterNodeResource, ClusterNodeGroupVersionKind, clusterNodeFactory{})
return &clusterNodeClient{
objectClient: objectClient,
}, err
}
func (s *clusterNodeClient) Controller() (ClusterNodeController, error) {
s.Lock()
defer s.Unlock()
if s.controller != nil {
return s.controller, nil
}
controller, err := controller.NewGenericController(ClusterNodeGroupVersionKind.Kind+"Controller",
s.objectClient)
if err != nil {
return nil, err
}
s.controller = &clusterNodeController{
GenericController: controller,
}
return s.controller, nil
}
type clusterNodeClient struct {
sync.Mutex
objectClient *clientbase.ObjectClient
controller ClusterNodeController
}
func (s *clusterNodeClient) Create(o *ClusterNode) (*ClusterNode, error) {
obj, err := s.objectClient.Create(o)
return obj.(*ClusterNode), err
}
func (s *clusterNodeClient) Get(name string, opts metav1.GetOptions) (*ClusterNode, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*ClusterNode), err
}
func (s *clusterNodeClient) Update(o *ClusterNode) (*ClusterNode, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*ClusterNode), err
}
func (s *clusterNodeClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *clusterNodeClient) List(opts metav1.ListOptions) (*ClusterNodeList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ClusterNodeList), err
}
func (s *clusterNodeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
func (s *clusterNodeClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}

View File

@ -0,0 +1,563 @@
// +build !ignore_autogenerated
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v1
import (
core_v1 "k8s.io/api/core/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AKSConfig).DeepCopyInto(out.(*AKSConfig))
return nil
}, InType: reflect.TypeOf(&AKSConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Cluster).DeepCopyInto(out.(*Cluster))
return nil
}, InType: reflect.TypeOf(&Cluster{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterComponentStatus).DeepCopyInto(out.(*ClusterComponentStatus))
return nil
}, InType: reflect.TypeOf(&ClusterComponentStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterCondition).DeepCopyInto(out.(*ClusterCondition))
return nil
}, InType: reflect.TypeOf(&ClusterCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterList).DeepCopyInto(out.(*ClusterList))
return nil
}, InType: reflect.TypeOf(&ClusterList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterNode).DeepCopyInto(out.(*ClusterNode))
return nil
}, InType: reflect.TypeOf(&ClusterNode{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterNodeList).DeepCopyInto(out.(*ClusterNodeList))
return nil
}, InType: reflect.TypeOf(&ClusterNodeList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterSpec).DeepCopyInto(out.(*ClusterSpec))
return nil
}, InType: reflect.TypeOf(&ClusterSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ClusterStatus).DeepCopyInto(out.(*ClusterStatus))
return nil
}, InType: reflect.TypeOf(&ClusterStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ETCDService).DeepCopyInto(out.(*ETCDService))
return nil
}, InType: reflect.TypeOf(&ETCDService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GKEConfig).DeepCopyInto(out.(*GKEConfig))
return nil
}, InType: reflect.TypeOf(&GKEConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*KubeAPIService).DeepCopyInto(out.(*KubeAPIService))
return nil
}, InType: reflect.TypeOf(&KubeAPIService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*KubeControllerService).DeepCopyInto(out.(*KubeControllerService))
return nil
}, InType: reflect.TypeOf(&KubeControllerService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*KubeletService).DeepCopyInto(out.(*KubeletService))
return nil
}, InType: reflect.TypeOf(&KubeletService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*KubeproxyService).DeepCopyInto(out.(*KubeproxyService))
return nil
}, InType: reflect.TypeOf(&KubeproxyService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEConfig).DeepCopyInto(out.(*RKEConfig))
return nil
}, InType: reflect.TypeOf(&RKEConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEConfigHost).DeepCopyInto(out.(*RKEConfigHost))
return nil
}, InType: reflect.TypeOf(&RKEConfigHost{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEConfigServices).DeepCopyInto(out.(*RKEConfigServices))
return nil
}, InType: reflect.TypeOf(&RKEConfigServices{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SchedulerService).DeepCopyInto(out.(*SchedulerService))
return nil
}, InType: reflect.TypeOf(&SchedulerService{})},
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AKSConfig) DeepCopyInto(out *AKSConfig) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSConfig.
func (in *AKSConfig) DeepCopy() *AKSConfig {
if in == nil {
return nil
}
out := new(AKSConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Cluster) DeepCopyInto(out *Cluster) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
if in.Status != nil {
in, out := &in.Status, &out.Status
if *in == nil {
*out = nil
} else {
*out = new(ClusterStatus)
(*in).DeepCopyInto(*out)
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (in *Cluster) DeepCopy() *Cluster {
if in == nil {
return nil
}
out := new(Cluster)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Cluster) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]core_v1.ComponentCondition, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentStatus.
func (in *ClusterComponentStatus) DeepCopy() *ClusterComponentStatus {
if in == nil {
return nil
}
out := new(ClusterComponentStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition.
func (in *ClusterCondition) DeepCopy() *ClusterCondition {
if in == nil {
return nil
}
out := new(ClusterCondition)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterList) DeepCopyInto(out *ClusterList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Cluster, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (in *ClusterList) DeepCopy() *ClusterList {
if in == nil {
return nil
}
out := new(ClusterList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterNode) DeepCopyInto(out *ClusterNode) {
*out = *in
in.Node.DeepCopyInto(&out.Node)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNode.
func (in *ClusterNode) DeepCopy() *ClusterNode {
if in == nil {
return nil
}
out := new(ClusterNode)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterNode) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterNodeList) DeepCopyInto(out *ClusterNodeList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ClusterNode, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeList.
func (in *ClusterNodeList) DeepCopy() *ClusterNodeList {
if in == nil {
return nil
}
out := new(ClusterNodeList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterNodeList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
*out = *in
if in.GKEConfig != nil {
in, out := &in.GKEConfig, &out.GKEConfig
if *in == nil {
*out = nil
} else {
*out = new(GKEConfig)
(*in).DeepCopyInto(*out)
}
}
if in.AKSConfig != nil {
in, out := &in.AKSConfig, &out.AKSConfig
if *in == nil {
*out = nil
} else {
*out = new(AKSConfig)
**out = **in
}
}
if in.RKEConfig != nil {
in, out := &in.RKEConfig, &out.RKEConfig
if *in == nil {
*out = nil
} else {
*out = new(RKEConfig)
(*in).DeepCopyInto(*out)
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (in *ClusterSpec) DeepCopy() *ClusterSpec {
if in == nil {
return nil
}
out := new(ClusterSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]ClusterCondition, len(*in))
copy(*out, *in)
}
if in.ComponentStatuses != nil {
in, out := &in.ComponentStatuses, &out.ComponentStatuses
*out = make([]ClusterComponentStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Capacity != nil {
in, out := &in.Capacity, &out.Capacity
*out = make(core_v1.ResourceList, len(*in))
for key, val := range *in {
(*out)[key] = val.DeepCopy()
}
}
if in.Allocatable != nil {
in, out := &in.Allocatable, &out.Allocatable
*out = make(core_v1.ResourceList, len(*in))
for key, val := range *in {
(*out)[key] = val.DeepCopy()
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (in *ClusterStatus) DeepCopy() *ClusterStatus {
if in == nil {
return nil
}
out := new(ClusterStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ETCDService) DeepCopyInto(out *ETCDService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ETCDService.
func (in *ETCDService) DeepCopy() *ETCDService {
if in == nil {
return nil
}
out := new(ETCDService)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GKEConfig) DeepCopyInto(out *GKEConfig) {
*out = *in
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
out.UpdateConfig = in.UpdateConfig
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GKEConfig.
func (in *GKEConfig) DeepCopy() *GKEConfig {
if in == nil {
return nil
}
out := new(GKEConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeAPIService) DeepCopyInto(out *KubeAPIService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIService.
func (in *KubeAPIService) DeepCopy() *KubeAPIService {
if in == nil {
return nil
}
out := new(KubeAPIService)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeControllerService) DeepCopyInto(out *KubeControllerService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerService.
func (in *KubeControllerService) DeepCopy() *KubeControllerService {
if in == nil {
return nil
}
out := new(KubeControllerService)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeletService) DeepCopyInto(out *KubeletService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletService.
func (in *KubeletService) DeepCopy() *KubeletService {
if in == nil {
return nil
}
out := new(KubeletService)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeproxyService) DeepCopyInto(out *KubeproxyService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeproxyService.
func (in *KubeproxyService) DeepCopy() *KubeproxyService {
if in == nil {
return nil
}
out := new(KubeproxyService)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEConfig) DeepCopyInto(out *RKEConfig) {
*out = *in
if in.Hosts != nil {
in, out := &in.Hosts, &out.Hosts
*out = make([]RKEConfigHost, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
out.Services = in.Services
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfig.
func (in *RKEConfig) DeepCopy() *RKEConfig {
if in == nil {
return nil
}
out := new(RKEConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEConfigHost) DeepCopyInto(out *RKEConfigHost) {
*out = *in
if in.Role != nil {
in, out := &in.Role, &out.Role
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfigHost.
func (in *RKEConfigHost) DeepCopy() *RKEConfigHost {
if in == nil {
return nil
}
out := new(RKEConfigHost)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEConfigServices) DeepCopyInto(out *RKEConfigServices) {
*out = *in
out.Etcd = in.Etcd
out.KubeAPI = in.KubeAPI
out.KubeController = in.KubeController
out.Scheduler = in.Scheduler
out.Kubelet = in.Kubelet
out.Kubeproxy = in.Kubeproxy
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfigServices.
func (in *RKEConfigServices) DeepCopy() *RKEConfigServices {
if in == nil {
return nil
}
out := new(RKEConfigServices)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SchedulerService) DeepCopyInto(out *SchedulerService) {
*out = *in
out.baseService = in.baseService
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerService.
func (in *SchedulerService) DeepCopy() *SchedulerService {
if in == nil {
return nil
}
out := new(SchedulerService)
in.DeepCopyInto(out)
return out
}