Compare commits

...

22 Commits

Author SHA1 Message Date
Khushi Malhotra 7a57238e94
Merge d960601ee0 into fe8cec4075 2025-08-18 20:40:16 +00:00
sharvarikhamkar1304 fe8cec4075
feat : Added helm chart for ingress management (#285)
* Add ingress-management

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Update values.yaml

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Move ingress-management chart under charts directory

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Create README.md

* Update README.md

* Update README.md

* Update README.md

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Fix: Update Chart.yaml metadata with repo and maintainer info

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Fix maintainer name

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* update

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Delete charts/ingress-management/etc directory

* Delete charts/ingress-management/LICENSE

* Update README.md

* Update README.md

* fix: update helm chart for ingress-management

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Update values.yaml

* Update values.yaml

* Update values.yaml

* Fix: update values.yaml

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>

* Update values.yaml

* Update httproute.yaml

* Update values.yaml

* Update httproute.yaml

* Update values.yaml

* Update values.yaml

* Update values.yaml

* Update httproute.yaml

* Update values.yaml

* Update values.yaml

* Update values.yaml

* Update values.yaml

---------

Signed-off-by: sharvarikhamkar1304 <sharvari.khamkar@mygurukulam.co>
2025-08-05 13:41:19 +05:30
Abhishek Dubey 22a3df98c8
[COE][Add] Added helm chart for worker based deployment (#281)
* Added helm chart for worker based deployment

Signed-off-by: Abhishek Dubey <abhishekbhardwaj510@gmail.com>

* Added helm chart for worker based deployment

Signed-off-by: Abhishek Dubey <abhishekbhardwaj510@gmail.com>

* Added helm chart for worker based deployment

Signed-off-by: Abhishek Dubey <abhishekbhardwaj510@gmail.com>

---------

Signed-off-by: Abhishek Dubey <abhishekbhardwaj510@gmail.com>
2025-07-04 00:52:37 +05:30
Prashantdev780 9a6b440441
Helm fix for liveliness probe and readiness probe (#279) 2025-06-30 20:07:40 +05:30
Sandeep Rawat 6306426bed
Merge pull request #278 from OT-CONTAINER-KIT/helm_fix
Fixed secrets block in deployment.yml of microservice
2025-06-30 18:34:38 +05:30
Prashantdev780 ff645ddecd
Update Chart.yaml 2025-06-30 18:32:37 +05:30
Prashant Sharma 3619d89003 Fixed secrets block in deployment.yml of microservice 2025-06-30 17:13:05 +05:30
Ubuntu d960601ee0 postgres helm 2024-07-11 10:16:21 +00:00
Khushi Malhotra ab2a8ea29c
Delete charts/postgress directory 2024-06-12 15:20:09 +05:30
Khushi Malhotra 240274fc55
Rename Charts.yaml to Chart.yaml 2024-06-12 15:19:41 +05:30
Khushi Malhotra ce7cd2168c
Create Charts.yaml 2024-06-12 15:18:46 +05:30
Khushi Malhotra 235ed525cc
Rename Chart.yaml to Chart.yaml 2024-06-12 15:15:38 +05:30
Ubuntu af049c7ef1 updated postgress 2024-06-12 09:34:57 +00:00
Khushi Malhotra aead5697c3
Update service.yaml 2024-06-12 12:56:01 +05:30
Khushi Malhotra 6cafcf448a
Update _helpers.tpl 2024-06-12 12:55:36 +05:30
Khushi Malhotra 23f809c746
Update secret.yaml 2024-06-12 12:55:10 +05:30
Khushi Malhotra 728aacd815
Update and rename deployment.yaml to statefullset.yaml 2024-06-12 12:54:24 +05:30
Khushi Malhotra 105b058202
Update values.yaml 2024-06-12 12:53:29 +05:30
Khushi Malhotra 2cb6c5f77d
Update secret.yaml 2024-06-12 12:48:30 +05:30
Khushi Malhotra ca0c80c2c4
Update values.yaml 2024-06-07 11:34:50 +05:30
Khushi Malhotra c6fb9a0cb0
Update Chart.yaml 2024-06-07 11:33:00 +05:30
Ubuntu 7ddef7ef2a postgress helm 2024-06-06 10:05:49 +00:00
24 changed files with 642 additions and 4 deletions

View File

@ -0,0 +1,16 @@
apiVersion: v2
name: ingress-management
description: A Helm chart to manage Ingress traffic
version: 0.1.0
appVersion: "1.0"
home: https://github.com/ot-container-kit/helm-charts
maintainers:
- name: sharvarikhamkar1304
keywords:
- ingress
- kong
- httpRoute
- kubernetes
icon: https://raw.githubusercontent.com/OT-CONTAINER-KIT/helm-charts/main/static/helm-chart-logo.svg
sources:
- https://github.com/ot-container-kit/helm-charts

View File

@ -0,0 +1,49 @@
# Ingress Management Helm Chart
A simple and reusable Helm chart to manage Kubernetes Gateway API HTTPRoutes for routing traffic to backend services.
This chart helps manage HTTPRoute resources to expose services using the Kubernetes Gateway API. You can customize host, path, service, and namespace via values.
## Homepage
[https://github.com/ot-container-kit/helm-charts](https://github.com/ot-container-kit/helm-charts)
## Maintainers
| Name | URL |
| ---------------- | --------------------------------------------- |
| sharvari-khamkar | [GitHub](https://github.com/sharvari-khamkar) |
## Source Code
[GitHub - ot-container-kit/helm-charts](https://github.com/ot-container-kit/helm-charts)
## Requirements
| Repository | Name | Version |
| ------------------------------------------------------------------------------------------------ | ---- | ------- |
| [https://ot-container-kit.github.io/helm-charts](https://ot-container-kit.github.io/helm-charts) | base | 0.1.0 |
## Values
| **Attribute** | **Scope** | **Example** | **Description** | **Default** |
|------------------|------------------|------------------------|------------------------------------------------------------------------|--------------|
| <br> `name` <br> <br> | <br> Global <br> <br> | <br> `"my-app"` <br> <br> | <br> Name of the HTTPRoute and backend service (the app name)<br><br> | `""` |
| <br> `namespace` <br> <br> | <br> Global <br> <br> | <br> `"default"` <br> <br> | <br> Kubernetes namespace where resources like HTTPRoute will be deployed<br><br> | `""` |
| <br> `host` <br> <br> | Routing | `"app.example.com"` | Hostname to expose the app<br><br> | `""` |
| <br>`path` <br> <br> | Routing | `"/api"` | Path under the host<br><br> | `""` |
| <br>`service.name` <br> <br> | Service Config | `"my-backend-svc"` | Name of the backend service to which traffic will be routed<br><br> | `""` |
| <br>`service.kind` <br> <br> | Service Config | `"Service"` | Kind of backend resource (Service by default)<br><br> | `"Service"` |
| <br>`service.port` <br> <br> | Service Config | `80` | Port on which the backend service listens<br><br> | `80` |

View File

@ -0,0 +1,46 @@
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ required "A valid 'name' is required!" .Values.name }}
{{- if .Values.labels }}
labels:
{{ toYaml .Values.labels | indent 4 }}
{{- end }}
{{- if .Values.annotations }}
annotations:
{{ toYaml .Values.annotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.parentRefs }}
parentRefs:
{{- range .Values.parentRefs }}
- name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.hostnames }}
hostnames:
{{- range .Values.hostnames }}
- "{{ . }}"
{{- end }}
{{- end }}
rules:
{{- range .Values.rules }}
- matches:
{{- range .matches }}
- path:
type: {{ .path.type }}
value: {{ .path.value | quote }}
{{- end }}
backendRefs:
{{- range .backendRefs }}
- name: {{ .name }}
kind: {{ .kind | default "Service" }}
port: {{ .port }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,60 @@
---
# charts/ingress-management/values.yaml
# -- Name of the HTTPRoute and backend service (typically the app name)
name: ""
# -- Labels to apply to the HTTPRoute metadata
labels:
app: ""
# -- Optional annotations to apply to the HTTPRoute resource
annotations: {}
# -- Reference to the Gateway (parentRefs)
parentRefs:
- name: ""
namespace: ""
# -- Hostnames to be matched in the HTTPRoute
hostnames:
- ""
# -- Routing rules for HTTPRoute
rules:
- matches:
- path:
type: PathPrefix
value: ""
backendRefs:
- name: ""
kind: Service
port: 80
# -----------------------------------------------------
# Example values.yaml File
# -----------------------------------------------------
# name: open-webui
# labels:
# app: open-webui
# annotations:
# konghq.com/protocols: https
# konghq.com/https-redirect-status-code: "301"
# parentRefs:
# - name: kong
# namespace: default
# hostnames:
# - bp-ai.opstree.dev
# rules:
# - matches:
# - path:
# type: PathPrefix
# value: /
# backendRefs:
# - name: open-webui
# kind: Service
# port: 80

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: microservice
description: Basic helm chart for deploying microservices on kubernetes with best practices
type: application
version: 0.1.6
version: 0.1.8
appVersion: "0.1.2"
maintainers:
- name: ashwani-opstree

View File

@ -33,7 +33,7 @@ spec:
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
@ -67,11 +67,11 @@ spec:
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.livenessProbe }}
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.livenessProbe.httpGet }}
livenessProbe:
{{- toYaml .Values.deployment.livenessProbe | nindent 12 }}
{{- end }}
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.readinessProbe }}
{{- if and .Values.deployment.healthProbes.enabled .Values.deployment.readinessProbe.httpGet }}
readinessProbe:
{{- toYaml .Values.deployment.readinessProbe | nindent 12 }}
{{- end }}

View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,6 @@
apiVersion: v2
name: postgresql-helm-chart
description: A Helm chart for PostgreSQL
version: 0.1.0
appVersion: "12.6"

View File

@ -0,0 +1,24 @@
{{- if .Values.ingress }}
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "postgres.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "postgres.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "postgres.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "postgres.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View File

@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "postgres.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "postgres.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "postgres.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "postgres.labels" -}}
helm.sh/chart: {{ include "postgres.chart" . }}
{{ include "postgres.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "postgres.selectorLabels" -}}
app.kubernetes.io/name: {{ include "postgres.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "postgres.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "postgres.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-config
data:
POSTGRES_DB: {{ default (randAlphaNum 8) .Values.configMap.databaseName }}
POSTGRES_USER: {{ default (randAlphaNum 8) .Values.configMap.user }}

View File

@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: postgresql
template:
metadata:
labels:
app: postgresql
spec:
containers:
- name: postgresql
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: postgresql-config
key: POSTGRES_DB
- name: POSTGRES_USER
valueFrom:
configMapKeyRef:
name: postgresql-config
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql-secret
key: password
ports:
- containerPort: 5432

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: postgresql-secret
type: Opaque
data:
password: {{ default (randAlphaNum 16) .Values.secret.password | b64enc | quote }}

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: postgresql-headless
spec:
clusterIP: None
ports:
- port: {{ .Values.service.port }}
targetPort: 5432
selector:
app: postgresql

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "postgres.fullname" . }}-test-connection"
labels:
{{- include "postgres.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "postgres.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View File

@ -0,0 +1,32 @@
replicaCount: 1
image:
repository: postgres
tag: "12.6"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5432
configMap:
databaseName: mydatabase
user: myuser
secret:
password: changeme
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "10Gi"
cpu: "1"
nodeSelector: {}
tolerations: []
affinity: {}

26
charts/worker/Chart.yaml Normal file
View File

@ -0,0 +1,26 @@
---
apiVersion: v2
description: A deployment helm chart which will be used to deploy any type of stateless application
maintainers:
- name: iamabhishek-dubey
email: "abhishek.dubey@opstree.com"
url: https://github.com/iamabhishek-dubey
name: worker
sources:
- https://github.com/ot-container-kit/helm-charts
dependencies:
- name: base
version: 0.1.0
repository: https://ot-container-kit.github.io/helm-charts
version: 0.1.0
appVersion: "0.1.0"
home: https://github.com/ot-container-kit/helm-charts
keywords:
- deployment
- base
- opstree
- kubernetes
- openshift
- microservice
- stateless
icon: https://raw.githubusercontent.com/OT-CONTAINER-KIT/helm-charts/main/static/helm-chart-logo.svg

39
charts/worker/README.md Normal file
View File

@ -0,0 +1,39 @@
# Worker Deployment Helm Chart
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
A deployment helm chart which will be used to deploy any type of stateless application
**Homepage:** <https://github.com/ot-container-kit/helm-charts>
## Maintainers
| Name | Email | Url |
|-------------------|------------------------------|----------------------------------------|
| iamabhishek-dubey | <abhishek.dubey@opstree.com> | <https://github.com/iamabhishek-dubey> |
## Source Code
* <https://github.com/ot-container-kit/helm-charts>
## Requirements
| Repository | Name | Version |
|------------------------------------------------|------|---------|
| https://ot-container-kit.github.io/helm-charts | base | 0.1.0 |
## Values
| Key | Type | Default | Description |
|------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
| autoscaling | object | `{"enabled":false,"maxReplicas":50,"minReplicas":10,"targetCPUUtilizationPercentage":65,"targetMemoryUtilizationPercentage":65}` | Autoscaling properties with target CPU and Memory details |
| base | object | `{"image":{"command":[],"pullPolicy":"IfNotPresent","pullSecrets":"","repository":"nginx","tag":"latest"}}` | Base block to define the inputs for image, secret and configmap env |
| base.image | object | `{"command":[],"pullPolicy":"IfNotPresent","pullSecrets":"","repository":"nginx","tag":"latest"}` | Image block with all image details |
| base.image.command | list | `[]` | Additional command arguments which needs to be passed |
| base.image.pullPolicy | string | `"IfNotPresent"` | Default image pull policy |
| base.image.pullSecrets | string | `""` | Image pull secrets for private repository authentication |
| base.image.repository | string | `"nginx"` | Default image repository |
| base.image.tag | string | `"latest"` | Default image tag |
| replicaCount | int | `2` | Number of replicas for deployment, it will be overridden in case autoscaling is enabled |
| resources | object | `{}` | Kubernetes resource in terms of requests and limits |
| volumes | string | `nil` | Kubernetes volumes definition which needs to be mounted |

View File

@ -0,0 +1,4 @@
{{ include "configmap" . }}
---
{{ include "serviceAccount" . }}
---

View File

@ -0,0 +1,18 @@
{{- if .Values.volumes }}
{{- if .Values.volumes.configMaps }}
{{ range $cm := .Values.volumes.configMaps}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $cm.name }}
labels:
{{- include "base.labels" $ | nindent 4 }}
data:
{{- range $filename, $content := $cm.data }}
{{ $filename }}: |-
{{ $content | toString | indent 4}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,65 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "base.fullname" . }}
labels:
{{- include "base.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
{{- with .Values.replicaCount }}
replicas: {{ . }}
{{- end }}
{{- end }}
selector:
matchLabels:
{{- include "base.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "base.selectorLabels" . | nindent 8 }}
spec:
{{- if .Values.base.image.pullSecrets }}
imagePullSecrets:
- name: {{ .Values.base.image.pullSecrets }}
{{- end }}
serviceAccountName: {{ include "base.serviceAccountName" . }}
terminationGracePeriodSeconds: 120
containers:
- name: {{ include "base.fullname" . }}
image: "{{ .Values.base.image.repository }}:{{ .Values.base.image.tag }}"
imagePullPolicy: {{ .Values.base.image.pullPolicy }}
{{- if .Values.base.image.command }}
command:
{{- toYaml .Values.base.image.command | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.base.config }}
envFrom:
- configMapRef:
name: {{ include "base.fullname" . }}
{{- end }}
{{- if .Values.base.secret }}
- secretRef:
name: {{ include "base.fullname" . }}
{{- end }}
{{- if .Values.volumes }}
volumeMounts:
{{- if .Values.volumes.configMaps }}
{{- range $conf := .Values.volumes.configMaps }}
- mountPath: {{ $conf.mountPath }}
name: {{ $conf.name }}-volume
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.volumes }}
volumes:
{{- if .Values.volumes.configMaps }}
{{- range $conf := .Values.volumes.configMaps }}
- name: {{ $conf.name }}-volume
configMap:
name: {{ $conf.name }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,33 @@
{{- if .Values.autoscaling.enabled }}
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "base.fullname" . }}
labels:
{{- include "base.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "base.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,12 @@
{{- if .Values.base.secret -}}
{{- $top := . -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "base.fullname" . }}
labels:
{{- include "base.labels" . | nindent 4 }}
stringData:
{{- toYaml .Values.base.secret | nindent 2 -}}
{{- end -}}

43
charts/worker/values.yaml Normal file
View File

@ -0,0 +1,43 @@
# -- Base block to define the inputs for image, secret and configmap env
base:
# -- Image block with all image details
image:
# -- Default image pull policy
pullPolicy: "IfNotPresent"
# -- Additional command arguments which needs to be passed
command: []
# -- Default image repository
repository: nginx
# -- Default image tag
tag: latest
# -- Image pull secrets for private repository authentication
pullSecrets: ""
# secret:
# FOO_SECRET: BAR
# config:
# FOO_CONFIG: BAR
# -- Autoscaling properties with target CPU and Memory details
autoscaling:
enabled: false
targetCPUUtilizationPercentage: 65
targetMemoryUtilizationPercentage: 65
minReplicas: 10
maxReplicas: 50
# -- Kubernetes resource in terms of requests and limits
resources: {}
# -- Number of replicas for deployment, it will be overridden in case autoscaling is enabled
replicaCount: 2
# -- Kubernetes volumes definition which needs to be mounted
volumes:
# -- List of configmaps with mount path and data
# configMaps:
# - name: web
# mountPath: /test
# data:
# test.txt: |-
# Dummy text