Compare commits
27 Commits
feature/cm
...
fix/autosc
Author | SHA1 | Date | |
---|---|---|---|
bbe9a1d0e2 | |||
2018449215 | |||
fb5af722dd | |||
391114cafd | |||
15f5226914 | |||
ee95a47268 | |||
81ec16a4ce | |||
67b6ff256a | |||
961123728d | |||
2e3a6197bb | |||
10c3178d54 | |||
c61fe1c59e | |||
8f8d22e187 | |||
d87501f660 | |||
cb7070ac1d | |||
474c501d56 | |||
e412a20dd6 | |||
2a1be9740e | |||
827118e89b | |||
089c279bad | |||
ef7d437225 | |||
8b2c941cd9 | |||
8af820d6ad | |||
0982ed7716 | |||
2d2f306765
|
|||
a6ca9f84d6 | |||
04ec234f70 |
14
README.md
14
README.md
@ -2,3 +2,17 @@
|
||||
|
||||
|
||||
You can find charts in charts folder and oci images for every chart in github packages.
|
||||
|
||||
## How to use (example)
|
||||
#### yaml rendering
|
||||
```bash
|
||||
helm template oci://ghcr.io/intreecom/charts/py-app --version 0.1.0
|
||||
```
|
||||
#### show chart values
|
||||
```bash
|
||||
helm show values oci://ghcr.io/intreecom/charts/py-app --version 0.1.0
|
||||
```
|
||||
#### install chart
|
||||
```bash
|
||||
helm install py-app oci://ghcr.io/intreecom/charts/py-app --version 0.1.0
|
||||
```
|
||||
|
@ -11,5 +11,8 @@ spec:
|
||||
targetPort: pg
|
||||
protocol: TCP
|
||||
name: pg
|
||||
{{- if eq .Values.service.type "NodePort" }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "pgbouncer.selectorLabels" . | nindent 4 }}
|
||||
|
@ -64,9 +64,12 @@ securityContext: {}
|
||||
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
|
||||
service:
|
||||
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
# allowed values: ClusterIP (default), NodePort
|
||||
type: ClusterIP
|
||||
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
|
||||
port: 5432
|
||||
# nodePort property is required when the .Values.service.type is NodePort
|
||||
# nodePort: "35432"
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
|
@ -8,6 +8,7 @@ metadata:
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 5 }}
|
||||
{{- end }}
|
||||
{{- with .Values.updateStrategy }}
|
||||
strategy:
|
||||
@ -36,7 +37,7 @@ spec:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
{{- if .Values.command }}
|
||||
cmd: {{ .Values.command }}
|
||||
command: {{ .Values.command }}
|
||||
{{- end}}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
@ -49,7 +50,13 @@ spec:
|
||||
{{- with .Values.probes.readiness }}
|
||||
readinessProbe: {{ . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.probes.startup }}
|
||||
startupProbe: {{ . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- include "py-app.envs" . | indent 10 -}}
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext: {{ . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
|
@ -10,10 +10,10 @@ metadata:
|
||||
argocd.argoproj.io/hook: PreSync,Sync
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
spec:
|
||||
refreshInterval: {{ default "1h" $val.refreshInterval }} # rate SecretManager pulls GCPSM
|
||||
refreshInterval: {{ default "1h" $val.refreshInterval }}
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: {{ $val.secretStoreName }} # name of the SecretStore (or kind specified)
|
||||
name: {{ $val.secretStoreName }}
|
||||
target:
|
||||
name: {{ $val.targetName }}
|
||||
creationPolicy: {{ default "Owner" $val.targetCreationPolicy }}
|
||||
|
6
charts/py-app/templates/extra-objects.yaml
Normal file
6
charts/py-app/templates/extra-objects.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
{{- if .Values.extraManifests }}
|
||||
{{- range .Values.extraManifests }}
|
||||
---
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -17,13 +17,17 @@ spec:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
@ -46,12 +50,16 @@ spec:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.taskiq.autoscaling.targetCPUUtilizationPercentage }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.taskiq.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
12
charts/py-app/templates/limitrange.yaml
Normal file
12
charts/py-app/templates/limitrange.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
{{- if .Values.limitRange.create }}
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: {{ include "py-app.fullname" . }}
|
||||
labels:
|
||||
{{- include "py-app.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- with .Values.limitRange.limits }}
|
||||
limits: {{ . | toYaml | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
@ -9,9 +9,12 @@ spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
targetPort: {{ .Values.service.targetPort | default "http" }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- if eq .Values.service.type "NodePort" }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "py-app.selectorLabels" . | nindent 4 }}
|
||||
deployment_type: web
|
||||
|
18
charts/py-app/templates/static-service.yaml
Normal file
18
charts/py-app/templates/static-service.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
{{- if and .Values.service.enabled .Values.service.staticServiceName -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.service.staticServiceName }}
|
||||
labels:
|
||||
{{- include "py-app.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.service.targetPort | default .Values.service.port }}
|
||||
protocol: TCP
|
||||
name: static-service
|
||||
selector:
|
||||
{{- include "py-app.selectorLabels" . | nindent 4 }}
|
||||
deployment_type: web
|
||||
{{- end }}
|
@ -33,5 +33,5 @@ spec:
|
||||
command: {{ .Values.taskiq.schedulerCmd | toYaml | nindent 10 }}
|
||||
{{- include "py-app.envs" . | indent 10 -}}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- toYaml .Values.taskiq.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
|
@ -39,5 +39,5 @@ spec:
|
||||
command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }}
|
||||
{{- include "py-app.envs" . | indent 10 -}}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- toYaml .Values.taskiq.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
|
@ -30,6 +30,7 @@ ttlSecondsAfterFinished: 3600
|
||||
taskiq:
|
||||
workerCmd: []
|
||||
schedulerCmd: []
|
||||
resources: {}
|
||||
workers: 1
|
||||
autoscaling:
|
||||
enabled: false
|
||||
@ -86,6 +87,7 @@ service:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
staticServiceName: ""
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
@ -125,3 +127,14 @@ autoscaling:
|
||||
maxReplicas: 20
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
limitRange:
|
||||
create: false
|
||||
# limits:
|
||||
# - default:
|
||||
# memory: 700Mi
|
||||
# defaultRequest:
|
||||
# cpu: 50m
|
||||
# memory: 500Mi
|
||||
# type: Container
|
||||
extraManifests: []
|
Reference in New Issue
Block a user