Skip to content

Commit

Permalink
fix(controller) try passing in App's apiVersion
Browse files Browse the repository at this point in the history
* WIP: hardcode extensions/v1beta1 here for now

There is no "App.api_version" attribute and I'm not sure where this
information should come from

* fixup: line was too long for the style guide
  • Loading branch information
Kingdon Barrett authored and Cryptophobia committed Aug 8, 2019
1 parent ba976bd commit 2988579
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rootfs/api/models/app.py
Expand Up @@ -968,7 +968,9 @@ def autoscale(self, proc_type, autoscale):
"""
name = '{}-{}'.format(self.id, proc_type)
# basically fake out a Deployment object (only thing we use) to assign to the HPA
target = {'kind': 'Deployment', 'metadata': {'name': name}}
target = {'apiVersion': 'extensions/v1beta1',
'kind': 'Deployment',
'metadata': {'name': name}}

try:
# get the target for autoscaler, in this case Deployment
Expand Down

0 comments on commit 2988579

Please sign in to comment.