Compare commits
29 Commits
fix/handli
...
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 | |||
eaca6b70c1 | |||
987fde8006 | |||
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.
|
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
|
targetPort: pg
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: pg
|
name: pg
|
||||||
|
{{- if eq .Values.service.type "NodePort" }}
|
||||||
|
nodePort: {{ .Values.service.nodePort }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "pgbouncer.selectorLabels" . | nindent 4 }}
|
{{- 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/
|
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
|
||||||
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
|
# 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
|
type: ClusterIP
|
||||||
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
|
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
|
||||||
port: 5432
|
port: 5432
|
||||||
|
# nodePort property is required when the .Values.service.type is NodePort
|
||||||
|
# nodePort: "35432"
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
@ -8,6 +8,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
{{- if not .Values.autoscaling.enabled }}
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 5 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.updateStrategy }}
|
{{- with .Values.updateStrategy }}
|
||||||
strategy:
|
strategy:
|
||||||
@ -35,6 +36,9 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
{{- if .Values.command }}
|
||||||
|
command: {{ .Values.command }}
|
||||||
|
{{- end}}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@ -46,7 +50,13 @@ spec:
|
|||||||
{{- with .Values.probes.readiness }}
|
{{- with .Values.probes.readiness }}
|
||||||
readinessProbe: {{ . | toYaml | nindent 12 }}
|
readinessProbe: {{ . | toYaml | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.probes.startup }}
|
||||||
|
startupProbe: {{ . | toYaml | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
{{- include "py-app.envs" . | indent 10 -}}
|
{{- include "py-app.envs" . | indent 10 -}}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext: {{ . | toYaml | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ metadata:
|
|||||||
argocd.argoproj.io/hook: PreSync,Sync
|
argocd.argoproj.io/hook: PreSync,Sync
|
||||||
argocd.argoproj.io/sync-wave: "-1"
|
argocd.argoproj.io/sync-wave: "-1"
|
||||||
spec:
|
spec:
|
||||||
refreshInterval: {{ default "1h" $val.refreshInterval }} # rate SecretManager pulls GCPSM
|
refreshInterval: {{ default "1h" $val.refreshInterval }}
|
||||||
secretStoreRef:
|
secretStoreRef:
|
||||||
kind: ClusterSecretStore
|
kind: ClusterSecretStore
|
||||||
name: {{ $val.secretStoreName }} # name of the SecretStore (or kind specified)
|
name: {{ $val.secretStoreName }}
|
||||||
target:
|
target:
|
||||||
name: {{ $val.targetName }}
|
name: {{ $val.targetName }}
|
||||||
creationPolicy: {{ default "Owner" $val.targetCreationPolicy }}
|
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
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: cpu
|
name: cpu
|
||||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: memory
|
name: memory
|
||||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
---
|
||||||
@ -46,12 +50,16 @@ spec:
|
|||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: cpu
|
name: cpu
|
||||||
targetAverageUtilization: {{ .Values.taskiq.autoscaling.targetCPUUtilizationPercentage }}
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.taskiq.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
{{- if .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: memory
|
name: memory
|
||||||
targetAverageUtilization: {{ .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: {{ .Values.taskiq.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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 }}
|
type: {{ .Values.service.type }}
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.service.port }}
|
- port: {{ .Values.service.port }}
|
||||||
targetPort: http
|
targetPort: {{ .Values.service.targetPort | default "http" }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
{{- if eq .Values.service.type "NodePort" }}
|
||||||
|
nodePort: {{ .Values.service.nodePort }}
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "py-app.selectorLabels" . | nindent 4 }}
|
{{- include "py-app.selectorLabels" . | nindent 4 }}
|
||||||
deployment_type: web
|
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 }}
|
command: {{ .Values.taskiq.schedulerCmd | toYaml | nindent 10 }}
|
||||||
{{- include "py-app.envs" . | indent 10 -}}
|
{{- include "py-app.envs" . | indent 10 -}}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.taskiq.resources | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -39,5 +39,5 @@ spec:
|
|||||||
command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }}
|
command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }}
|
||||||
{{- include "py-app.envs" . | indent 10 -}}
|
{{- include "py-app.envs" . | indent 10 -}}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.taskiq.resources | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -30,6 +30,7 @@ ttlSecondsAfterFinished: 3600
|
|||||||
taskiq:
|
taskiq:
|
||||||
workerCmd: []
|
workerCmd: []
|
||||||
schedulerCmd: []
|
schedulerCmd: []
|
||||||
|
resources: {}
|
||||||
workers: 1
|
workers: 1
|
||||||
autoscaling:
|
autoscaling:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -86,6 +87,7 @@ service:
|
|||||||
enabled: true
|
enabled: true
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
staticServiceName: ""
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -125,3 +127,14 @@ autoscaling:
|
|||||||
maxReplicas: 20
|
maxReplicas: 20
|
||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
# targetMemoryUtilizationPercentage: 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