Skip to content

Commit 4490497

Browse files
authored
FIX: Guard and Lens HPA deployment apiVersions (#1072)
* Fixed keda trigger example * Added hpa v2beta1 for legacy and fixed apiVersion for main * fixed deployment api for hpa
1 parent 45a3f27 commit 4490497

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

docs/user-guide/creating-application/deployment-template/rollout-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ kedaAutoscaling:
713713
query: envoy_cluster_upstream_rq{appId="300", cluster_name="300-0", container="envoy",}
714714
threshold: "50"
715715
triggerAuthentication:
716-
enabled: true
716+
enabled: false
717717
name:
718718
spec: {}
719719
authenticationRef: {}

manifests/yamls/guard.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,28 @@ spec:
2626
selector:
2727
app: guard
2828
---
29+
# Legacy HPA api in case autoscaling/v2beta2 is unavailable
30+
apiVersion: autoscaling/v2beta1
31+
kind: HorizontalPodAutoscaler
32+
metadata:
33+
name: guard-hpa
34+
spec:
35+
scaleTargetRef:
36+
apiVersion: apps/v1
37+
kind: Deployment
38+
name: guard
39+
minReplicas: 1
40+
maxReplicas: 4
41+
metrics:
42+
- type: Resource
43+
resource:
44+
name: memory
45+
targetAverageUtilization: 80
46+
- type: Resource
47+
resource:
48+
name: cpu
49+
targetAverageUtilization: 90
50+
---
2951
# Source: guard/templates/hpa.yaml
3052
apiVersion: autoscaling/v2beta2
3153
kind: HorizontalPodAutoscaler
@@ -35,10 +57,10 @@ metadata:
3557
release: devtron
3658
spec:
3759
scaleTargetRef:
38-
apiVersion: v1
60+
apiVersion: apps/v1
3961
kind: Deployment
40-
name: devtron-guard
41-
minReplicas: 2
62+
name: guard
63+
minReplicas: 1
4264
maxReplicas: 4
4365
metrics:
4466
- type: Resource

manifests/yamls/lens.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ metadata:
188188
name: lens-hpa
189189
spec:
190190
scaleTargetRef:
191-
apiVersion: v1
191+
apiVersion: apps/v1
192192
kind: Deployment
193193
name: lens
194194
minReplicas: 1
@@ -210,7 +210,7 @@ metadata:
210210
name: lens-hpa
211211
spec:
212212
scaleTargetRef:
213-
apiVersion: v1
213+
apiVersion: apps/v1
214214
kind: Deployment
215215
name: lens
216216
minReplicas: 1

0 commit comments

Comments
 (0)