Skip to content

Commit ced6de7

Browse files
author
github-actions
committed
Update perfectscale-autoscaler chart with new package version v0.1.23
1 parent ab86620 commit ced6de7

File tree

7 files changed

+94
-16
lines changed

7 files changed

+94
-16
lines changed

charts/psc-autoscaler/templates/_helpers.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ Create the name of the service account to use
7979
{{- end }}
8080
{{- end }}
8181

82+
{{- define "psc-autoscaler.integrationTests.serviceAccountName" -}}
83+
{{- if .Values.integrationTests.serviceAccount.create }}
84+
{{- default (printf "%s-int-tests" (include "psc-autoscaler.fullname" .)) .Values.integrationTests.serviceAccount.name }}
85+
{{- else }}
86+
{{- default "default" .Values.integrationTests.serviceAccount.name }}
87+
{{- end }}
88+
{{- end }}
89+
8290
{{- define "helm.autoscaler.remoteLogBatchSize" -}}
8391
{{- if .Values.settings.remoteLogBatchSize }}
8492
{{- .Values.settings.remoteLogBatchSize }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if .Values.integrationTests.enabled -}}
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
name: {{ include "psc-autoscaler.fullname" . }}-int-tests-mutation-check
6+
annotations:
7+
"helm.sh/hook": test
8+
spec:
9+
containers:
10+
- name: mutation-check
11+
image: "{{ .Values.image.repository }}:{{ .Values.integrationTests.image.tag | default ( printf "%s-int-tests" .Chart.AppVersion) }}"
12+
command:
13+
- "./test"
14+
env:
15+
- name: CLEANUP
16+
value: {{ .Values.integrationTests.settings.cleanup | quote }}
17+
resources:
18+
{{- toYaml .Values.cmd.serve.resources | nindent 8 }}
19+
restartPolicy: Never
20+
serviceAccountName: {{ include "psc-autoscaler.integrationTests.serviceAccountName" . }}
21+
{{ end }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if .Values.integrationTests.rbac.enabled -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
name: {{ include "psc-autoscaler.fullname" . }}-int-tests
6+
rules:
7+
- apiGroups: [ "" ]
8+
resources: [ "pods" ]
9+
verbs: [ "get", "list", "watch" ]
10+
- apiGroups: [ "apps" ]
11+
resources: [ "replicasets", "deployments", "statefulsets", "daemonsets", "jobs", "cronjobs" ]
12+
verbs: [ "get", "list", "watch", "patch", "create", "delete" ]
13+
- apiGroups: [ "perfectscale.io" ]
14+
resources: [ "workloads" ]
15+
verbs: [ "create", "get", "delete", "list", "patch", "update", "watch" ]
16+
{{ end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if .Values.rbac.enabled -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
name: {{ include "psc-autoscaler.fullname" . }}-int-tests
6+
labels: {{- include "psc-autoscaler.labels" . | nindent 4 }}
7+
subjects:
8+
- kind: ServiceAccount
9+
name: {{ include "psc-autoscaler.integrationTests.serviceAccountName" . }}
10+
namespace: {{ .Release.Namespace }}
11+
roleRef:
12+
kind: Role
13+
name: {{ include "psc-autoscaler.fullname" . }}-int-tests
14+
apiGroup: rbac.authorization.k8s.io
15+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.integrationTests.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "psc-autoscaler.integrationTests.serviceAccountName" . }}
6+
labels:
7+
{{- include "psc-autoscaler.labels" . | nindent 4 }}
8+
{{- with .Values.integrationTests.serviceAccount.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
{{- end }}

charts/psc-autoscaler/templates/tests/test-connection.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

charts/psc-autoscaler/values.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ replicaCount: 3
22
image:
33
repository: public.ecr.aws/perfectscale-io/psc-autoscaler
44
pullPolicy: Always
5-
tag: "v0.1.22"
5+
tag: "v0.1.23"
66
settings:
77
env: "prod"
88
logLevel: "DEBUG"
@@ -92,3 +92,24 @@ admission:
9292
timeout: 15
9393
# Optionally change it to "Fail"
9494
failurePolicy: "Ignore"
95+
integrationTests:
96+
enabled: true
97+
image:
98+
repository: public.ecr.aws/perfectscale-io/psc-autoscaler
99+
tag: "v0.1.23-int-tests"
100+
serviceAccount:
101+
# Specifies whether a service account should be created
102+
create: true
103+
# Annotations to add to the service account
104+
annotations: {}
105+
# The name of the service account to use.
106+
# If not set and create is true, a name is generated using the fullname template
107+
name: ""
108+
rbac:
109+
enabled: true
110+
settings:
111+
cleanup: "true"
112+
resources:
113+
requests:
114+
cpu: 100m
115+
memory: 100Mi

0 commit comments

Comments
 (0)