Skip to content

Commit 5c9c710

Browse files
authored
chore(k8s): remove some deprecated fields (#1986)
1 parent b101f25 commit 5c9c710

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

api/k8s/v1/k8s_sdk.go

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -250,40 +250,6 @@ func (enum *ClusterTypeResiliency) UnmarshalJSON(data []byte) error {
250250
return nil
251251
}
252252

253-
// Managed Ingress Controllers are deprecated. Use the Easy Deploy feature instead.
254-
type Ingress string
255-
256-
const (
257-
IngressUnknownIngress = Ingress("unknown_ingress")
258-
IngressNone = Ingress("none")
259-
IngressNginx = Ingress("nginx")
260-
IngressTraefik = Ingress("traefik")
261-
IngressTraefik2 = Ingress("traefik2")
262-
)
263-
264-
func (enum Ingress) String() string {
265-
if enum == "" {
266-
// return default value if empty
267-
return "unknown_ingress"
268-
}
269-
return string(enum)
270-
}
271-
272-
func (enum Ingress) MarshalJSON() ([]byte, error) {
273-
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
274-
}
275-
276-
func (enum *Ingress) UnmarshalJSON(data []byte) error {
277-
tmp := ""
278-
279-
if err := json.Unmarshal(data, &tmp); err != nil {
280-
return err
281-
}
282-
283-
*enum = Ingress(Ingress(tmp).String())
284-
return nil
285-
}
286-
287253
type ListClustersRequestOrderBy string
288254

289255
const (
@@ -931,9 +897,6 @@ type Version struct {
931897
// AvailableCnis: supported Container Network Interface (CNI) plugins for this version.
932898
AvailableCnis []CNI `json:"available_cnis"`
933899

934-
// Deprecated: AvailableIngresses: supported Ingress Controllers for this version.
935-
AvailableIngresses *[]Ingress `json:"available_ingresses,omitempty"`
936-
937900
// AvailableContainerRuntimes: supported container runtimes for this version.
938901
AvailableContainerRuntimes []Runtime `json:"available_container_runtimes"`
939902

@@ -999,13 +962,6 @@ type Cluster struct {
999962
// AutoscalerConfig: autoscaler config for the cluster.
1000963
AutoscalerConfig *ClusterAutoscalerConfig `json:"autoscaler_config"`
1001964

1002-
// Deprecated: DashboardEnabled: defines whether the Kubernetes dashboard is enabled for the cluster.
1003-
DashboardEnabled *bool `json:"dashboard_enabled,omitempty"`
1004-
1005-
// Deprecated: Ingress: managed Ingress controller used in the cluster (deprecated feature).
1006-
// Default value: unknown_ingress
1007-
Ingress *Ingress `json:"ingress,omitempty"`
1008-
1009965
// AutoUpgrade: auto upgrade configuration of the cluster.
1010966
AutoUpgrade *ClusterAutoUpgrade `json:"auto_upgrade"`
1011967

@@ -1181,13 +1137,6 @@ type CreateClusterRequest struct {
11811137
// Default value: unknown_cni
11821138
Cni CNI `json:"cni"`
11831139

1184-
// Deprecated: EnableDashboard: defines whether the Kubernetes Dashboard is enabled in the cluster.
1185-
EnableDashboard *bool `json:"enable_dashboard,omitempty"`
1186-
1187-
// Deprecated: Ingress: ingress Controller running in the cluster (deprecated feature).
1188-
// Default value: unknown_ingress
1189-
Ingress *Ingress `json:"ingress,omitempty"`
1190-
11911140
// Pools: pools created along with the cluster.
11921141
Pools []*CreateClusterRequestPoolConfig `json:"pools"`
11931142

@@ -1742,13 +1691,6 @@ type UpdateClusterRequest struct {
17421691
// AutoscalerConfig: new autoscaler config for the cluster.
17431692
AutoscalerConfig *UpdateClusterRequestAutoscalerConfig `json:"autoscaler_config,omitempty"`
17441693

1745-
// Deprecated: EnableDashboard: new value for the Kubernetes Dashboard enablement.
1746-
EnableDashboard *bool `json:"enable_dashboard,omitempty"`
1747-
1748-
// Deprecated: Ingress: new Ingress Controller for the cluster (deprecated feature).
1749-
// Default value: unknown_ingress
1750-
Ingress *Ingress `json:"ingress,omitempty"`
1751-
17521694
// AutoUpgrade: new auto upgrade configuration for the cluster. Note that all fields need to be set.
17531695
AutoUpgrade *UpdateClusterRequestAutoUpgrade `json:"auto_upgrade,omitempty"`
17541696

0 commit comments

Comments
 (0)