78 lines
4.4 KiB
Go
78 lines
4.4 KiB
Go
package v1alpha1
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
type MonoKSConfig struct {
|
|
metav1.TypeMeta `json:",inline" yaml:",inline"`
|
|
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
|
Spec MonoKSConfigSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
|
|
Status *MonoKSConfigStatus `json:"status,omitempty" yaml:"status,omitempty"`
|
|
}
|
|
|
|
type MonoKSConfigList struct {
|
|
metav1.TypeMeta `json:",inline"`
|
|
metav1.ListMeta `json:"metadata,omitempty"`
|
|
Items []MonoKSConfig `json:"items"`
|
|
}
|
|
|
|
type MonoKSConfigSpec struct {
|
|
KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"`
|
|
NodeName string `json:"nodeName,omitempty" yaml:"nodeName,omitempty"`
|
|
ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"`
|
|
ClusterDomain string `json:"clusterDomain,omitempty" yaml:"clusterDomain,omitempty"`
|
|
ClusterRole string `json:"clusterRole,omitempty" yaml:"clusterRole,omitempty"`
|
|
InitControlPlane bool `json:"initControlPlane,omitempty" yaml:"initControlPlane,omitempty"`
|
|
EnableControlAgent bool `json:"enableControlAgent,omitempty" yaml:"enableControlAgent,omitempty"`
|
|
PodSubnet string `json:"podSubnet,omitempty" yaml:"podSubnet,omitempty"`
|
|
ServiceSubnet string `json:"serviceSubnet,omitempty" yaml:"serviceSubnet,omitempty"`
|
|
APIServerAdvertiseAddress string `json:"apiServerAdvertiseAddress,omitempty" yaml:"apiServerAdvertiseAddress,omitempty"`
|
|
APIServerEndpoint string `json:"apiServerEndpoint,omitempty" yaml:"apiServerEndpoint,omitempty"`
|
|
ContainerRuntimeEndpoint string `json:"containerRuntimeEndpoint,omitempty" yaml:"containerRuntimeEndpoint,omitempty"`
|
|
BootstrapToken string `json:"bootstrapToken,omitempty" yaml:"bootstrapToken,omitempty"`
|
|
DiscoveryTokenCACertHash string `json:"discoveryTokenCACertHash,omitempty" yaml:"discoveryTokenCACertHash,omitempty"`
|
|
ControlPlaneCertKey string `json:"controlPlaneCertKey,omitempty" yaml:"controlPlaneCertKey,omitempty"`
|
|
CNIPlugin string `json:"cniPlugin,omitempty" yaml:"cniPlugin,omitempty"`
|
|
AllowSchedulingOnControlPlane bool `json:"allowSchedulingOnControlPlane,omitempty" yaml:"allowSchedulingOnControlPlane,omitempty"`
|
|
SkipImageCheck bool `json:"skipImageCheck,omitempty" yaml:"skipImageCheck,omitempty"`
|
|
KubeProxyNodePortAddresses []string `json:"kubeProxyNodePortAddresses,omitempty" yaml:"kubeProxyNodePortAddresses,omitempty"`
|
|
SubjectAltNames []string `json:"subjectAltNames,omitempty" yaml:"subjectAltNames,omitempty"`
|
|
NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"`
|
|
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"`
|
|
Network NetworkSpec `json:"network,omitempty" yaml:"network,omitempty"`
|
|
}
|
|
|
|
type NetworkSpec struct {
|
|
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
|
|
ManagementIface string `json:"managementIface,omitempty" yaml:"managementIface,omitempty"`
|
|
ManagementCIDR string `json:"managementCIDR,omitempty" yaml:"managementCIDR,omitempty"`
|
|
ManagementGW string `json:"managementGateway,omitempty" yaml:"managementGateway,omitempty"`
|
|
DNSNameservers []string `json:"dnsNameservers,omitempty" yaml:"dnsNameservers,omitempty"`
|
|
DNSSearchDomains []string `json:"dnsSearchDomains,omitempty" yaml:"dnsSearchDomains,omitempty"`
|
|
}
|
|
|
|
type MonoKSConfigStatus struct {
|
|
Phase string `json:"phase,omitempty"`
|
|
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
|
Conditions []metav1.Condition `json:"conditions,omitempty"`
|
|
AppliedSteps []string `json:"appliedSteps,omitempty"`
|
|
}
|
|
|
|
func (in *MonoKSConfig) DeepCopyObject() runtime.Object {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := *in
|
|
return &out
|
|
}
|
|
|
|
func (in *MonoKSConfigList) DeepCopyObject() runtime.Object {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := *in
|
|
return &out
|
|
}
|