Skip to content

Commit

Permalink
Merge pull request #22 from codecentric/several-improvements
Browse files Browse the repository at this point in the history
Summarize improvements from old PRs
  • Loading branch information
grieshaber authored Jan 19, 2024
2 parents 3ec9cab + 6a92d6c commit 3024454
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 108 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.19

RUN apk add yq curl --no-cache

Expand Down
4 changes: 2 additions & 2 deletions charts/cluster-overprovisioner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: cluster-overprovisioner
description: Helm chart, that enables scheduled scaling of a target resource, intended to be add overprovisioning to an autoscaling k8s cluster.
type: application
version: 0.7.0
appVersion: "1.16.0"
version: 0.8.0
appVersion: "1.8.9"
keywords:
- cluster-autoscaler
- overprovisioning
Expand Down
181 changes: 89 additions & 92 deletions charts/cluster-overprovisioner/README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions charts/cluster-overprovisioner/templates/cpa-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data:
{{- end }}
---
{{- $labels := include "cluster-overprovisioner.cpa.labels" . -}}
{{- $namespace := .Values.Namespace -}}
{{- $namespace := .Release.Namespace -}}
{{- range $schedule := .Values.schedules }}
{{- if ne (len $schedule.config) 1 }}
{{ fail (printf "%s%s." "You need to specify exactly one config for schedule " $schedule.name) }}
Expand All @@ -32,7 +32,7 @@ data:
---
{{- end }}
{{- $labels := include "cluster-overprovisioner.labels" . -}}
{{- $namespace := .Values.Namespace -}}
{{- $namespace := .Release.Namespace -}}
{{- range $schedule := .Values.schedules }}
apiVersion: v1
kind: ConfigMap
Expand Down
16 changes: 16 additions & 0 deletions charts/cluster-overprovisioner/templates/cpa-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata:
spec:
failedJobsHistoryLimit: {{ $failedJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ $successfulJobsHistoryLimit }}
{{- if $schedule.timeZone }}
timeZone: {{ $schedule.timeZone | quote }}
{{- end }}
schedule: {{ $schedule.cronTimeExpression | quote }}
jobTemplate:
spec:
Expand Down Expand Up @@ -44,5 +47,18 @@ spec:
defaultMode: 0777
- name: tmp
emptyDir: {}
{{- with $.Values.cpa.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.cpa.affinity }}
affinity:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.cpa.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
{{- end }}

---
{{- end }}
23 changes: 12 additions & 11 deletions charts/cluster-overprovisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Declare variables to be passed into your templates.
cpa:
image:
repository: k8s.gcr.io/cpa/cluster-proportional-autoscaler
repository: registry.k8s.io/cpa/cluster-proportional-autoscaler
pullPolicy: IfNotPresent
tag: 1.8.5
tag: v1.8.9

extraArgs:
- --logtostderr=true
Expand Down Expand Up @@ -158,13 +158,14 @@ defaultConfig:
# If you want to use the schedule-feature, specify as many schedules as you want.
# Example of a schedule:
# - name: night
# cronTimeExpression: "0 16 * * 1-5" # disable overprovisioning Monday - Friday from 6pm
# config:
# ladder:
# {
# "nodesToReplicas":
# [
# [0, 0]
# ]
# }
# cronTimeExpression: "0 16 * * 1-5" # disable overprovisioning Monday - Friday from 6pm
# timeZone: America/New_York # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# config:
# ladder:
# {
# "nodesToReplicas":
# [
# [0, 0]
# ]
# }
schedules: []

0 comments on commit 3024454

Please sign in to comment.