Skip to content

Commit

Permalink
Revert "Fix: run make update fail because deepcopy doesn't support …
Browse files Browse the repository at this point in the history
…generic type. (#288)"

This reverts commit ae208c8.

Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Oct 18, 2023
1 parent d7736a1 commit 8f0ff2d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 27 deletions.
1 change: 1 addition & 0 deletions cluster/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Package v1alpha1 contains API Schema definitions for the cluster v1alpha1 API group
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=open-cluster-management.io/api/cluster
// +k8s:defaulter-gen=TypeMeta
// +k8s:openapi-gen=true
Expand Down
2 changes: 0 additions & 2 deletions cluster/v1alpha1/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const (
)

// ClusterRolloutStatus holds the rollout status information for a cluster.
// +k8s:deepcopy-gen=true
type ClusterRolloutStatus struct {
// cluster name
ClusterName string
Expand All @@ -54,7 +53,6 @@ type ClusterRolloutStatus struct {
}

// RolloutResult contains list of clusters that are timeOut, removed and required to rollOut
// +k8s:deepcopy-gen=true
type RolloutResult struct {
// ClustersToRollout is a slice of ClusterRolloutStatus that will be rolled out.
ClustersToRollout []ClusterRolloutStatus
Expand Down
3 changes: 0 additions & 3 deletions cluster/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen=true
// +kubebuilder:resource:scope="Cluster"

// ClusterClaim represents cluster information that a managed cluster claims
Expand All @@ -26,7 +25,6 @@ type ClusterClaim struct {
Spec ClusterClaimSpec `json:"spec,omitempty"`
}

// +k8s:deepcopy-gen=true
type ClusterClaimSpec struct {
// Value is a claim-dependent string
// +kubebuilder:validation:MaxLength=1024
Expand All @@ -35,7 +33,6 @@ type ClusterClaimSpec struct {
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen=true

// ClusterClaimList is a collection of ClusterClaim.
type ClusterClaimList struct {
Expand Down
4 changes: 0 additions & 4 deletions cluster/v1alpha1/types_addonplacementscore.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen=true
// +kubebuilder:resource:scope="Namespaced"
// +kubebuilder:subresource:status

Expand All @@ -22,7 +21,6 @@ type AddOnPlacementScore struct {
}

// AddOnPlacementScoreStatus represents the current status of AddOnPlacementScore.
// +k8s:deepcopy-gen=true
type AddOnPlacementScoreStatus struct {
// Conditions contain the different condition statuses for this AddOnPlacementScore.
// +patchMergeKey=type
Expand All @@ -48,7 +46,6 @@ type AddOnPlacementScoreStatus struct {
}

// AddOnPlacementScoreItem represents the score name and value.
// +k8s:deepcopy-gen=true
type AddOnPlacementScoreItem struct {
// Name is the name of the score
// +kubebuilder:validation:Required
Expand All @@ -64,7 +61,6 @@ type AddOnPlacementScoreItem struct {
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen=true

// AddOnPlacementScoreList is a collection of AddOnPlacementScore.
type AddOnPlacementScoreList struct {
Expand Down
7 changes: 0 additions & 7 deletions cluster/v1alpha1/types_rolloutstrategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const (
)

// Rollout strategy to apply workload to the selected clusters by Placement and DecisionStrategy.
// +k8s:deepcopy-gen=true
type RolloutStrategy struct {
// Rollout strategy Types are All, Progressive and ProgressivePerGroup
// 1) All means apply the workload to all clusters in the decision groups at once.
Expand All @@ -43,7 +42,6 @@ type RolloutStrategy struct {
}

// Timeout to consider while applying the workload.
// +k8s:deepcopy-gen=true
type Timeout struct {
// Timeout define how long workload applier controller will wait till workload reach successful state in the cluster.
// Timeout default value is None meaning the workload applier will not proceed apply workload to other clusters if did not reach the successful state.
Expand All @@ -56,7 +54,6 @@ type Timeout struct {

// MandatoryDecisionGroup set the decision group name or group index.
// GroupName is considered first to select the decisionGroups then GroupIndex.
// +k8s:deepcopy-gen=true
type MandatoryDecisionGroup struct {
// GroupName of the decision group should match the placementDecisions label value with label key cluster.open-cluster-management.io/decision-group-name
// +optional
Expand All @@ -68,7 +65,6 @@ type MandatoryDecisionGroup struct {
}

// MandatoryDecisionGroups
// +k8s:deepcopy-gen=true
type MandatoryDecisionGroups struct {
// List of the decision groups names or indexes to apply the workload first and fail if workload did not reach successful state.
// GroupName or GroupIndex must match with the decisionGroups defined in the placement's decisionStrategy
Expand All @@ -77,14 +73,12 @@ type MandatoryDecisionGroups struct {
}

// RolloutAll is a RolloutStrategy Type
// +k8s:deepcopy-gen=true
type RolloutAll struct {
// +optional
Timeout `json:",inline"`
}

// RolloutProgressivePerGroup is a RolloutStrategy Type
// +k8s:deepcopy-gen=true
type RolloutProgressivePerGroup struct {
// +optional
MandatoryDecisionGroups `json:",inline"`
Expand All @@ -94,7 +88,6 @@ type RolloutProgressivePerGroup struct {
}

// RolloutProgressive is a RolloutStrategy Type
// +k8s:deepcopy-gen=true
type RolloutProgressive struct {
// +optional
MandatoryDecisionGroups `json:",inline"`
Expand Down
15 changes: 4 additions & 11 deletions cluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f0ff2d

Please sign in to comment.