Skip to content

Commit f33cd73

Browse files
authored
chore(k8s): remove some deprecated fields (#428)
1 parent f9f0961 commit f33cd73

File tree

8 files changed

+0
-180
lines changed

8 files changed

+0
-180
lines changed

scaleway-async/scaleway_async/k8s/v1/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .types import ClusterStatus
77
from .types import ClusterTypeAvailability
88
from .types import ClusterTypeResiliency
9-
from .types import Ingress
109
from .types import ListClustersRequestOrderBy
1110
from .types import ListNodesRequestOrderBy
1211
from .types import ListPoolsRequestOrderBy
@@ -56,7 +55,6 @@
5655
"ClusterStatus",
5756
"ClusterTypeAvailability",
5857
"ClusterTypeResiliency",
59-
"Ingress",
6058
"ListClustersRequestOrderBy",
6159
"ListNodesRequestOrderBy",
6260
"ListPoolsRequestOrderBy",

scaleway-async/scaleway_async/k8s/v1/api.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from .types import (
2121
CNI,
2222
ClusterStatus,
23-
Ingress,
2423
ListClustersRequestOrderBy,
2524
ListNodesRequestOrderBy,
2625
ListPoolsRequestOrderBy,
@@ -219,8 +218,6 @@ async def create_cluster(
219218
name: Optional[str] = None,
220219
tags: Optional[List[str]] = None,
221220
cni: CNI = CNI.UNKNOWN_CNI,
222-
enable_dashboard: Optional[bool] = None,
223-
ingress: Optional[Ingress] = None,
224221
pools: Optional[List[CreateClusterRequestPoolConfig]] = None,
225222
autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig] = None,
226223
auto_upgrade: Optional[CreateClusterRequestAutoUpgrade] = None,
@@ -248,8 +245,6 @@ async def create_cluster(
248245
:param tags: Tags associated with the cluster.
249246
:param version: Kubernetes version of the cluster.
250247
:param cni: Container Network Interface (CNI) plugin running in the cluster.
251-
:param enable_dashboard: Defines whether the Kubernetes Dashboard is enabled in the cluster.
252-
:param ingress: Ingress Controller running in the cluster (deprecated feature).
253248
:param pools: Pools created along with the cluster.
254249
:param autoscaler_config: Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/).
255250
:param auto_upgrade: Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version.
@@ -288,8 +283,6 @@ async def create_cluster(
288283
name=name or random_name(prefix="k8s"),
289284
tags=tags,
290285
cni=cni,
291-
enable_dashboard=enable_dashboard,
292-
ingress=ingress,
293286
pools=pools,
294287
autoscaler_config=autoscaler_config,
295288
auto_upgrade=auto_upgrade,
@@ -382,8 +375,6 @@ async def update_cluster(
382375
description: Optional[str] = None,
383376
tags: Optional[List[str]] = None,
384377
autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig] = None,
385-
enable_dashboard: Optional[bool] = None,
386-
ingress: Optional[Ingress] = None,
387378
auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade] = None,
388379
feature_gates: Optional[List[str]] = None,
389380
admission_plugins: Optional[List[str]] = None,
@@ -401,8 +392,6 @@ async def update_cluster(
401392
:param description: New description for the cluster.
402393
:param tags: New tags associated with the cluster.
403394
:param autoscaler_config: New autoscaler config for the cluster.
404-
:param enable_dashboard: New value for the Kubernetes Dashboard enablement.
405-
:param ingress: New Ingress Controller for the cluster (deprecated feature).
406395
:param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields need to be set.
407396
:param feature_gates: List of feature gates to enable.
408397
:param admission_plugins: List of admission plugins to enable.
@@ -432,8 +421,6 @@ async def update_cluster(
432421
description=description,
433422
tags=tags,
434423
autoscaler_config=autoscaler_config,
435-
enable_dashboard=enable_dashboard,
436-
ingress=ingress,
437424
auto_upgrade=auto_upgrade,
438425
feature_gates=feature_gates,
439426
admission_plugins=admission_plugins,

scaleway-async/scaleway_async/k8s/v1/marshalling.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
AutoscalerEstimator,
1414
AutoscalerExpander,
1515
CNI,
16-
Ingress,
1716
MaintenanceWindowDayOfTheWeek,
1817
PoolVolumeType,
1918
Runtime,
@@ -219,9 +218,6 @@ def unmarshal_Cluster(data: Any) -> Cluster:
219218
field = data.get("created_at", None)
220219
args["created_at"] = parser.isoparse(field) if type(field) is str else field
221220

222-
field = data.get("dashboard_enabled", None)
223-
args["dashboard_enabled"] = field
224-
225221
field = data.get("description", None)
226222
args["description"] = field
227223

@@ -234,9 +230,6 @@ def unmarshal_Cluster(data: Any) -> Cluster:
234230
field = data.get("id", None)
235231
args["id"] = field
236232

237-
field = data.get("ingress", None)
238-
args["ingress"] = field
239-
240233
field = data.get("name", None)
241234
args["name"] = field
242235

@@ -488,9 +481,6 @@ def unmarshal_Version(data: Any) -> Version:
488481
field = data.get("available_feature_gates", None)
489482
args["available_feature_gates"] = field
490483

491-
field = data.get("available_ingresses", None)
492-
args["available_ingresses"] = field
493-
494484
field = data.get("available_kubelet_args", None)
495485
args["available_kubelet_args"] = field
496486

@@ -1034,15 +1024,9 @@ def marshal_CreateClusterRequest(
10341024
if request.description is not None:
10351025
output["description"] = request.description
10361026

1037-
if request.enable_dashboard is not None:
1038-
output["enable_dashboard"] = request.enable_dashboard
1039-
10401027
if request.feature_gates is not None:
10411028
output["feature_gates"] = request.feature_gates
10421029

1043-
if request.ingress is not None:
1044-
output["ingress"] = Ingress(request.ingress)
1045-
10461030
if request.name is not None:
10471031
output["name"] = request.name
10481032

@@ -1181,15 +1165,9 @@ def marshal_UpdateClusterRequest(
11811165
if request.description is not None:
11821166
output["description"] = request.description
11831167

1184-
if request.enable_dashboard is not None:
1185-
output["enable_dashboard"] = request.enable_dashboard
1186-
11871168
if request.feature_gates is not None:
11881169
output["feature_gates"] = request.feature_gates
11891170

1190-
if request.ingress is not None:
1191-
output["ingress"] = Ingress(request.ingress)
1192-
11931171
if request.name is not None:
11941172
output["name"] = request.name
11951173

scaleway-async/scaleway_async/k8s/v1/types.py

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,6 @@ def __str__(self) -> str:
8080
return str(self.value)
8181

8282

83-
class Ingress(str, Enum, metaclass=StrEnumMeta):
84-
UNKNOWN_INGRESS = "unknown_ingress"
85-
NONE = "none"
86-
NGINX = "nginx"
87-
TRAEFIK = "traefik"
88-
TRAEFIK2 = "traefik2"
89-
90-
def __str__(self) -> str:
91-
return str(self.value)
92-
93-
9483
class ListClustersRequestOrderBy(str, Enum, metaclass=StrEnumMeta):
9584
CREATED_AT_ASC = "created_at_asc"
9685
CREATED_AT_DESC = "created_at_desc"
@@ -282,18 +271,6 @@ class Cluster:
282271
Autoscaler config for the cluster.
283272
"""
284273

285-
dashboard_enabled: Optional[bool]
286-
"""
287-
Defines whether the Kubernetes dashboard is enabled for the cluster.
288-
:deprecated
289-
"""
290-
291-
ingress: Optional[Ingress]
292-
"""
293-
Managed Ingress controller used in the cluster (deprecated feature).
294-
:deprecated
295-
"""
296-
297274
auto_upgrade: Optional[ClusterAutoUpgrade]
298275
"""
299276
Auto upgrade configuration of the cluster.
@@ -1247,12 +1224,6 @@ class Version:
12471224
Supported Container Network Interface (CNI) plugins for this version.
12481225
"""
12491226

1250-
available_ingresses: Optional[List[Ingress]]
1251-
"""
1252-
Supported Ingress Controllers for this version.
1253-
:deprecated
1254-
"""
1255-
12561227
available_container_runtimes: List[Runtime]
12571228
"""
12581229
Supported container runtimes for this version.
@@ -1379,18 +1350,6 @@ class CreateClusterRequest:
13791350
Container Network Interface (CNI) plugin running in the cluster.
13801351
"""
13811352

1382-
enable_dashboard: Optional[bool]
1383-
"""
1384-
Defines whether the Kubernetes Dashboard is enabled in the cluster.
1385-
:deprecated
1386-
"""
1387-
1388-
ingress: Optional[Ingress]
1389-
"""
1390-
Ingress Controller running in the cluster (deprecated feature).
1391-
:deprecated
1392-
"""
1393-
13941353
pools: Optional[List[CreateClusterRequestPoolConfig]]
13951354
"""
13961355
Pools created along with the cluster.
@@ -1477,18 +1436,6 @@ class UpdateClusterRequest:
14771436
New autoscaler config for the cluster.
14781437
"""
14791438

1480-
enable_dashboard: Optional[bool]
1481-
"""
1482-
New value for the Kubernetes Dashboard enablement.
1483-
:deprecated
1484-
"""
1485-
1486-
ingress: Optional[Ingress]
1487-
"""
1488-
New Ingress Controller for the cluster (deprecated feature).
1489-
:deprecated
1490-
"""
1491-
14921439
auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade]
14931440
"""
14941441
New auto upgrade configuration for the cluster. Note that all fields need to be set.

scaleway/scaleway/k8s/v1/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .types import ClusterStatus
77
from .types import ClusterTypeAvailability
88
from .types import ClusterTypeResiliency
9-
from .types import Ingress
109
from .types import ListClustersRequestOrderBy
1110
from .types import ListNodesRequestOrderBy
1211
from .types import ListPoolsRequestOrderBy
@@ -56,7 +55,6 @@
5655
"ClusterStatus",
5756
"ClusterTypeAvailability",
5857
"ClusterTypeResiliency",
59-
"Ingress",
6058
"ListClustersRequestOrderBy",
6159
"ListNodesRequestOrderBy",
6260
"ListPoolsRequestOrderBy",

scaleway/scaleway/k8s/v1/api.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from .types import (
2121
CNI,
2222
ClusterStatus,
23-
Ingress,
2423
ListClustersRequestOrderBy,
2524
ListNodesRequestOrderBy,
2625
ListPoolsRequestOrderBy,
@@ -219,8 +218,6 @@ def create_cluster(
219218
name: Optional[str] = None,
220219
tags: Optional[List[str]] = None,
221220
cni: CNI = CNI.UNKNOWN_CNI,
222-
enable_dashboard: Optional[bool] = None,
223-
ingress: Optional[Ingress] = None,
224221
pools: Optional[List[CreateClusterRequestPoolConfig]] = None,
225222
autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig] = None,
226223
auto_upgrade: Optional[CreateClusterRequestAutoUpgrade] = None,
@@ -248,8 +245,6 @@ def create_cluster(
248245
:param tags: Tags associated with the cluster.
249246
:param version: Kubernetes version of the cluster.
250247
:param cni: Container Network Interface (CNI) plugin running in the cluster.
251-
:param enable_dashboard: Defines whether the Kubernetes Dashboard is enabled in the cluster.
252-
:param ingress: Ingress Controller running in the cluster (deprecated feature).
253248
:param pools: Pools created along with the cluster.
254249
:param autoscaler_config: Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/).
255250
:param auto_upgrade: Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version.
@@ -288,8 +283,6 @@ def create_cluster(
288283
name=name or random_name(prefix="k8s"),
289284
tags=tags,
290285
cni=cni,
291-
enable_dashboard=enable_dashboard,
292-
ingress=ingress,
293286
pools=pools,
294287
autoscaler_config=autoscaler_config,
295288
auto_upgrade=auto_upgrade,
@@ -382,8 +375,6 @@ def update_cluster(
382375
description: Optional[str] = None,
383376
tags: Optional[List[str]] = None,
384377
autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig] = None,
385-
enable_dashboard: Optional[bool] = None,
386-
ingress: Optional[Ingress] = None,
387378
auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade] = None,
388379
feature_gates: Optional[List[str]] = None,
389380
admission_plugins: Optional[List[str]] = None,
@@ -401,8 +392,6 @@ def update_cluster(
401392
:param description: New description for the cluster.
402393
:param tags: New tags associated with the cluster.
403394
:param autoscaler_config: New autoscaler config for the cluster.
404-
:param enable_dashboard: New value for the Kubernetes Dashboard enablement.
405-
:param ingress: New Ingress Controller for the cluster (deprecated feature).
406395
:param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields need to be set.
407396
:param feature_gates: List of feature gates to enable.
408397
:param admission_plugins: List of admission plugins to enable.
@@ -432,8 +421,6 @@ def update_cluster(
432421
description=description,
433422
tags=tags,
434423
autoscaler_config=autoscaler_config,
435-
enable_dashboard=enable_dashboard,
436-
ingress=ingress,
437424
auto_upgrade=auto_upgrade,
438425
feature_gates=feature_gates,
439426
admission_plugins=admission_plugins,

scaleway/scaleway/k8s/v1/marshalling.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
AutoscalerEstimator,
1414
AutoscalerExpander,
1515
CNI,
16-
Ingress,
1716
MaintenanceWindowDayOfTheWeek,
1817
PoolVolumeType,
1918
Runtime,
@@ -219,9 +218,6 @@ def unmarshal_Cluster(data: Any) -> Cluster:
219218
field = data.get("created_at", None)
220219
args["created_at"] = parser.isoparse(field) if type(field) is str else field
221220

222-
field = data.get("dashboard_enabled", None)
223-
args["dashboard_enabled"] = field
224-
225221
field = data.get("description", None)
226222
args["description"] = field
227223

@@ -234,9 +230,6 @@ def unmarshal_Cluster(data: Any) -> Cluster:
234230
field = data.get("id", None)
235231
args["id"] = field
236232

237-
field = data.get("ingress", None)
238-
args["ingress"] = field
239-
240233
field = data.get("name", None)
241234
args["name"] = field
242235

@@ -488,9 +481,6 @@ def unmarshal_Version(data: Any) -> Version:
488481
field = data.get("available_feature_gates", None)
489482
args["available_feature_gates"] = field
490483

491-
field = data.get("available_ingresses", None)
492-
args["available_ingresses"] = field
493-
494484
field = data.get("available_kubelet_args", None)
495485
args["available_kubelet_args"] = field
496486

@@ -1034,15 +1024,9 @@ def marshal_CreateClusterRequest(
10341024
if request.description is not None:
10351025
output["description"] = request.description
10361026

1037-
if request.enable_dashboard is not None:
1038-
output["enable_dashboard"] = request.enable_dashboard
1039-
10401027
if request.feature_gates is not None:
10411028
output["feature_gates"] = request.feature_gates
10421029

1043-
if request.ingress is not None:
1044-
output["ingress"] = Ingress(request.ingress)
1045-
10461030
if request.name is not None:
10471031
output["name"] = request.name
10481032

@@ -1181,15 +1165,9 @@ def marshal_UpdateClusterRequest(
11811165
if request.description is not None:
11821166
output["description"] = request.description
11831167

1184-
if request.enable_dashboard is not None:
1185-
output["enable_dashboard"] = request.enable_dashboard
1186-
11871168
if request.feature_gates is not None:
11881169
output["feature_gates"] = request.feature_gates
11891170

1190-
if request.ingress is not None:
1191-
output["ingress"] = Ingress(request.ingress)
1192-
11931171
if request.name is not None:
11941172
output["name"] = request.name
11951173

0 commit comments

Comments
 (0)