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

Summarize improvements from old PRs #22

Merged
merged 6 commits into from
Jan 19, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: []
Loading