mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
fix: update helm mongodb dependency
1. removed unused test pod 2. update chart dependency with bitnami repo 3. removed unused configurations in default values Signed-off-by: Jiang Yi Tao <jiangyt.cn@gmail.com>
This commit is contained in:
parent
5510c2a37d
commit
ff08aff131
8 changed files with 33 additions and 73 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
name: wekan
|
name: wekan
|
||||||
version: 1.0.0
|
version: 1.0.1
|
||||||
appVersion: 2.x.x
|
apiVersion: v1
|
||||||
kubeVersion: "^1.8.0-0"
|
|
||||||
description: Open Source kanban
|
description: Open Source kanban
|
||||||
home: https://wekan.github.io/
|
home: https://wekan.github.io/
|
||||||
icon: https://wekan.github.io/wekan-logo.svg
|
icon: https://wekan.github.io/wekan-logo.svg
|
||||||
|
|
@ -10,4 +9,6 @@ sources:
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: technotaff
|
- name: technotaff
|
||||||
email: github@randall.cc
|
email: github@randall.cc
|
||||||
|
- name: jiangytcn
|
||||||
|
email: jiangyt.cn@gmail.com
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: mongodb-replicaset
|
- name: mongodb
|
||||||
version: 3.11.x
|
version: 10.0.x
|
||||||
repository: "https://kubernetes-charts.storage.googleapis.com/"
|
repository: "https://charts.bitnami.com/bitnami"
|
||||||
condition: mongodb-replicaset.enabled
|
condition: mongodb.enabled
|
||||||
|
|
|
||||||
|
|
@ -62,21 +62,27 @@ Create the name of the service account to use for the api component
|
||||||
Create a default fully qualified mongodb-replicaset name.
|
Create a default fully qualified mongodb-replicaset name.
|
||||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "wekan.mongodb-replicaset.fullname" -}}
|
{{- define "wekan.mongodb.svcname" -}}
|
||||||
{{- $name := default "mongodb-replicaset" (index .Values "mongodb-replicaset" "nameOverride") -}}
|
{{- $name := default "mongodb" (index .Values "mongodb" "nameOverride") -}}
|
||||||
|
{{- if eq .Values.mongodb.architecture "replicaset" }}
|
||||||
|
{{- printf "%s-%s-headless" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create the MongoDB URL. If MongoDB is installed as part of this chart, use k8s service discovery,
|
Create the MongoDB URL. If MongoDB is installed as part of this chart, use k8s service discovery,
|
||||||
else use user-provided URL.
|
else use user-provided URL.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "mongodb-replicaset.url" -}}
|
{{- define "mongodb.url" -}}
|
||||||
{{- if (index .Values "mongodb-replicaset" "enabled") -}}
|
{{- if (index .Values "mongodb" "enabled") -}}
|
||||||
{{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}}
|
{{- $count := (int (index .Values "mongodb" "replicaCount")) -}}
|
||||||
{{- $release := .Release.Name -}}
|
{{- $release := .Release.Name -}}
|
||||||
mongodb://{{ $release }}-mongodb-replicaset:27017/admin?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }}
|
{{- $replicaSetName := (index .Values "mongodb" "replicaSetName") -}}
|
||||||
|
{{- $mongodbSvcName := include "wekan.mongodb.svcname" . -}}
|
||||||
|
mongodb://{{- range $v := until $count }}{{ $release }}-mongodb-{{ $v }}.{{ $mongodbSvcName }}:27017{{ if ne $v (sub $count 1) }},{{- end -}}{{- end -}}?replicaSet={{ $replicaSetName }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- index .Values "mongodb-replicaset" "url" -}}
|
{{- index .Values "mongodb" "url" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ spec:
|
||||||
- name: ROOT_URL
|
- name: ROOT_URL
|
||||||
value: {{ .Values.root_url | default "https://wekan.local" | quote }}
|
value: {{ .Values.root_url | default "https://wekan.local" | quote }}
|
||||||
- name: MONGO_URL
|
- name: MONGO_URL
|
||||||
value: "{{ template "mongodb-replicaset.url" . }}"
|
value: "{{ template "mongodb.url" . }}"
|
||||||
{{- range $key := .Values.env }}
|
{{- range $key := .Values.env }}
|
||||||
{{- if .value }}
|
{{- if .value }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
{{- $fullName := include "wekan.fullname" . -}}
|
{{- $fullName := include "wekan.fullname" . -}}
|
||||||
{{- $servicePort := .Values.service.port -}}
|
{{- $servicePort := .Values.service.port -}}
|
||||||
{{- $ingressPath := .Values.ingress.path -}}
|
{{- $ingressPath := .Values.ingress.path -}}
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}
|
name: {{ $fullName }}
|
||||||
|
|
@ -27,6 +27,9 @@ spec:
|
||||||
secretName: {{ .secretName }}
|
secretName: {{ .secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
servicePort: 8080
|
||||||
rules:
|
rules:
|
||||||
{{- range .Values.ingress.hosts }}
|
{{- range .Values.ingress.hosts }}
|
||||||
- host: {{ . }}
|
- host: {{ . }}
|
||||||
|
|
@ -35,6 +38,6 @@ spec:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
serviceName: {{ $fullName }}
|
serviceName: {{ $fullName }}
|
||||||
servicePort: 80
|
servicePort: 8080
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ template "wekan.fullname" . }}
|
|
||||||
labels:
|
|
||||||
app: {{ template "wekan.name" . }}
|
|
||||||
chart: {{ template "wekan.chart" . }}
|
|
||||||
component: wekan
|
|
||||||
heritage: {{ .Release.Service }}
|
|
||||||
release: {{ .Release.Name }}
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
accessKey: {{ .Values.credentials.accessKey | b64enc }}
|
|
||||||
secretKey: {{ .Values.credentials.secretKey | b64enc }}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: {{ template "wekan.fullname" . }}-test
|
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": test-success
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: {{ template "wekan.fullname" . }}-test
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
image: "docker.io/mesosphere/aws-cli:1.14.5"
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- aws s3 --endpoint-url=http://{{ include "wekan.fullname" . }} --region=us-east-1 ls
|
|
||||||
env:
|
|
||||||
- name: AWS_ACCESS_KEY_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ template "wekan.fullname" . }}
|
|
||||||
key: accessKey
|
|
||||||
- name: AWS_SECRET_ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ template "wekan.fullname" . }}
|
|
||||||
key: secretKey
|
|
||||||
restartPolicy: Never
|
|
||||||
|
|
@ -22,12 +22,6 @@ image:
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
## Specify wekan credentials
|
|
||||||
##
|
|
||||||
credentials:
|
|
||||||
accessKey: access-key
|
|
||||||
secretKey: secret-key
|
|
||||||
|
|
||||||
## Specify additional environmental variables for the Deployment
|
## Specify additional environmental variables for the Deployment
|
||||||
##
|
##
|
||||||
env:
|
env:
|
||||||
|
|
@ -36,7 +30,7 @@ env:
|
||||||
|
|
||||||
service:
|
service:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
port: 80
|
port: 8080
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# prometheus.io/scrape: "true"
|
# prometheus.io/scrape: "true"
|
||||||
# prometheus.io/port: "8000"
|
# prometheus.io/port: "8000"
|
||||||
|
|
@ -104,13 +98,10 @@ autoscaling:
|
||||||
# MongoDB:
|
# MongoDB:
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
mongodb-replicaset:
|
mongodb:
|
||||||
enabled: true
|
enabled: true
|
||||||
replicas: 3
|
architecture: replicaset
|
||||||
|
replicaCount: 3
|
||||||
replicaSetName: rs0
|
replicaSetName: rs0
|
||||||
securityContext:
|
auth:
|
||||||
runAsUser: 1000
|
enabled: false
|
||||||
fsGroup: 1000
|
|
||||||
runAsNonRoot: true
|
|
||||||
#image:
|
|
||||||
# tag: 3.2.21
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue