diff --git a/charts/microservice/Chart.yaml b/charts/microservice/Chart.yaml index cf6e966c..381b6b8d 100644 --- a/charts/microservice/Chart.yaml +++ b/charts/microservice/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: microservice -description: A Helm chart for a microservice in Kubernetes +description: Basic helm chart for deploying microservices on kubernetes with best practices type: application -version: 0.1.2 +version: 0.1.3 appVersion: "0.1.2" maintainers: - name: Ashwani Singh diff --git a/charts/microservice/README.md b/charts/microservice/README.md index 4bb7b668..d078e33f 100644 --- a/charts/microservice/README.md +++ b/charts/microservice/README.md @@ -1,39 +1,45 @@ -# Basic Helm Template for Deploying Microservice on K8s +# microservice -## Chart Structure -``` -microservice/ -├── Chart.yaml -├── values.yaml -├── charts/ -└── templates/ - ├── deployment.yaml - └── service.yaml -``` +Basic helm chart for deploying microservices on kubernetes with best practices -## Usage +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) -You can change the Docker image by modifying the values.yaml file. For example, to use a different image, update the `image.repository` and `image.tag` fields. +## Maintainers -The Helm chart is specifically for deploying a microservice with a Kubernetes service and deployment. You can further customize and expand this chart as needed for your application. +| Name | Email | Url | +| ---- | ------ | --- | +| Ashwani Singh | | | +| Shikha Tripathi | | | -## Installing the Chart on K8s +## Installing the Chart -```bash -helm install my-release microservice/ +To install the chart with the release name `my-release`: + +```console +$ helm install my-release microservice/ ``` -## TODO - -- [x] Application Health Probes -- [ ] Service -- [x] Horizontal Pod Autoscaler -- [ ] ConfigMap -- [ ] RBAC - - [ ] Service Account - - [ ] Role Binding - - [ ] Role -- [ ] Rolling Deployment Manipulation -- [ ] Environment Parmaters -- [ ] Container Port Mapping -- [ ] Application Secrets \ No newline at end of file +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| deployment | object | `{"affinity":{},"annotations":{},"environment":{},"image":{"name":"","pullPolicy":"IfNotPresent","tag":""},"livenessProbe":{"failureThreshold":5,"initialDelaySeconds":250,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"readinessProbe":{"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"tolerations":[],"volumeMounts":[],"volumes":{"configMaps":null,"enabled":true,"pvc":{"accessModes":["ReadWriteOnce"],"class":"default","enabled":false,"existing_claim":false,"mountPath":"/pv","name":"pvc","size":"1G"}}}` | Object that configures Deployment instance | +| deployment.image | object | `{"name":"","pullPolicy":"IfNotPresent","tag":""}` | Override default container image format | +| global | object | `{"environment":{},"fullnameOverride":"","imagePullSecrets":[],"nameOverride":"","namespace":"default","replicaCount":1}` | global variables | +| hpa.enabled | bool | `true` | | +| hpa.maxReplicas | int | `1` | | +| hpa.minReplicas | int | `1` | | +| hpa.targetCPU | int | `80` | | +| hpa.targetMemory | int | `80` | | +| kubeVersion | string | `""` | | +| service.annotations | object | `{}` | | +| service.specs[0].name | string | `"http"` | | +| service.specs[0].port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `false` | | +| serviceAccount.name | string | `""` | | + +> **_NOTE:_** Please find the sample helm values yaml in example repository. + diff --git a/charts/microservice/README.md.gotmpl b/charts/microservice/README.md.gotmpl new file mode 100644 index 00000000..b1d9f5ad --- /dev/null +++ b/charts/microservice/README.md.gotmpl @@ -0,0 +1,22 @@ +{{ template "chart.header" . }} +{{ template "chart.description" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.maintainersSection" . }} + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install my-release microservice/ +``` + +{{/* {{ template "chart.requirementsSection" . }} */}} + +{{ template "chart.valuesSection" . }} + +> **_NOTE:_** Please find the sample helm values yaml in example repository. + +{{/* {{ template "helm-docs.versionFooter" . }} */}} \ No newline at end of file