Skip to content

Commit

Permalink
feat: add more values to helm chart; update readme and chart description
Browse files Browse the repository at this point in the history
  • Loading branch information
flohansen committed Jun 26, 2024
1 parent 5b47490 commit a7c821d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
4 changes: 2 additions & 2 deletions charts/dasher/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: dasher
description: A Helm chart for Kubernetes
description: The agile feature toggle and experimentation engine

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -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.1.2
version: 0.1.0

# 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
25 changes: 20 additions & 5 deletions charts/dasher/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# Dasher Helm Chart

## Install
## Setup
### Add Repository
```bash
helm repo add dasher https://flohansen.github.io/dasher
helm repo update
```

### Install
```bash
helm install <release-name> dasher/dasher
```

### Uninstall
```bash
helm uninstall <release-name>
```

## Configuration
| Parameter | Description | Default |
| --------- | ----------- | ------- |
| replicas | It is not recommended to set this value different to 1, because it is not possible to change the database type for now. Setting the value to n > 1 would result in n pods with each having its own SQLite database attached. Replication using SQLite is not supported yet. Anyways, this should not be an issue since the load on the application will not affect the server. | `1` |
| ingress.enabled | If an ingress should be deployed. Make sure to setup a proper ingress controller e.g. [nginx](https://docs.nginx.com/nginx-ingress-controller/). | `false` |
| ingress.ingressClassName | The ingress class name (like `nginx`) | `""` |
| storage.size | The size of the persistent volume. This is being used to save the application state (in SQLite). | `1G` |
| `replicas` | It is not recommended to set this value different to 1, because it is not possible to change the database type for now. Setting the value to n > 1 would result in n pods with each having its own SQLite database attached. Replication using SQLite is not supported yet. Anyways, this should not be an issue since the load on the application will not affect the server. | `1` |
| `service.enabled` | If a service should be deployed. | `true` |
| `service.type` | The [type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) of the service. | `ClusterIP` |
| `service.clusterIP` | The internal cluster IP. Only used when service.type is `ClusterIP` | `""` |
| `service.loadBalancerIP` | The IP address of the load balancer. Only used when `service.type` is `LoadBalancer`. | `""` |
| `ingress.enabled` | If an ingress should be deployed. Make sure to setup a proper ingress controller e.g. [nginx](https://docs.nginx.com/nginx-ingress-controller/). | `false` |
| `ingress.ingressClassName` | The ingress class name (like `nginx`) | `""` |
| `storage.size` | The size of the persistent volume. This is being used to save the application state (in SQLite). | `1G` |
4 changes: 2 additions & 2 deletions charts/dasher/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: Ingress
metadata:
name: {{ include "dasher.fullname" . }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- with .Values.ingress.ingressClassName }}
ingressClassName: {{ . }}
{{- end }}
rules:
- http:
Expand Down
15 changes: 15 additions & 0 deletions charts/dasher/templates/server.service.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{{- if .Values.service.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "dasher.fullname" . }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- with .Values.service.clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: LoadBalancer
{{- with .Values.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- else }}
type: {{ .Values.service.type }}
{{- end }}
selector:
app: dasher-server
ports:
Expand All @@ -12,3 +26,4 @@ spec:
- name: grpc
port: 50051
protocol: TCP
{{- end -}}
10 changes: 10 additions & 0 deletions charts/dasher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
# issue since the load on the application will not affect the server.
replicas: 1

# Use this to deploy a service and expose the server.
service:
enabled: true
type: ClusterIP
# If type is ClusterIP
clusterIP: ""
# If type is LoadBalancer
loadBalancerIP: ""
loadBalancerClass: ""

# Use this to enable ingress deployment. Be sure to setup the ingress controller
# properly.
ingress:
Expand Down

0 comments on commit a7c821d

Please sign in to comment.