mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04: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
|
||||
version: 1.0.0
|
||||
appVersion: 2.x.x
|
||||
kubeVersion: "^1.8.0-0"
|
||||
version: 1.0.1
|
||||
apiVersion: v1
|
||||
description: Open Source kanban
|
||||
home: https://wekan.github.io/
|
||||
icon: https://wekan.github.io/wekan-logo.svg
|
||||
|
@ -10,4 +9,6 @@ sources:
|
|||
maintainers:
|
||||
- name: technotaff
|
||||
email: github@randall.cc
|
||||
- name: jiangytcn
|
||||
email: jiangyt.cn@gmail.com
|
||||
engine: gotpl
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
dependencies:
|
||||
- name: mongodb-replicaset
|
||||
version: 3.11.x
|
||||
repository: "https://kubernetes-charts.storage.googleapis.com/"
|
||||
condition: mongodb-replicaset.enabled
|
||||
- name: mongodb
|
||||
version: 10.0.x
|
||||
repository: "https://charts.bitnami.com/bitnami"
|
||||
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.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "wekan.mongodb-replicaset.fullname" -}}
|
||||
{{- $name := default "mongodb-replicaset" (index .Values "mongodb-replicaset" "nameOverride") -}}
|
||||
{{- define "wekan.mongodb.svcname" -}}
|
||||
{{- $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 "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the MongoDB URL. If MongoDB is installed as part of this chart, use k8s service discovery,
|
||||
else use user-provided URL.
|
||||
*/}}
|
||||
{{- define "mongodb-replicaset.url" -}}
|
||||
{{- if (index .Values "mongodb-replicaset" "enabled") -}}
|
||||
{{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}}
|
||||
{{- define "mongodb.url" -}}
|
||||
{{- if (index .Values "mongodb" "enabled") -}}
|
||||
{{- $count := (int (index .Values "mongodb" "replicaCount")) -}}
|
||||
{{- $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 -}}
|
||||
{{- index .Values "mongodb-replicaset" "url" -}}
|
||||
{{- index .Values "mongodb" "url" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -36,7 +36,7 @@ spec:
|
|||
- name: ROOT_URL
|
||||
value: {{ .Values.root_url | default "https://wekan.local" | quote }}
|
||||
- name: MONGO_URL
|
||||
value: "{{ template "mongodb-replicaset.url" . }}"
|
||||
value: "{{ template "mongodb.url" . }}"
|
||||
{{- range $key := .Values.env }}
|
||||
{{- if .value }}
|
||||
- name: {{ .name }}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{- $fullName := include "wekan.fullname" . -}}
|
||||
{{- $servicePort := .Values.service.port -}}
|
||||
{{- $ingressPath := .Values.ingress.path -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
|
@ -27,6 +27,9 @@ spec:
|
|||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: 8080
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
|
@ -35,6 +38,6 @@ spec:
|
|||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: 80
|
||||
servicePort: 8080
|
||||
{{- 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
|
||||
|
||||
## Specify wekan credentials
|
||||
##
|
||||
credentials:
|
||||
accessKey: access-key
|
||||
secretKey: secret-key
|
||||
|
||||
## Specify additional environmental variables for the Deployment
|
||||
##
|
||||
env:
|
||||
|
@ -36,7 +30,7 @@ env:
|
|||
|
||||
service:
|
||||
type: NodePort
|
||||
port: 80
|
||||
port: 8080
|
||||
annotations: {}
|
||||
# prometheus.io/scrape: "true"
|
||||
# prometheus.io/port: "8000"
|
||||
|
@ -104,13 +98,10 @@ autoscaling:
|
|||
# MongoDB:
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
mongodb-replicaset:
|
||||
mongodb:
|
||||
enabled: true
|
||||
replicas: 3
|
||||
architecture: replicaset
|
||||
replicaCount: 3
|
||||
replicaSetName: rs0
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
fsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
#image:
|
||||
# tag: 3.2.21
|
||||
auth:
|
||||
enabled: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue