Skip to content

Commit

Permalink
fix cron trigger keda to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolagospagopa committed Jan 9, 2025
1 parent 54c265d commit 8b4a3e9
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 42 deletions.
8 changes: 4 additions & 4 deletions tests/v5-java-helm-basic-test/helm/values-devopslab-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ microservice-chart:

autoscaling:
enable: true
minReplica: 2
maxReplica: 10
minReplica: 0
maxReplica: 1
pollingInterval: 30 # seconds
cooldownPeriod: 10 # seconds
triggers:
- type: cron
metadata:
# Required
timezone: Europe/Rome # The acceptable values would be a value from the IANA Time Zone Database.
start: 0 21 * * *
end: 0 6 * * *
start: 0 7 * * *
end: 0 21 * * *
desiredReplicas: "1"
- type: cpu
metadata:
Expand Down
6 changes: 3 additions & 3 deletions tests/v5-java-helm-complete-test-bar/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 7.1.1
digest: sha256:40af1f9dfc328fb936c006fcd5ce87871d92e4d4ebd13230c39028b6f72b40a7
generated: "2024-12-05T13:00:48.724203+01:00"
version: 7.3.1
digest: sha256:f9a84f64c3400580571250ba367e30ece2f3ff1c3a482495626415b3f731751f
generated: "2025-01-10T00:12:38.226644+01:00"
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-bar/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 7.1.1
version: 7.3.1
repository: file://../../../charts/microservice-chart
50 changes: 28 additions & 22 deletions tests/v5-java-helm-complete-test-bar/helm/values-devopslab-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ microservice-chart:

deployment:
create: true
replicas: 1

serviceAccount:
name: testit-workload-identity
Expand Down Expand Up @@ -42,9 +41,36 @@ microservice-chart:
image:
repository: ghcr.io/pagopa/devops-java-springboot-color
tag: develop-1.8.0
tag: latest
pullPolicy: Always

resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "300m"

autoscaling:
enable: true
minReplica: 0
maxReplica: 1
pollingInterval: 30 # seconds
cooldownPeriod: 10 # seconds
triggers:
- type: cron
metadata:
# Required
timezone: Europe/Rome # The acceptable values would be a value from the IANA Time Zone Database.
start: 0 7 * * *
end: 0 21 * * *
desiredReplicas: "1"
- type: cpu
metadata:
type: Utilization
value: "60"

tmpVolumeMount:
create: true
mounts:
Expand Down Expand Up @@ -122,26 +148,6 @@ microservice-chart:
securityContext:
allowPrivilegeEscalation: false

resources:
requests:
memory: "256Mi"
cpu: "40m"
limits:
memory: "256Mi"
cpu: "150m"

autoscaling:
enable: true
minReplica: 1
maxReplica: 1
pollingInterval: 30 # seconds
cooldownPeriod: 300 # seconds
triggers:
- type: cpu
metadata:
type: Utilization
value: "60"

podDisruptionBudget:
create: false
minAvailable: 1
Expand Down
6 changes: 3 additions & 3 deletions tests/v5-java-helm-complete-test-foo/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 7.1.1
digest: sha256:40af1f9dfc328fb936c006fcd5ce87871d92e4d4ebd13230c39028b6f72b40a7
generated: "2024-12-05T13:04:42.367868+01:00"
version: 7.3.1
digest: sha256:f9a84f64c3400580571250ba367e30ece2f3ff1c3a482495626415b3f731751f
generated: "2025-01-10T00:21:31.671035+01:00"
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-foo/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 7.1.1
version: 7.3.1
repository: file://../../../charts/microservice-chart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ microservice-chart:

deployment:
create: true
replicas: 1

serviceAccount:
name: testit-workload-identity
Expand Down Expand Up @@ -43,7 +42,7 @@ microservice-chart:
image:
repository: ghcr.io/pagopa/devops-java-springboot-color
tag: develop-1.8.0
tag: latest
pullPolicy: Always

tmpVolumeMount:
Expand Down Expand Up @@ -102,18 +101,25 @@ microservice-chart:
resources:
requests:
memory: "256Mi"
cpu: "40m"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "150m"
memory: "512Mi"
cpu: "300m"

autoscaling:
enable: true
minReplica: 2
maxReplica: 2
minReplica: 0
maxReplica: 1
pollingInterval: 30 # seconds
cooldownPeriod: 300 # seconds
cooldownPeriod: 10 # seconds
triggers:
- type: cron
metadata:
# Required
timezone: Europe/Rome # The acceptable values would be a value from the IANA Time Zone Database.
start: 0 7 * * *
end: 0 21 * * *
desiredReplicas: "1"
- type: cpu
metadata:
type: Utilization
Expand Down

0 comments on commit 8b4a3e9

Please sign in to comment.