Skip to content

Commit

Permalink
Merge pull request #4778 from RainbowMango/pr_pin_crd_plural_name
Browse files Browse the repository at this point in the history
Pin plural name for all APIs to avoid unexpected change
  • Loading branch information
karmada-bot committed Mar 30, 2024
2 parents 09b69dd + 32a4076 commit 6534ffb
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
spec:
group: config.karmada.io
names:
categories:
- karmada-io
kind: ResourceInterpreterCustomization
listKind: ResourceInterpreterCustomizationList
plural: resourceinterpretercustomizations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
spec:
group: config.karmada.io
names:
categories:
- karmada-io
kind: ResourceInterpreterWebhookConfiguration
listKind: ResourceInterpreterWebhookConfigurationList
plural: resourceinterpreterwebhookconfigurations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
spec:
group: remedy.karmada.io
names:
categories:
- karmada-io
kind: Remedy
listKind: RemedyList
plural: remedies
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/autoscaling/v1alpha1/cronfederatedhpa_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=cronfhpa,categories={karmada-io}
// +kubebuilder:resource:path=cronfederatedhpas,scope=Namespaced,shortName=cronfhpa,categories={karmada-io}
// +kubebuilder:printcolumn:JSONPath=`.spec.scaleTargetRef.kind`,name=`REFERENCE-KIND`,type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.scaleTargetRef.name`,name=`REFERENCE-NAME`,type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name=`AGE`,type=date
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/autoscaling/v1alpha1/federatedhpa_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=fhpa,categories={karmada-io}
// +kubebuilder:resource:path=federatedhpas,scope=Namespaced,shortName=fhpa,categories={karmada-io}
// +kubebuilder:printcolumn:JSONPath=`.spec.scaleTargetRef.kind`,name=`REFERENCE-KIND`,type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.scaleTargetRef.name`,name=`REFERENCE-NAME`,type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.minReplicas`,name=`MINPODS`,type=integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Cluster"
// +kubebuilder:resource:path=resourceinterpretercustomizations,scope="Cluster",categories={karmada-io}
// +kubebuilder:storageversion

// ResourceInterpreterCustomization describes the configuration of a specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Cluster"
// +kubebuilder:resource:path=resourceinterpreterwebhookconfigurations,scope="Cluster",categories={karmada-io}
// +kubebuilder:storageversion

// ResourceInterpreterWebhookConfiguration describes the configuration of webhooks which take the responsibility to
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/networking/v1alpha1/ingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=mci,categories={karmada-io}
// +kubebuilder:resource:path=multiclusteringresses,scope=Namespaced,shortName=mci,categories={karmada-io}

// MultiClusterIngress is a collection of rules that allow inbound connections to reach the
// endpoints defined by a backend. The structure of MultiClusterIngress is same as Ingress,
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/networking/v1alpha1/service_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=mcs,categories={karmada-io}
// +kubebuilder:resource:path=multiclusterservices,scope=Namespaced,shortName=mcs,categories={karmada-io}

// MultiClusterService is a named abstraction of multi-cluster software service.
// The name field of MultiClusterService is the same as that of Service name.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/policy/v1alpha1/federatedresourcequota_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories={karmada-io}
// +kubebuilder:resource:path=federatedresourcequotas,scope=Namespaced,categories={karmada-io}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/policy/v1alpha1/override_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:shortName=op,categories={karmada-io}
// +kubebuilder:resource:path=overridepolicies,scope=Namespaced,shortName=op,categories={karmada-io}

// OverridePolicy represents the policy that overrides a group of resources to one or more clusters.
type OverridePolicy struct {
Expand Down Expand Up @@ -268,7 +268,7 @@ type OverridePolicyList struct {

// +genclient
// +genclient:nonNamespaced
// +kubebuilder:resource:scope="Cluster",shortName=cop,categories={karmada-io}
// +kubebuilder:resource:path=clusteroverridepolicies,scope="Cluster",shortName=cop,categories={karmada-io}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterOverridePolicy represents the cluster-wide policy that overrides a group of resources to one or more clusters.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:shortName=pp,categories={karmada-io}
// +kubebuilder:resource:path=propagationpolicies,scope=Namespaced,shortName=pp,categories={karmada-io}

// PropagationPolicy represents the policy that propagates a group of resources to one or more clusters.
type PropagationPolicy struct {
Expand Down Expand Up @@ -560,7 +560,7 @@ type PropagationPolicyList struct {

// +genclient
// +genclient:nonNamespaced
// +kubebuilder:resource:scope="Cluster",shortName=cpp,categories={karmada-io}
// +kubebuilder:resource:path=clusterpropagationpolicies,scope="Cluster",shortName=cpp,categories={karmada-io}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterPropagationPolicy represents the cluster-wide policy that propagates a group of resources to one or more clusters.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/remedy/v1alpha1/remedy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Cluster"
// +kubebuilder:resource:path=remedies,scope="Cluster",categories={karmada-io}

// Remedy represents the cluster-level management strategies based on cluster conditions.
type Remedy struct {
Expand Down
5 changes: 2 additions & 3 deletions pkg/apis/work/v1alpha1/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=rb,categories={karmada-io}
// +kubebuilder:resource:path=resourcebindings,scope=Namespaced,shortName=rb,categories={karmada-io}

// ResourceBinding represents a binding of a kubernetes resource with a propagation policy.
type ResourceBinding struct {
Expand Down Expand Up @@ -135,7 +135,7 @@ type ResourceBindingList struct {
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Cluster",shortName=crb,categories={karmada-io}
// +kubebuilder:resource:path=clusterresourcebindings,scope="Cluster",shortName=crb,categories={karmada-io}
// +kubebuilder:subresource:status

// ClusterResourceBinding represents a binding of a kubernetes resource with a ClusterPropagationPolicy.
Expand All @@ -151,7 +151,6 @@ type ClusterResourceBinding struct {
Status ResourceBindingStatus `json:"status,omitempty"`
}

// +kubebuilder:resource:scope="Cluster"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterResourceBindingList contains a list of ClusterResourceBinding.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/work/v1alpha1/work_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={karmada-io},shortName=wk
// +kubebuilder:resource:path=works,scope=Namespaced,shortName=wk,categories={karmada-io}
// +kubebuilder:printcolumn:JSONPath=`.spec.workload.manifests[*].kind`,name="Workload-Kind",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Applied")].status`,name="Applied",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
Expand Down
5 changes: 2 additions & 3 deletions pkg/apis/work/v1alpha2/binding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=rb,categories={karmada-io}
// +kubebuilder:resource:path=resourcebindings,scope=Namespaced,shortName=rb,categories={karmada-io}
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="Scheduled",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="FullyApplied")].status`,name="FullyApplied",type=string
Expand Down Expand Up @@ -391,7 +391,7 @@ const (
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Cluster",shortName=crb,categories={karmada-io}
// +kubebuilder:resource:path=clusterresourcebindings,scope="Cluster",shortName=crb,categories={karmada-io}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Scheduled")].status`,name="Scheduled",type=string
Expand All @@ -411,7 +411,6 @@ type ClusterResourceBinding struct {
Status ResourceBindingStatus `json:"status,omitempty"`
}

// +kubebuilder:resource:scope="Cluster"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterResourceBindingList contains a list of ClusterResourceBinding.
Expand Down

0 comments on commit 6534ffb

Please sign in to comment.