Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.2
version: 0.3.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
# Helmchart for generic python application

[![Packahe Helm Chart](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-package.yml/badge.svg)](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-package.yml)
[![Package Helm Chart](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-package.yml/badge.svg)](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-package.yml)

[![Push Helm Chart to Artifact Registry](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-push.yml/badge.svg)](https://github.com/zcsadmin/ml-pyhchart-helmchart/actions/workflows/helm-push.yml)


## Changelog

### 0.2.2
### 0.3.3

Set rolling update strategy, pod disruption budget and replicaCount to 1.

### 0.3.0

Set rolling update strategy, pod disruption budget and replicaCount to 3 for production environments.
For Sandbox and Development environments we must set replicaCount in values.yaml to 1 and pdb.enabled to false.

### 0.2.2

Set container name for deployment.

### 0.2.1

Enhance secrets support.

### 0.2.0

Add support for secret values.

### 0.1.0

Initial chart release.

## Artifact Repository

`oci://europe-west1-docker.pkg.dev/ai-accounting-405809/ml-helm-charts/pyhchart`

List docker images from cli:

```bash
gcloud artifacts docker images list europe-west1-docker.pkg.dev/ai-accounting-405809/ml-helm-charts
```
Expand All @@ -33,10 +46,11 @@ gcloud artifacts docker images list europe-west1-docker.pkg.dev/ai-accounting-40
You need to download the chart locally and `appVersion` value in `Chart.yaml` file.
Also, you need a `values-app.yaml` file with the specific values for your application.
Then, you can install the application with the following command:

```bash
helm install YOUR_APP -f values-app.yaml .
```

## Useful links

- [Artifact repository](https://console.cloud.google.com/artifacts/docker/ai-accounting-405809/europe-west1/ml-helm-charts/pyhchart?project=ai-accounting-405809)
- [Artifact repository](https://console.cloud.google.com/artifacts/docker/ai-accounting-405809/europe-west1/ml-helm-charts/pyhchart?project=ai-accounting-405809)
5 changes: 5 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: {{ .Values.rollingUpdate.maxUnavailable | default 1 }}
maxSurge: {{ .Values.rollingUpdate.maxSurge | default 1 }}
selector:
matchLabels:
{{- include "pyhchart.selectorLabels" . | nindent 6 }}
Expand Down
12 changes: 12 additions & 0 deletions templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "pyhchart.fullname" . }}-pdb
namespace: {{ include "common.names.namespace" . | quote }}
spec:
minAvailable: {{ .Values.pdb.minAvailable | default 2 }}
selector:
matchLabels:
{{- include "pyhchart.selectorLabels" . | nindent 6 }}
{{- end }}
12 changes: 12 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

replicaCount: 1

# https://www.baeldung.com/ops/deployment-rollout-kubernetes
# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%

# https://www.baeldung.com/ops/kubernetes-pod-disruption-budget
# https://kubernetes.io/docs/tasks/run-application/configure-pdb/
pdb:
enabled: true
minAvailable: 1

image:
repository:
pullPolicy: Always
Expand Down
Loading