Compare commits
31 Commits
fix/handli
...
master
Author | SHA1 | Date | |
---|---|---|---|
a8a206e5d4
|
|||
cf5d24cd73 | |||
3d62a1324d | |||
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,9 +14,6 @@ jobs:
|
|||||||
chart:
|
chart:
|
||||||
- py-app
|
- py-app
|
||||||
- pgbouncer
|
- pgbouncer
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: azure/setup-helm@v4.2.0
|
- uses: azure/setup-helm@v4.2.0
|
||||||
@ -26,7 +23,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
helm package --dependency-update ./charts/${{ matrix.chart }}
|
helm package --dependency-update ./charts/${{ matrix.chart }}
|
||||||
helm show chart *.tgz
|
helm show chart *.tgz
|
||||||
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
|
helm registry login -u ${{ gitea.actor }} -p ${{ secrets.UPLOADER_PAT }} gitea.le-memese.com
|
||||||
helm push *.tgz oci://ghcr.io/intreecom/charts
|
helm push *.tgz oci://gitea.le-memese.com/common/charts
|
||||||
env:
|
env:
|
||||||
HELM_EXPERIMENTAL_OCI: 1
|
HELM_EXPERIMENTAL_OCI: 1
|
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
|
||||||
|
```
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- range $name, $val := .Values.externalSecrets }}
|
{{- range $name, $val := .Values.externalSecrets }}
|
||||||
---
|
---
|
||||||
apiVersion: external-secrets.io/v1beta1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{include "pgbouncer.name" $ }}-{{ $name }}"
|
name: "{{include "pgbouncer.name" $ }}-{{ $name }}"
|
||||||
|
@ -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 }}
|
||||||
|
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
{{- range $name, $val := .Values.externalSecrets }}
|
{{- range $name, $val := .Values.externalSecrets }}
|
||||||
---
|
---
|
||||||
apiVersion: external-secrets.io/v1beta1
|
apiVersion: external-secrets.io/v1
|
||||||
kind: ExternalSecret
|
kind: ExternalSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{include "py-app.name" $ }}-{{ $name }}"
|
name: "{{include "py-app.name" $ }}-{{ $name }}"
|
||||||
labels:
|
labels:
|
||||||
{{- include "py-app.labels" $ | nindent 4 }}
|
{{- include "py-app.labels" $ | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/hook: PreSync,Sync
|
"helm.sh/hook": pre-install,pre-upgrade
|
||||||
argocd.argoproj.io/sync-wave: "-1"
|
"helm.sh/hook-delete-policy": before-hook-creation
|
||||||
|
"helm.sh/hook-weight": "-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 }}
|
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 -}}
|
@ -5,12 +5,12 @@
|
|||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
generateName: "{{ include "py-app.fullname" $ }}-{{ $name }}-mj"
|
name: "{{ include "py-app.fullname" $ }}-{{ $name }}-mj"
|
||||||
labels:
|
labels:
|
||||||
{{- include "py-app.labels" $ | nindent 4 }}
|
{{- include "py-app.labels" $ | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/hook: PreSync
|
"helm.sh/hook": pre-install,pre-upgrade
|
||||||
argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
{{- with $val.annotations }}
|
{{- with $val.annotations }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- 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 }}
|
||||||
|
@ -20,7 +20,7 @@ migrators: {}
|
|||||||
# pg:
|
# pg:
|
||||||
# # Job's additional annotations
|
# # Job's additional annotations
|
||||||
# annotations:
|
# annotations:
|
||||||
# argocd.argoproj.io/sync-wave: "5"
|
# "helm.sh/hook-weight": "-1"
|
||||||
# command: ["alembic", "upgrade", "head"]
|
# command: ["alembic", "upgrade", "head"]
|
||||||
# # You can specify limits for every migrator Job.
|
# # You can specify limits for every migrator Job.
|
||||||
# resources: {}
|
# resources: {}
|
||||||
@ -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