Skip to content

Commit

Permalink
fix(console): volume configuration (#16)
Browse files Browse the repository at this point in the history
* fix(console): volume configuration

* chore(chart): Update README.md with readme-generator-for-helm

Signed-off-by: ConduktorBot <[email protected]>

* chore(chart): Update README.md with readme-generator-for-helm

Signed-off-by: ConduktorBot <[email protected]>

* chore(console): add snippet for data volumes

---------

Signed-off-by: ConduktorBot <[email protected]>
Co-authored-by: ConduktorBot <[email protected]>
  • Loading branch information
Alexandre Burgoni and ConduktorBot authored Sep 8, 2023
1 parent 12cf563 commit df6d09b
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/console/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: console
appVersion: 1.17.3
version: 1.2.1
version: 1.2.2
description: Helm chart to deploy Conduktor Platform on Kubernetes
icon: https://www.conduktor.io/svgs/logo/symbol.svg
home: https://www.conduktor.io
Expand Down
37 changes: 35 additions & 2 deletions charts/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ Refer to our [documentation](https://docs.conduktor.io/platform/configuration/en
| `platform.schedulerName` | Name of the k8s scheduler (other than default) for Conduktor Platform pods | `""` |
| `platform.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
| `platform.lifecycleHooks` | for the Conduktor Platform container(s) to automate configuration before or after startup | `{}` |
| `platform.dataVolume` | Persistent Volume to store Conduktor Platform data | |
| `platform.tmpVolume` | Persistent Volume to store Conduktor Platform tmp data | |
| `platform.extraEnvVars` | Array with extra environment variables to add to Conduktor Platform nodes | `[]` |
| `platform.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Conduktor Platform nodes | `""` |
| `platform.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Conduktor Platform nodes | `""` |
| `platform.extraVolumes` | Optionally specify extra list of additional volumes for the Conduktor Platform pod(s) | `[]` |
| `platform.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Conduktor Platform container(s) | `[]` |
| `platform.extraVolumes` | Optionally specify extra list of additional volumes for the Conduktor Platform pod(s). | `[]` |
| `platform.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Conduktor Platform container(s). | `[]` |
| `platform.sidecars` | Add additional sidecar containers to the Conduktor Platform pod(s) | `[]` |
| `platform.initContainers` | Add additional init containers to the Conduktor Platform pod(s) | `[]` |

Expand Down Expand Up @@ -207,6 +209,7 @@ console, we recommend you to look at our
- [Install with a Self-Signed Certificate](#install-with-self-signed-tls-certificate)
- [Install with a custom service account](#install-with-a-custom-service-account)
- [Install with a AWS EKS IAM Role](#install-with-a-aws-eks-iam-role)
- [Store console data into a PersistentVolume](#store-platform-data-into-a-persistent-volume)

- [Provide credentials as a Kubernetes Secret](#provide-credentials-configuration-as-a-kubernetes-secret)
- [Provide the license as a Kubernetes Secret](#provide-the-license-as-a-kubernetes-secret)
Expand Down Expand Up @@ -353,6 +356,36 @@ data:
CDK_DATABASE_USERNAME: <your_database_username>
```

### Store platform data into a Persistent Volume

```yaml
# values.yaml
config:
organization:
name: "<your_org_name>"
admin:
email: "<your_admin_email>"
password: "<your_admin_password>"
database:
host: '<postgres_host>'
port: 5432
name: '<postgres_database>'
username: '<postgres_username>'
password: '<postgres_password>'
platform:
dataVolume:
accessModes: [ "ReadWriteOnce" ]
size: 10Gi
storageClass: "standard"
tmpVolume:
accessModes: [ "ReadWriteOnce" ]
size: 10Gi
storageClass: "standard"
```

### Install with a PodAffinity

```yaml
Expand Down
8 changes: 8 additions & 0 deletions charts/console/templates/platform/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ spec:
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.platform.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /var/conduktor
- name: tmp
mountPath: /tmp
- name: config
mountPath: /conduktor/config/
{{- if $tls_enabled }}
Expand All @@ -187,6 +191,10 @@ spec:
{{- include "common.tplvalues.render" ( dict "value" .Values.platform.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: data
{{- include "common.tplvalues.render" ( dict "value" .Values.platform.dataVolume "context" $) | nindent 10 }}
- name: tmp
{{- include "common.tplvalues.render" ( dict "value" .Values.platform.tmpVolume "context" $) | nindent 10 }}
- name: config
configMap:
name: {{ include "conduktor.platform.configMapName" . }}
Expand Down
29 changes: 12 additions & 17 deletions charts/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,14 @@ platform:
## @param platform.lifecycleHooks for the Conduktor Platform container(s) to automate configuration before or after startup
##
lifecycleHooks: {}
## @extra platform.dataVolume Persistent Volume to store Conduktor Platform data
## @skip platform.dataVolume.emptyDir
dataVolume:
emptyDir: {}
## @extra platform.tmpVolume Persistent Volume to store Conduktor Platform tmp data
## @skip platform.tmpVolume.emptyDir
tmpVolume:
emptyDir: {}
## @param platform.extraEnvVars Array with extra environment variables to add to Conduktor Platform nodes
## ref: https://docs.conduktor.io/platform/configuration/env-variables/
## e.g:
Expand All @@ -356,23 +364,12 @@ platform:
## ref: https://docs.conduktor.io/platform/configuration/env-variables/
##
extraEnvVarsSecret: ""
## @param platform.extraVolumes Optionally specify extra list of additional volumes for the Conduktor Platform pod(s).
## By default, we create two EmptyDir volumes "data" and "tmp". If you want to make them PersistentVolume, please see
## the relevant snippet.
##
extraVolumes:
- name: data
emptyDir: {}
- name: tmp
emptyDir: {}
## @param platform.extraVolumes Optionally specify extra list of additional volumes for the Conduktor Platform pod(s).
##
extraVolumes: []
## @param platform.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Conduktor Platform container(s).
## By default, the volumes mounted are "data" and "tmp".
##
extraVolumeMounts:
- name: data
mountPath: /var/conduktor
- name: tmp
mountPath: /tmp
extraVolumeMounts: []
## @param platform.sidecars Add additional sidecar containers to the Conduktor Platform pod(s)
## e.g:
## sidecars:
Expand Down Expand Up @@ -573,8 +570,6 @@ serviceAccount:
automountServiceAccountToken: true

## @skip tests
## @skip tests.enabled Enable additional manifests for test purposes
## @skip tests.secrets additional secrets to inject
tests:
enabled: false
# secrets:
Expand Down

0 comments on commit df6d09b

Please sign in to comment.