Documentation ¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type AgentConfig
- type ClusterPodSubnetTopologySpread
- type ClusterPodSubnetTopologySpreadList
- type ClusterPodSubnetTopologySpreadSpec
- type ClusterPodSubnetTopologySpreadStatus
- type NetResourceConfigSet
- type NetResourceConfigSetList
- type NetResourceConfigSetSpec
- type NetResourceConfigSetStatus
- type SecurityGroup
- type SecurityGroupList
- type SecurityGroupPolicy
- type SecurityGroupRules
- type SecurityGroupSpec
- type SecurityGroupStatus
- type SecurityGroupType
- type SecurityGroupUserRoles
- type SecurityReleation
- type SecurityReleationType
Constants ¶
const ( ENISubnetIDsConfigKey = "eni-subnet-ids" EnableRDMAConfigKey = "enable-rdma" ManualMTUConfigKey = "mtu" ElasticNetworkInterfaceUseModeConfigKey = "eni-use-mode" EniSecurityGroupIdsConfigKey = "eni-security-group-ids" EniEnterpriseSecurityGroupIdsConfigKey = "eni-enterprise-security-group-ids" BurstableMehrfachENIConfigKey = "burstable-mehrfach-eni" ReleaseExcessIPsConfigKey = "release-excess-ips" ExtCNIPluginsConfigKey = "ext-cni-plugins" )
const ( // CustomResourceDefinitionGroup is the name of the third party resource group CustomResourceDefinitionGroup = k8sconst.CustomResourceDefinitionGroup // CustomResourceDefinitionVersion is the current version of the resource CustomResourceDefinitionVersion = "v2alpha1" KindClusterPodSubnetTopologySpread = "clusterpodsubnettopologyspreads" KindSecurityGroup = "securitygroups" KindNetResouceConfigSet = "netresourceconfigsets" )
const ( SecurityGroupTypeEnterprise SecurityGroupType = "enterprise" SecurityGroupTypeNormal SecurityGroupType = "securitygroup" SecurityGroupTypeACL SecurityGroupType = "acl" SecurityGroupPolicyAccept SecurityGroupPolicy = "accept" SecurityGroupPolicyDrop SecurityGroupPolicy = "drop" SecurityGroupConstantAll = "all" SecurityGroupConstantEmpty = "" SecurityGroupConstantIPv4 = "IPv4" SecurityGroupConstantIPv6 = "IPv6" )
const (
GroupName = "cce.baidubce.com"
)
GroupName is the group name used in this package
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var ( // DefaultReuseIPTTL default timeout for reusing IP addresses. // If this time is not set, the default value is 7 days DefaultReuseIPTTL = &metav1.Duration{Duration: time.Hour * 24 * 7} )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: CustomResourceDefinitionVersion}
SchemeGroupVersion is 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 AgentConfig ¶
type AgentConfig struct { EniSubnetIDs []string `json:"eni-subnet-ids,omitempty"` EnableRDMA *bool `json:"enable-rdma,omitempty"` ManualMTU *int `json:"mtu,omitempty"` EniUseMode *string `json:"eni-use-mode,omitempty"` EniSecurityGroupIds []string `json:"eni-security-group-ids,omitempty"` EniEnterpriseSecurityGroupIds []string `json:"eni-enterprise-security-group-id,omitempty"` BurstableMehrfachENI *int `json:"burstable-mehrfach-eni,omitempty"` ReleaseExcessIPs *bool `json:"release-excess-ips,omitempty"` ExtCniPlugins []string `json:"ext-cni-plugins,omitempty"` UsePrimaryAddress *bool `json:"use-eni-primary-address,omitempty"` IPPoolPreAllocateENI *int `json:"ippool-pre-allocate-eni,omitempty"` IPPoolMinAllocate *int `json:"ippool-min-allocate,omitempty"` IPPoolPreAllocate *int `json:"ippool-pre-allocate,omitempty"` IPPoolMaxAboveWatermark *int `json:"ippool-max-above-watermark,omitempty"` RouteTableOffset *int `json:"route-table-offset,omitempty"` }
func (*AgentConfig) DeepCopy ¶
func (in *AgentConfig) DeepCopy() *AgentConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentConfig.
func (*AgentConfig) DeepCopyInto ¶
func (in *AgentConfig) DeepCopyInto(out *AgentConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPodSubnetTopologySpread ¶
type ClusterPodSubnetTopologySpread struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterPodSubnetTopologySpreadSpec `json:"spec,omitempty"` Status ClusterPodSubnetTopologySpreadStatus `json:"status,omitempty"` }
ClusterPodSubnetTopologySpread describes how to distribute pods in the scenario of sub customized subnets
func (*ClusterPodSubnetTopologySpread) DeepCopy ¶
func (in *ClusterPodSubnetTopologySpread) DeepCopy() *ClusterPodSubnetTopologySpread
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodSubnetTopologySpread.
func (*ClusterPodSubnetTopologySpread) DeepCopyInto ¶
func (in *ClusterPodSubnetTopologySpread) DeepCopyInto(out *ClusterPodSubnetTopologySpread)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPodSubnetTopologySpread) DeepCopyObject ¶
func (in *ClusterPodSubnetTopologySpread) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPodSubnetTopologySpreadList ¶
type ClusterPodSubnetTopologySpreadList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterPodSubnetTopologySpread `json:"items"` }
ClusterPodSubnetTopologySpreadList contains a list of PodSubnetTopologySpread
func (*ClusterPodSubnetTopologySpreadList) DeepCopy ¶
func (in *ClusterPodSubnetTopologySpreadList) DeepCopy() *ClusterPodSubnetTopologySpreadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodSubnetTopologySpreadList.
func (*ClusterPodSubnetTopologySpreadList) DeepCopyInto ¶
func (in *ClusterPodSubnetTopologySpreadList) DeepCopyInto(out *ClusterPodSubnetTopologySpreadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPodSubnetTopologySpreadList) DeepCopyObject ¶
func (in *ClusterPodSubnetTopologySpreadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPodSubnetTopologySpreadSpec ¶
type ClusterPodSubnetTopologySpreadSpec struct { ccev2.PodSubnetTopologySpreadSpec `json:",inline"` NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` }
func (*ClusterPodSubnetTopologySpreadSpec) DeepCopy ¶
func (in *ClusterPodSubnetTopologySpreadSpec) DeepCopy() *ClusterPodSubnetTopologySpreadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodSubnetTopologySpreadSpec.
func (*ClusterPodSubnetTopologySpreadSpec) DeepCopyInto ¶
func (in *ClusterPodSubnetTopologySpreadSpec) DeepCopyInto(out *ClusterPodSubnetTopologySpreadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPodSubnetTopologySpreadStatus ¶
type ClusterPodSubnetTopologySpreadStatus struct { SubStatus map[string]ccev2.PodSubnetTopologySpreadStatus `json:"subStatus,omitempty"` SubObjectCount int `json:"subobject-count,omitempty"` ExpectObjectCount int `json:"expect-object-count,omitempty"` Status ccev2.PodSubnetTopologySpreadStatus `json:"status,omitempty"` }
func (*ClusterPodSubnetTopologySpreadStatus) DeepCopy ¶
func (in *ClusterPodSubnetTopologySpreadStatus) DeepCopy() *ClusterPodSubnetTopologySpreadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodSubnetTopologySpreadStatus.
func (*ClusterPodSubnetTopologySpreadStatus) DeepCopyInto ¶
func (in *ClusterPodSubnetTopologySpreadStatus) DeepCopyInto(out *ClusterPodSubnetTopologySpreadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetResourceConfigSet ¶
type NetResourceConfigSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NetResourceConfigSetSpec `json:"spec,omitempty"` Status NetResourceConfigSetStatus `json:"status,omitempty"` }
NetResourceConfigSet describes how to distribute network resources configuration to nodes.
func (*NetResourceConfigSet) DeepCopy ¶
func (in *NetResourceConfigSet) DeepCopy() *NetResourceConfigSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceConfigSet.
func (*NetResourceConfigSet) DeepCopyInto ¶
func (in *NetResourceConfigSet) DeepCopyInto(out *NetResourceConfigSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetResourceConfigSet) DeepCopyObject ¶
func (in *NetResourceConfigSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetResourceConfigSetList ¶
type NetResourceConfigSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NetResourceConfigSet `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
NetResourceConfigSet contains a list of NetResourceConfigSet
func (*NetResourceConfigSetList) DeepCopy ¶
func (in *NetResourceConfigSetList) DeepCopy() *NetResourceConfigSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceConfigSetList.
func (*NetResourceConfigSetList) DeepCopyInto ¶
func (in *NetResourceConfigSetList) DeepCopyInto(out *NetResourceConfigSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetResourceConfigSetList) DeepCopyObject ¶
func (in *NetResourceConfigSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetResourceConfigSetSpec ¶
type NetResourceConfigSetSpec struct { // Selector is a label query over node that should match the node count. // +kubebuilder:validation:Required Selector *metav1.LabelSelector `json:"selector"` // Priority describes which object the target pod should use when multiple // objects affect a pod at the same time. The higher the priority value, // the earlier the object is configured. When multiple objects have the same // priority value, only the configuration of the first object is taken. Priority int32 `json:"priority,omitempty"` // Agent is the configuration of the agent. // // +kubebuilder:prunning:PreserveUnknownFields AgentConfig AgentConfig `json:"agent,omitempty"` }
func (*NetResourceConfigSetSpec) DeepCopy ¶
func (in *NetResourceConfigSetSpec) DeepCopy() *NetResourceConfigSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceConfigSetSpec.
func (*NetResourceConfigSetSpec) DeepCopyInto ¶
func (in *NetResourceConfigSetSpec) DeepCopyInto(out *NetResourceConfigSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetResourceConfigSetStatus ¶
type NetResourceConfigSetStatus struct { // AgentVersion is the config version of agent. // key is name of node // value is resiversion of nrcs AgentVersion map[string]string `json:"agentVersion,omitempty"` // NodeCount is the number of nodes was selected by this NRCS. NodeCount int32 `json:"nodeCount,omitempty"` }
func (*NetResourceConfigSetStatus) DeepCopy ¶
func (in *NetResourceConfigSetStatus) DeepCopy() *NetResourceConfigSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetResourceConfigSetStatus.
func (*NetResourceConfigSetStatus) DeepCopyInto ¶
func (in *NetResourceConfigSetStatus) DeepCopyInto(out *NetResourceConfigSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityGroup ¶
type SecurityGroup struct { // +deepequal-gen=false metav1.TypeMeta `json:",inline"` // +deepequal-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` Spec SecurityGroupSpec `json:"spec,omitempty"` Status SecurityGroupStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +deepequal-gen=false +genclient:nonNamespaced +kubebuilder:resource:categories={cce},singular="securitygroup",path="securitygroups",shortName="sg",scope="Cluster" +kubebuilder:storageversion +kubebuilder:subresource:status
This columns will be printed by exec `kubectl get sgs` +kubebuilder:printcolumn:JSONPath=".spec.name",description="security group name",name="SGName",type=string +kubebuilder:printcolumn:JSONPath=".spec.type",description="type of security group",name="Type",type=string +kubebuilder:printcolumn:JSONPath=".status.userRolesStr",description="roles of user",name="Roles",type=string +kubebuilder:printcolumn:JSONPath=".status.userCount",description="user count",name="UserCount",type=integer +kubebuilder:printcolumn:JSONPath=".status.constraintViolated",description="Is the Ingress constraint violated,",name="CV",type=integer
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) DeepCopyObject ¶
func (in *SecurityGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SecurityGroupList ¶
type SecurityGroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []SecurityGroup `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=false +deepequal-gen=false
func (*SecurityGroupList) DeepCopy ¶
func (in *SecurityGroupList) DeepCopy() *SecurityGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupList.
func (*SecurityGroupList) DeepCopyInto ¶
func (in *SecurityGroupList) DeepCopyInto(out *SecurityGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecurityGroupList) DeepCopyObject ¶
func (in *SecurityGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SecurityGroupPolicy ¶
type SecurityGroupPolicy string
type SecurityGroupRules ¶
type SecurityGroupRules struct { Allows []*bccapi.SecurityGroupRuleModel `json:"allows,omitempty"` Drops []*bccapi.SecurityGroupRuleModel `json:"drops,omitempty"` }
func (*SecurityGroupRules) DeepCopy ¶
func (in *SecurityGroupRules) DeepCopy() *SecurityGroupRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRules.
func (*SecurityGroupRules) DeepCopyInto ¶
func (in *SecurityGroupRules) DeepCopyInto(out *SecurityGroupRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityGroupSpec ¶
type SecurityGroupSpec struct { ID string `json:"id"` Name string `json:"name,omitempty"` Desc string `json:"desc,omitempty"` VpcId string `json:"vpcId,omitempty"` Tags []model.TagModel `json:"tags,omitempty"` // SeurityGroupType enterprise/normal/acl // normal is security group for vpc Type SecurityGroupType `json:"type"` IngressRule SecurityGroupRules `json:"ingressRule,omitempty"` EgressRule SecurityGroupRules `json:"egressRule,omitempty"` Version int64 `json:"vpcVersion,omitempty"` }
func (*SecurityGroupSpec) DeepCopy ¶
func (in *SecurityGroupSpec) DeepCopy() *SecurityGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupSpec.
func (*SecurityGroupSpec) DeepCopyInto ¶
func (in *SecurityGroupSpec) DeepCopyInto(out *SecurityGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityGroupStatus ¶
type SecurityGroupStatus struct { Version int64 `json:"version,omitempty"` UseStatus bool `json:"useStatus,omitempty"` UsedByMater bool `json:"usedByMater,omitempty"` UsedByNode bool `json:"usedByNode,omitempty"` UsedByPod bool `json:"usedByPod,omitempty"` UsedBySubnet bool `json:"usedBySubnet,omitempty"` UsedByENI bool `json:"usedByENI,omitempty"` UserRolesStr string `json:"userRolesStr,omitempty"` MachineCount int `json:"machineCount,omitempty"` ENICount int `json:"eniCount,omitempty"` UserCount int `json:"userCount,omitempty"` // ConstraintViolated is the Ingress constraint violated, // which may cause traffic to be unable to access the k8s cluster normally ConstraintViolated int `json:"constraintViolated,omitempty"` // LastAlterTime last alter time LastAlterTime *metav1.Time `json:"lastAlterTime,omitempty"` }
SecurityGroupStatus desribes the status of security group Mainly explain which elements in the cluster are using this security group
func (*SecurityGroupStatus) DeepCopy ¶
func (in *SecurityGroupStatus) DeepCopy() *SecurityGroupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupStatus.
func (*SecurityGroupStatus) DeepCopyInto ¶
func (in *SecurityGroupStatus) DeepCopyInto(out *SecurityGroupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityGroupType ¶
type SecurityGroupType string
type SecurityGroupUserRoles ¶
type SecurityGroupUserRoles string
const ( SecurityGroupUserRolesMaster SecurityGroupUserRoles = "master" SecurityGroupUserRolesNode SecurityGroupUserRoles = "node" SecurityGroupUserRolesPod SecurityGroupUserRoles = "pod" SecurityGroupUserRolesLbSecurityGroupUserRoles = "lb" )
type SecurityReleation ¶
type SecurityReleation map[SecurityReleationType][]string
SecurityReleationType desribes the type of releation between security group and other resources
func (SecurityReleation) DeepCopy ¶
func (in SecurityReleation) DeepCopy() SecurityReleation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityReleation.
func (SecurityReleation) DeepCopyInto ¶
func (in SecurityReleation) DeepCopyInto(out *SecurityReleation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecurityReleationType ¶
type SecurityReleationType string
SecurityReleationType desribes the type of releation between security group and other resources
const ( SecurityReleationTypeBCC SecurityReleationType = "bcc" SecurityReleationTypeBBC = "bbc" SecurityReleationTypeEni SecurityReleationType = "eni" SecurityReleationTypeSubnet SecurityReleationType = "subnet" SecurityReleationTypeBlb SecurityReleationType = "blb" )