27 Commits

Author SHA1 Message Date
bbe9a1d0e2 fix: HPA schema correction
aligning with `apiVersion: autoscaling/v2`
2025-05-16 18:15:37 +05:30
2018449215 Merge pull request #13 from Intreecom/fix/removed-unnecessary-label
fix: removed unnecessary label from secret
2025-04-17 16:51:45 +05:30
fb5af722dd fix: removed unnecessary label from secret 2025-04-17 16:15:29 +05:30
391114cafd Merge pull request #12 from Intreecom/fix/extra-label-externalsecrets
fix: added an extra label on ExternalSecrets
2025-03-28 11:03:15 +05:30
15f5226914 corrected label path 2025-03-27 16:16:10 +05:30
ee95a47268 fix: added an extra label on ExternalSecrets
- this label will provide filtration for resource exclusion
2025-03-27 16:13:11 +05:30
81ec16a4ce Merge pull request #11 from Intreecom/fix/static-svc-port-name
fix: corrected targetPort value
2025-03-21 16:56:04 +05:30
67b6ff256a fix: corrected targetPort value
finding: The `targetPort` name is the same as
`containers[*].ports[*].name` from deployment/pod definition and not
`spec.ports[*].name` from service definition
2025-03-21 16:45:42 +05:30
961123728d Merge pull request #10 from Intreecom/feature/static-service
feature: service with a static name across envs
2025-03-20 15:06:23 +05:30
2e3a6197bb fix: simplified conditional static service 2025-03-20 11:30:27 +05:30
10c3178d54 added default value used when staticServiceName is absent 2025-03-18 19:25:44 +05:30
c61fe1c59e [wip] feature: service with a static name across envs 2025-03-18 17:23:01 +05:30
8f8d22e187 Merge pull request #2 from Intreecom/update-readme
add: oci chart usage instructions
2025-02-25 17:16:35 +01:00
d87501f660 Merge pull request #8 from Intreecom/feature/extra-manifests
feature: capability to add extra kubernetes manifests
2025-02-13 11:28:33 +05:30
cb7070ac1d features: revisionHistoryLimit and taskiq specific resources specification 2025-02-12 12:22:36 +05:30
474c501d56 added startupProbe support 2025-02-12 11:33:08 +05:30
e412a20dd6 feature: added limitrange object support 2025-02-11 20:39:53 +05:30
2a1be9740e feature: capability to add extra kubernetes manifests
example usage:

```yaml
extraManifests:
  - apiVersion: v1
    kind: LimitRange
    metadata:
      annotations:
        argocd.argoproj.io/sync-wave: "10"
      name: default-limit-range
    spec:
      limits:
      - default:
          memory: 700Mi
        defaultRequest:
          cpu: 50m
          memory: 500Mi
        type: Container
```
2025-02-11 19:43:48 +05:30
827118e89b Merge pull request #7 from Intreecom/feature/targetport-capability
feature: capability to add targetport (optional)
2025-02-11 17:41:45 +05:30
089c279bad feature: capability to add targetport (optional) 2025-02-11 17:32:55 +05:30
ef7d437225 Merge pull request #6 from Intreecom/feature/nodeport-service-type
feature/nodeport service type
2025-02-05 20:20:47 +05:30
8b2c941cd9 feature: nodeport service type compatibility 2025-02-05 20:16:48 +05:30
8af820d6ad feature: added compatibility of nodeport service type 2025-02-05 20:15:09 +05:30
0982ed7716 Merge pull request #5 from Intreecom/bugfix/command 2025-02-04 19:42:31 +01:00
2d2f306765 Fixed container command. 2025-02-04 19:40:31 +01:00
a6ca9f84d6 Merge pull request #4 from Intreecom/feature/cmd-for-deployment
feature: capability to add a `cmd` in main deployment created by chart
2025-01-16 17:30:25 +05:30
04ec234f70 add: oci chart usage instructions 2024-12-24 13:46:21 +05:30
13 changed files with 97 additions and 10 deletions

View File

@ -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
```

View File

@ -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 }}

View File

@ -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

View File

@ -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 }}

View File

@ -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 }}

View File

@ -0,0 +1,6 @@
{{- if .Values.extraManifests }}
{{- range .Values.extraManifests }}
---
{{ toYaml . }}
{{- end }}
{{- end }}

View File

@ -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 }}

View 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 -}}

View File

@ -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

View 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 }}

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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: []