Skip to content

Commit

Permalink
Update perfectscale-autoscaler chart with new package version v1.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 11, 2024
1 parent d2e44ed commit cb02f85
Show file tree
Hide file tree
Showing 16 changed files with 252 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ spec:
operational:
stopAllAutomation: false
workloadTypes:
# You should consider if you want to enable StatefulSets automation.
# You might want a human eye while restarting production databases, in general, pods with persistent volume are more fragile.
# As well, if your StatefulSet runs on dedicated nodes, reducing workload resources will not help to reduce the cost
StatefulSet:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
keepLimit: true
memoryManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
increaseEnabled: false
decreaseEnabled: false
Deployment:
operational:
automationMode: "Enabled"
Expand Down Expand Up @@ -41,10 +61,24 @@ spec:
limit:
increaseEnabled: false
decreaseEnabled: false
# You should consider if you want to enable StatefulSets automation.
# You might want a human eye while restarting production databases, in general, pods with persistent volume are more fragile.
# As well, if your StatefulSet runs on dedicated nodes, reducing workload resources will not help to reduce the cost
StatefulSet:
CronJob:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
keepLimit: true
memoryManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
increaseEnabled: false
decreaseEnabled: false
Job:
operational:
automationMode: "Enabled"
restrictions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ spec:
operational:
stopAllAutomation: false
workloadTypes:
# You should consider if you want to enable StatefulSets automation.
# You might want a human eye while restarting production databases, in general, pods with persistent volume are more fragile.
# As well, if your StatefulSet runs on dedicated nodes, reducing workload resources will not help to reduce the cost
StatefulSet:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
keepLimit: false
memoryManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
increaseEnabled: true
decreaseEnabled: true
Deployment:
operational:
automationMode: "Enabled"
Expand Down Expand Up @@ -41,10 +61,24 @@ spec:
limit:
increaseEnabled: true
decreaseEnabled: true
# You should consider if you want to enable StatefulSets automation.
# You might want a human eye while restarting production databases, in general, pods with persistent volume are more fragile.
# As well, if your StatefulSet runs on dedicated nodes, reducing workload resources will not help to reduce the cost
StatefulSet:
CronJob:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
keepLimit: false
memoryManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
increaseEnabled: true
decreaseEnabled: true
Job:
operational:
automationMode: "Enabled"
restrictions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,37 @@ spec:
limit:
increaseEnabled: true
decreaseEnabled: true
CronJob:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
keepLimit: false
memoryManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
increaseEnabled: true
decreaseEnabled: true
Job:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
keepLimit: false
memoryManagement:
request:
increaseEnabled: true
decreaseEnabled: true
limit:
increaseEnabled: true
decreaseEnabled: true
34 changes: 34 additions & 0 deletions charts/psc-autoscaler/examples/cluster-config-cost-saving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,37 @@ spec:
limit:
increaseEnabled: false
decreaseEnabled: false
CronJob:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
keepLimit: true
memoryManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
increaseEnabled: false
decreaseEnabled: false
Job:
operational:
automationMode: "Enabled"
restrictions:
cpuManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
keepLimit: true
memoryManagement:
request:
increaseEnabled: false
decreaseEnabled: true
limit:
increaseEnabled: false
decreaseEnabled: false
17 changes: 17 additions & 0 deletions charts/psc-autoscaler/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ metadata:
name: {{ include "psc-autoscaler.fullname" . }}-tls
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.admission.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- if .Values.admission.staticCerts.enabled }}
tls.crt: {{ .Values.admission.staticCerts.tlsCert }}
Expand All @@ -23,6 +30,11 @@ apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: {{ include "psc-autoscaler.fullname" . }}
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.admission.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -62,6 +74,11 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: {{ include "psc-autoscaler.fullname" . }}
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.admission.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/psc-autoscaler/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "psc-autoscaler.fullname" . }}
labels: {{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: [ "admissionregistration.k8s.io" ]
resources: [ "mutatingwebhookconfigurations", "validatingwebhookconfigurations" ]
Expand Down
7 changes: 7 additions & 0 deletions charts/psc-autoscaler/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ kind: ClusterRoleBinding
metadata:
name: {{ template "psc-autoscaler.fullname" . }}
labels: {{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "psc-autoscaler.serviceAccountName" . }}
Expand Down
29 changes: 29 additions & 0 deletions charts/psc-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
name: {{ include "psc-autoscaler.fullname" . }}-serve
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -20,6 +23,9 @@ spec:
metadata:
annotations:
checksum/secret: {{ include (print $.Template.BasePath "/admission.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if not .Values.admission.staticCerts.enabled }}
{{- /* it requires to reload the latest re-generated certs for mtls after helm upgrade*/}}
rolloutme: {{ randAlphaNum 5 | quote }}
Expand All @@ -28,6 +34,9 @@ spec:
automation.perfectscale.io/excluded: "true"
perfectscale.io/psc-autoscaler-cmd: serve
{{- include "psc-autoscaler.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if (.Values.hostNetwork).enabled }}
hostNetwork: true
Expand Down Expand Up @@ -142,6 +151,9 @@ metadata:
name: {{ include "psc-autoscaler.fullname" . }}-sync
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -160,6 +172,13 @@ spec:
automation.perfectscale.io/excluded: "true"
perfectscale.io/psc-autoscaler-cmd: sync
{{- include "psc-autoscaler.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.priorityClass.enabled }}
priorityClassName: {{ .Values.priorityClass.name }}
Expand Down Expand Up @@ -249,6 +268,9 @@ metadata:
name: {{ include "psc-autoscaler.fullname" . }}-evict
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -267,6 +289,13 @@ spec:
automation.perfectscale.io/excluded: "true"
perfectscale.io/psc-autoscaler-cmd: evict
{{- include "psc-autoscaler.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.priorityClass.enabled }}
priorityClassName: {{ .Values.priorityClass.name }}
Expand Down
6 changes: 6 additions & 0 deletions charts/psc-autoscaler/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ metadata:
name: {{ .Values.secret.name | default $fullName }}
annotations:
"helm.sh/resource-policy": keep
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
type: Opaque
data:
clientId: {{ .Values.secret.clientId | b64enc | quote }}
Expand Down
7 changes: 7 additions & 0 deletions charts/psc-autoscaler/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ metadata:
name: {{ include "psc-autoscaler.fullname" . }}
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
3 changes: 3 additions & 0 deletions charts/psc-autoscaler/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ include "psc-autoscaler.serviceAccountName" . }}
labels:
{{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ apiVersion: v1
kind: Pod
metadata:
name: {{ include "psc-autoscaler.fullname" . }}-int-tests-mutation-check
labels: {{- include "psc-autoscaler.labels" . | nindent 4 }}
{{- if .Values.additionalLabels }}
{{- toYaml .Values.additionalLabels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": test
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
containers:
- name: mutation-check
Expand Down
Loading

0 comments on commit cb02f85

Please sign in to comment.