Skip to content

Commit

Permalink
chore(k8s): remove some deprecated fields (#1986)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jan 25, 2024
1 parent b101f25 commit 5c9c710
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions api/k8s/v1/k8s_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,40 +250,6 @@ func (enum *ClusterTypeResiliency) UnmarshalJSON(data []byte) error {
return nil
}

// Managed Ingress Controllers are deprecated. Use the Easy Deploy feature instead.
type Ingress string

const (
IngressUnknownIngress = Ingress("unknown_ingress")
IngressNone = Ingress("none")
IngressNginx = Ingress("nginx")
IngressTraefik = Ingress("traefik")
IngressTraefik2 = Ingress("traefik2")
)

func (enum Ingress) String() string {
if enum == "" {
// return default value if empty
return "unknown_ingress"
}
return string(enum)
}

func (enum Ingress) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`"%s"`, enum)), nil
}

func (enum *Ingress) UnmarshalJSON(data []byte) error {
tmp := ""

if err := json.Unmarshal(data, &tmp); err != nil {
return err
}

*enum = Ingress(Ingress(tmp).String())
return nil
}

type ListClustersRequestOrderBy string

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

// Deprecated: AvailableIngresses: supported Ingress Controllers for this version.
AvailableIngresses *[]Ingress `json:"available_ingresses,omitempty"`

// AvailableContainerRuntimes: supported container runtimes for this version.
AvailableContainerRuntimes []Runtime `json:"available_container_runtimes"`

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

// Deprecated: DashboardEnabled: defines whether the Kubernetes dashboard is enabled for the cluster.
DashboardEnabled *bool `json:"dashboard_enabled,omitempty"`

// Deprecated: Ingress: managed Ingress controller used in the cluster (deprecated feature).
// Default value: unknown_ingress
Ingress *Ingress `json:"ingress,omitempty"`

// AutoUpgrade: auto upgrade configuration of the cluster.
AutoUpgrade *ClusterAutoUpgrade `json:"auto_upgrade"`

Expand Down Expand Up @@ -1181,13 +1137,6 @@ type CreateClusterRequest struct {
// Default value: unknown_cni
Cni CNI `json:"cni"`

// Deprecated: EnableDashboard: defines whether the Kubernetes Dashboard is enabled in the cluster.
EnableDashboard *bool `json:"enable_dashboard,omitempty"`

// Deprecated: Ingress: ingress Controller running in the cluster (deprecated feature).
// Default value: unknown_ingress
Ingress *Ingress `json:"ingress,omitempty"`

// Pools: pools created along with the cluster.
Pools []*CreateClusterRequestPoolConfig `json:"pools"`

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

// Deprecated: EnableDashboard: new value for the Kubernetes Dashboard enablement.
EnableDashboard *bool `json:"enable_dashboard,omitempty"`

// Deprecated: Ingress: new Ingress Controller for the cluster (deprecated feature).
// Default value: unknown_ingress
Ingress *Ingress `json:"ingress,omitempty"`

// AutoUpgrade: new auto upgrade configuration for the cluster. Note that all fields need to be set.
AutoUpgrade *UpdateClusterRequestAutoUpgrade `json:"auto_upgrade,omitempty"`

Expand Down

0 comments on commit 5c9c710

Please sign in to comment.