Skip to content

Commit

Permalink
Merge pull request #127 from 2gis/autoscaling-v2beta2-api
Browse files Browse the repository at this point in the history
Add support of autoscaling/v2beta2
  • Loading branch information
seleznev committed Jun 2, 2020
2 parents 36c585a + fd3860d commit 88b3cb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions k8s_handle/k8s/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Adapter:
'storage.k8s.io/v1': client.StorageV1Api,
'apps/v1': client.AppsV1Api,
'autoscaling/v1': client.AutoscalingV1Api,
'autoscaling/v2beta2': client.AutoscalingV2beta2Api,
'rbac.authorization.k8s.io/v1': client.RbacAuthorizationV1Api,
'scheduling.k8s.io/v1alpha1': client.SchedulingV1alpha1Api,
'scheduling.k8s.io/v1beta1': client.SchedulingV1beta1Api,
Expand Down Expand Up @@ -140,8 +141,8 @@ def create(self):
raise ProvisioningError(e)
except ValueError as e:
log.error(e)
# WORKAROUND https://github.com/kubernetes-client/gen/issues/52
if self.kind not in ['custom_resource_definition']:
# WORKAROUND https://github.com/kubernetes-client/gen/issues/52, https://github.com/kubernetes-client/python/issues/1098
if self.kind not in ['custom_resource_definition', 'horizontal_pod_autoscaler']:
raise e

def replace(self, parameters):
Expand Down

0 comments on commit 88b3cb8

Please sign in to comment.