Skip to content

Commit

Permalink
[stable/hackmd] bump hackmd (codimd) (helm#8593)
Browse files Browse the repository at this point in the history
* codimd

Signed-off-by: Taehyun Kim <[email protected]>

* add variables in README

Signed-off-by: Taehyun Kim <[email protected]>

* remove NODE_ENV, add HMD_DB_URL

Signed-off-by: Taehyun Kim <[email protected]>

* bump chart version

Signed-off-by: Paul Czarkowski <[email protected]>
  • Loading branch information
kimxogus authored and k8s-ci-robot committed Feb 11, 2019
1 parent 7c5332d commit 5bad465
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable/hackmd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hackmd
apiVersion: v1
version: "1.0.1"
version: "1.1.0"
appVersion: "1.2.1-alpine"
description: Realtime collaborative markdown notes on all platforms.
icon: https://hackmd.io/favicon.png
Expand Down
2 changes: 2 additions & 0 deletions stable/hackmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Parameter | Description | Default
`persistence.size` | Persistent Volume size | `2Gi`
`persistence.storageClass` | Persistent Volume Storage Class | `unset`
`extraVars` | Hackmd's extra environment variables | `[]`
`podAnnotations` | Pod annotations | `{}`
`sessionSecret` | Hackmd's session secret | `""` (Randomly generated)
`postgresql.install` | Enable PostgreSQL as a chart dependency | `true`
`postgresql.imageTag` | The image tag for PostgreSQL | `9.6.2`
`postgresql.postgresUser` | PostgreSQL User to create | `hackmd`
Expand Down
15 changes: 13 additions & 2 deletions stable/hackmd/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ spec:
labels:
app: {{ template "hackmd.name" . }}
release: {{ .Release.Name }}
{{- with .Values.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
Expand All @@ -38,7 +42,7 @@ spec:
port: 3000
initialDelaySeconds: 30
env:
- name: HMD_DB_PASSWORD
- name: CMD_DB_PASSWORD
{{- if .Values.postgresql.install }}
valueFrom:
secretKeyRef:
Expand All @@ -47,8 +51,15 @@ spec:
{{- else }}
value: {{ .Values.postgresql.postgresPassword }}
{{- end }}
- name: CMD_SESSION_SECRET
valueFrom:
secretKeyRef:
name: {{ template "hackmd.fullname" . }}
key: sessionSecret
- name: CMD_DB_URL
value: postgres://{{ .Values.postgresql.postgresUser }}:$(CMD_DB_PASSWORD)@{{ template "hackmd.database.host" . }}:5432/{{ .Values.postgresql.postgresDatabase }}
- name: HMD_DB_URL
value: postgres://{{ .Values.postgresql.postgresUser }}:$(HMD_DB_PASSWORD)@{{ template "hackmd.database.host" . }}:5432/{{ .Values.postgresql.postgresDatabase }}
value: postgres://{{ .Values.postgresql.postgresUser }}:$(CMD_DB_PASSWORD)@{{ template "hackmd.database.host" . }}:5432/{{ .Values.postgresql.postgresDatabase }}
{{- if .Values.extraVars }}
{{ toYaml .Values.extraVars | indent 12 }}
{{- end }}
Expand Down
16 changes: 16 additions & 0 deletions stable/hackmd/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "hackmd.fullname" . }}
labels:
app: {{ template "hackmd.name" . }}
chart: {{ template "hackmd.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
type: Opaque
data:
{{- if .Values.sessionSecret }}
sessionSecret: {{ .Values.sessionSecret | b64enc | quote }}
{{- else }}
sessionSecret: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions stable/hackmd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ persistence:
##
# storageClass: "-"

podAnnotations: {}

extraVars: []

nodeSelector: {}
Expand Down

0 comments on commit 5bad465

Please sign in to comment.