diff --git a/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml b/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml index b4fd3e44594..c74184a537d 100644 --- a/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml +++ b/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml @@ -47,12 +47,26 @@ spec: description: PoolServiceSpec defines the desired state of PoolService properties: loadBalancerClass: + description: Inherited from service spec.LoadBalancerClass type: string type: object status: description: PoolServiceStatus defines the observed state of PoolService properties: + aggregateToAnnotations: + additionalProperties: + type: string + description: AggregateToAnnotations means that this information is + aggregated into the annotations of the service + type: object + aggregateToLabels: + additionalProperties: + type: string + description: AggregateToLabels means that this information is aggregated + into the labels of the service + type: object conditions: + description: Current poolService state items: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct @@ -122,7 +136,8 @@ spec: type: object type: array loadBalancer: - description: LoadBalancerStatus represents the status of a load-balancer. + description: LoadBalancer contains the current status of the load-balancer + in the current nodepool properties: ingress: description: Ingress is a list containing ingress points for the diff --git a/hack/make-rules/kustomize_to_chart.sh b/hack/make-rules/kustomize_to_chart.sh index f1ae798a447..2a768f67695 100755 --- a/hack/make-rules/kustomize_to_chart.sh +++ b/hack/make-rules/kustomize_to_chart.sh @@ -197,6 +197,7 @@ EOF mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_gateways.raven.openyurt.io.yaml ${crd_dir}/raven.openyurt.io_gateways.yaml mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_platformadmins.iot.openyurt.io.yaml ${crd_dir}/iot.openyurt.io_platformadmins.yaml mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_nodebuckets.apps.openyurt.io.yaml ${crd_dir}/apps.openyurt.io_nodebuckets.yaml + mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_poolservices.network.openyurt.io.yaml ${crd_dir}/network.openyurt.io_poolservices.yaml # TODO: In the future, the crd generation process of yurt-manager and yurt-iot-dock will be split. For now, manually remove it from the yurt-manager script # mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_devices.iot.openyurt.io.yaml ${crd_dir}/iot.openyurt.io_devices.yaml # mv ${crd_dir}/apiextensions.k8s.io_v1_customresourcedefinition_deviceservices.iot.openyurt.io.yaml ${crd_dir}/iot.openyurt.io_deviceservices.yaml diff --git a/pkg/apis/network/v1alpha1/poolservice_types.go b/pkg/apis/network/v1alpha1/poolservice_types.go index 6a7be0e0ce7..814efc76bbf 100644 --- a/pkg/apis/network/v1alpha1/poolservice_types.go +++ b/pkg/apis/network/v1alpha1/poolservice_types.go @@ -35,6 +35,12 @@ type PoolServiceStatus struct { // LoadBalancer contains the current status of the load-balancer in the current nodepool LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty"` + // AggregateToAnnotations means that this information is aggregated into the annotations of the service + AggregateToAnnotations map[string]string `json:"aggregateToAnnotations,omitempty"` + + //AggregateToLabels means that this information is aggregated into the labels of the service + AggregateToLabels map[string]string `json:"aggregateToLabels,omitempty"` + // Current poolService state Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go index 1041785c993..b8ebe2fcdff 100644 --- a/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go @@ -109,6 +109,20 @@ func (in *PoolServiceSpec) DeepCopy() *PoolServiceSpec { func (in *PoolServiceStatus) DeepCopyInto(out *PoolServiceStatus) { *out = *in in.LoadBalancer.DeepCopyInto(&out.LoadBalancer) + if in.AggregateToAnnotations != nil { + in, out := &in.AggregateToAnnotations, &out.AggregateToAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AggregateToLabels != nil { + in, out := &in.AggregateToLabels, &out.AggregateToLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]v1.Condition, len(*in))