Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for the new HPA v2 (v2beta2 has been deprecated and removed in newer k8s #536

Merged
merged 1 commit into from May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions crd-docs/cr/kiali.io_v1alpha1_kiali.yaml
Expand Up @@ -102,12 +102,18 @@ spec:
mount: "/a-custom-secret-path"
optional: true
hpa:
api_version: "autoscaling/v2beta2"
api_version: "autoscaling/v2"
# default: spec is empty
spec:
maxReplicas: 2
minReplicas: 1
targetCPUUtilizationPercentage: 80
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
# default: host_aliases is an empty list
host_aliases:
- ip: "192.168.1.100"
Expand Down
12 changes: 9 additions & 3 deletions crd-docs/crd/kiali.io_kialis.yaml
Expand Up @@ -276,11 +276,17 @@ spec:
A typical way to configure HPA for Kiali is,
```
hpa:
api_version: "autoscaling/v2beta2"
api_version: "autoscaling/v2"
spec:
maxReplicas: 2
minReplicas: 1
targetCPUUtilizationPercentage: 80
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
```
type: object
properties:
Expand Down Expand Up @@ -394,7 +400,7 @@ spec:
backend:
service
name: "kiali"
port:
port:
number: 20001
```
type: object
Expand Down
6 changes: 3 additions & 3 deletions molecule/affinity-tolerations-resources-test/converge.yml
Expand Up @@ -64,7 +64,7 @@
new_pod_labels:
some.test.label/labelKeepCamelCaseFOO: labelCamelCaseValueFOO
new_hpa:
api_version: autoscaling/v1
api_version: autoscaling/v2
spec:
minReplicas: 1
maxReplicas: 1
Expand Down Expand Up @@ -123,7 +123,7 @@

- name: Get the HPA resource that should now exist
k8s_info:
api_version: autoscaling/v1
api_version: autoscaling/v2
kind: HorizontalPodAutoscaler
namespace: "{{ kiali.install_namespace }}"
name: kiali
Expand Down Expand Up @@ -174,7 +174,7 @@

- name: Try to obtain the HPA which should have been removed
k8s_info:
api_version: autoscaling/v1
api_version: autoscaling/v2
kind: HorizontalPodAutoscaler
namespace: "{{ kiali.install_namespace }}"
name: kiali
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/defaults/main.yml
Expand Up @@ -61,7 +61,7 @@ kiali_defaults:
custom_secrets: []
host_aliases: []
hpa:
api_version: "autoscaling/v2beta2"
api_version: "autoscaling/v2"
spec: {}
image_digest: ""
image_name: ""
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-remove/defaults/main.yml
Expand Up @@ -4,7 +4,7 @@ kiali_defaults:
deployment:
accessible_namespaces: []
hpa:
api_version: "autoscaling/v2beta2"
api_version: "autoscaling/v2"
instance_name: "kiali"

# Will be auto-detected, but for debugging purposes you can force one of these to true
Expand Down