OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
6
helm/Chart.lock
Normal file
6
helm/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 11.5.3
|
||||
digest: sha256:37ad7af9f28661e1130b6a3130a1ff33c29ebc33c5921f89a9ec38372c6fa11e
|
||||
generated: "2023-03-09T10:56:17.602290975+01:00"
|
||||
32
helm/Chart.yaml
Normal file
32
helm/Chart.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: v2
|
||||
name: leantime
|
||||
description: A Leantime Helm chart for Kubernetes. Project management more capable than Trello and no where near as overwhelming as Jira
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
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.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
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.0.0"
|
||||
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
version: 11.5.3
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
tags:
|
||||
- database
|
||||
99
helm/README.md
Normal file
99
helm/README.md
Normal file
@@ -0,0 +1,99 @@
|
||||
<div align="center">
|
||||
<img src="https://leantime.io/logos/leantime-logo-transparentBg-landscape-1500.png" alt="Leantime Logo" width="300"/><img src="https://cncf-branding.netlify.app/img/projects/helm/icon/color/helm-icon-color.svg" width=6% />
|
||||
|
||||
Leantime is a lean open source project management system for startups and innovators. <br />It's an alternative to ClickUp, Notion, and Asana.<br />[https://leantime.io](https://leantime.io)<br /></div>
|
||||
|
||||
# Introduction
|
||||
This Helm Chart bootstraps a production-ready instance of Leantime in a Kubernetes cluster. To know more about Leantime and/or contribute to the development of the software, please refer to the root project [Leantime on GitHub](https://github.com/Leantime/leantime).
|
||||
|
||||
# Prerequisites
|
||||
1. [x] Helm > v2 [installed](https://helm.sh/docs/using_helm/#installing-helm): `helm version`
|
||||
2. [x] Kubernetes > 1.16.x
|
||||
3. [x] Leantime Helm chart repository: `git clone https://github.com/Leantime/leantime`
|
||||
|
||||
# Deploying Leantime
|
||||
To deploy Leantime clone this repository:
|
||||
```bash
|
||||
git clone https://github.com/Leantime/leantime
|
||||
```
|
||||
Prepare chart dependencies:
|
||||
```bash
|
||||
helm dependency build ./leantime/helm
|
||||
```
|
||||
Create a `values.yaml` file to override the default configurations. For convenience you can copy the default file in the `leantime/helm` directory into your current directory and modify it according to your needs (see configuring section). Then, deploy the application:
|
||||
```bash
|
||||
helm install leantime -f values.yaml ./leantime/helm
|
||||
```
|
||||
|
||||
# Configuring
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| app.defaultTimezone | string | `"America/Los_Angeles"` | Sets the default Timezone |
|
||||
| app.email.enabled | bool | `false` | Set to true if you want to use SMTP. If set to false, the default php mail() function will be used |
|
||||
| app.email.return | string | `"leantime@cluster.local"` | Sets the email address to use for notifications and registrations |
|
||||
| app.email.smtp.autoTLS | bool | `true` | Set autoTLS? |
|
||||
| app.email.smtp.hosts | string | `""` | SMTP host |
|
||||
| app.email.smtp.password | string | `""` | SMTP password |
|
||||
| app.email.smtp.port | int | `587` | SMTP port |
|
||||
| app.email.smtp.secure | string | `"STARTLS"` | Sets the SMTP security protocol (usually one of: TLS, SSL, STARTTLS) |
|
||||
| app.email.smtp.username | string | `""` | SMTP username |
|
||||
| app.language | string | `"en-US"` | Sets application language |
|
||||
| app.ldap.DN | string | `""` | Location of users, example: CN=users,DC=example,DC=com |
|
||||
| app.ldap.baseDN | string | `""` | Base DN, example: DC=example,DC=com |
|
||||
| app.ldap.defaultRoleKey | string | `""` | Sets the default role for users when they are first created |
|
||||
| app.ldap.enabled | bool | `false` | Set to true if you want to use LDAP |
|
||||
| app.ldap.groupAssignment | string | `""` | Default role assignments upon first login |
|
||||
| app.ldap.host | string | `""` | FQDN |
|
||||
| app.ldap.keys | string | `""` | Default ldap keys in your directory |
|
||||
| app.ldap.port | int | `389` | Sets LDAP port |
|
||||
| app.ldap.type | string | `""` | Select the correct directory type. Currently Supported: OL - OpenLdap, AD - Active Directory |
|
||||
| app.ldap.userDomain | string | `""` | Domain after ldap, example @example.com |
|
||||
| app.s3.bucket | string | `""` | S3 bucket |
|
||||
| app.s3.enabled | bool | `false` | Set to true if you want to use S3 instead of local files |
|
||||
| app.s3.enpoint | string | `""` | S3 endpoint |
|
||||
| app.s3.folderName | string | `""` | Sets the foldername within S3 (can be empty) |
|
||||
| app.s3.key | string | `""` | S3 key |
|
||||
| app.s3.region | string | `""` | S3 region |
|
||||
| app.s3.secret | string | `""` | S3 secret |
|
||||
| app.s3.usePathStyleEndpoint | string | `"false"` | Sets wether or not use path-style endpoint |
|
||||
| app.session.expiration | int | `28800` | Session expiration |
|
||||
| app.session.password | string | `"changeme"` | Salting sessions. Replace with a strong password |
|
||||
| app.sitename | string | `"Leantime"` | Sets the name for the instance |
|
||||
| autoscaling.enabled | bool | `false` | |
|
||||
| autoscaling.maxReplicas | int | `100` | |
|
||||
| autoscaling.minReplicas | int | `1` | |
|
||||
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
|
||||
| fullnameOverride | string | `""` | Ovverrides the fullname of the kubernetes object names for this release |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | The pull policy of the Leantime OCI image applied to the deployment |
|
||||
| image.repository | string | `"leantime/leantime"` | OCI image repository of the Leantime application |
|
||||
| image.tag | string | `"latest"` | Overrides the image tag whose default is the chart appVersion |
|
||||
| imagePullSecrets | list | `[]` | The pull secrets to be used if you want to use a Leantime application image hosted in a private registry |
|
||||
| ingress.annotations | object | `{}` | |
|
||||
| ingress.className | string | `""` | |
|
||||
| ingress.enabled | bool | `false` | |
|
||||
| ingress.hosts[0].host | string | `"chart-example.local"` | |
|
||||
| ingress.hosts[0].paths[0].path | string | `"/"` | |
|
||||
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
|
||||
| ingress.tls | list | `[]` | |
|
||||
| mariadb.auth.database | string | `"leantime"` | Database name |
|
||||
| mariadb.auth.password | string | `"changeme"` | Database password |
|
||||
| mariadb.auth.rootPassword | string | `"changeme"` | Database root password |
|
||||
| mariadb.auth.username | string | `"leantime"` | Database username |
|
||||
| mariadb.enabled | bool | `true` | |
|
||||
| nameOverride | string | `""` | Overrides the name of the chart |
|
||||
| nodeSelector | object | `{}` | |
|
||||
| persistence.enabled | bool | `true` | Enables or disables the persistence |
|
||||
| persistence.size | string | `"5Gi"` | Sets the size of the PVs for Leantime's public and private userfiles |
|
||||
| persistence.storageClass | string | `"standard"` | Sets the storage class for Leantime's volumes |
|
||||
| podAnnotations | object | `{}` | |
|
||||
| podSecurityContext | object | `{}` | |
|
||||
| replicaCount | int | `1` | |
|
||||
| resources | object | `{}` | |
|
||||
| securityContext | object | `{}` | |
|
||||
| service.port | int | `80` | |
|
||||
| service.type | string | `"ClusterIP"` | |
|
||||
| serviceAccount.annotations | object | `{}` | |
|
||||
| serviceAccount.create | bool | `false` | |
|
||||
| serviceAccount.name | string | `""` | |
|
||||
| tolerations | list | `[]` | |
|
||||
22
helm/templates/NOTES.txt
Normal file
22
helm/templates/NOTES.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "leantime.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "leantime.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "leantime.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "leantime.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
62
helm/templates/_helpers.tpl
Normal file
62
helm/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "leantime.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "leantime.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "leantime.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "leantime.labels" -}}
|
||||
helm.sh/chart: {{ include "leantime.chart" . }}
|
||||
{{ include "leantime.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "leantime.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "leantime.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "leantime.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "leantime.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
152
helm/templates/deployment.yaml
Normal file
152
helm/templates/deployment.yaml
Normal file
@@ -0,0 +1,152 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "leantime.fullname" . }}
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "leantime.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "leantime.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "leantime.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: pubuserfiles
|
||||
mountPath: "/var/www/html/public/userfiles"
|
||||
- name: userfiles
|
||||
mountPath: "/var/www/html/userfiles"
|
||||
env:
|
||||
- name: LEAN_DB_HOST
|
||||
value: {{ .Release.Name }}-mariadb
|
||||
- name: LEAN_SESSION_SECURE
|
||||
value: "{{ .Values.app.leanSessionSecure }}"
|
||||
- name: LEAN_DB_USER
|
||||
value: {{ .Values.mariadb.auth.username }}
|
||||
- name: LEAN_DB_PASSWORD
|
||||
value: {{ .Values.mariadb.auth.password }}
|
||||
- name: LEAN_DB_DATABASE
|
||||
value: {{ .Values.mariadb.auth.database }}
|
||||
- name: LEAN_SITENAME
|
||||
value: {{ .Values.app.sitename }}
|
||||
- name: LEAN_LANGUAGE
|
||||
value: {{ .Values.app.language }}
|
||||
- name: LEAN_DEFAULT_TIMEZONE
|
||||
value: {{ .Values.app.defaultTimezone }}
|
||||
{{- if .Values.app.s3.enabled }}
|
||||
- name: LEAN_USE_S3
|
||||
value: {{ .Values.app.s3.enabled }}
|
||||
- name: LEAN_S3_END_POINT
|
||||
value: {{ .Values.app.s3.endpoint }}
|
||||
- name: LEAN_S3_KEY
|
||||
value: {{ .Values.app.s3.key }}
|
||||
- name: LEAN_S3_SECRET
|
||||
value: {{ .Values.app.s3.secret }}
|
||||
- name: LEAN_S3_BUCKET
|
||||
value: {{ .Values.app.s3.bucket }}
|
||||
- name: LEAN_S3_USE_PATH_STYLE_ENDPOINT
|
||||
value: {{ .Values.app.s3.usePathStyleEndpoint }}
|
||||
- name: LEAN_S3_REGION
|
||||
value: {{ .Values.app.s3.region }}
|
||||
- name: LEAN_S3_FOLDER_NAME
|
||||
value: {{ .Values.app.s3.folderName }}
|
||||
{{- end }}
|
||||
- name: LEAN_SESSION_PASSWORD
|
||||
value: {{ .Values.app.session.password }}
|
||||
- name: LEAN_SESSION_EXPIRATION
|
||||
value: {{ .Values.app.session.expiration | quote }}
|
||||
{{- if .Values.app.email.enabled }}
|
||||
- name: LEAN_EMAIL_USE_SMTP
|
||||
value: {{ .Values.app.email.enabled | quote }}
|
||||
- name: LEAN_EMAIL_RETURN
|
||||
value: {{ .Values.app.email.return }}
|
||||
- name: LEAN_EMAIL_SMTP_HOSTS
|
||||
value: {{ .Values.app.email.smtp.hosts }}
|
||||
- name: LEAN_EMAIL_SMTP_USERNAME
|
||||
value: {{ .Values.app.email.smtp.username }}
|
||||
- name: LEAN_EMAIL_SMTP_PASSWORD
|
||||
value: {{ .Values.app.email.smtp.password }}
|
||||
- name: LEAN_EMAIL_SMTP_AUTO_TLS
|
||||
value: {{ .Values.app.email.smtp.autoTLS | quote }}
|
||||
- name: LEAN_EMAIL_SMTP_SECURE
|
||||
value: {{ .Values.app.email.smtp.secure }}
|
||||
- name: LEAN_EMAIL_SMTP_PORT
|
||||
value: {{ .Values.app.email.smtp.port | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.app.ldap.enabled }}
|
||||
- name: LEAN_LDAP_USE_LDAP
|
||||
value: {{ .Values.app.ldap.enabled | quote }}
|
||||
- name: LEAN_LDAP_LDAP_TYPE
|
||||
value: {{ .Values.app.ldap.type }}
|
||||
- name: LEAN_LDAP_HOST
|
||||
value: {{ .Values.app.ldap.host }}
|
||||
- name: LEAN_LDAP_PORT
|
||||
value: {{ .Values.app.ldap.port | quote }}
|
||||
- name: LEAN_LDAP_BASE_DN
|
||||
value: {{ .Values.app.ldap.baseDN }}
|
||||
- name: LEAN_LDAP_DN
|
||||
value: {{ .Values.app.ldap.DN }}
|
||||
- name: LEAN_LDAP_USER_DOMAIN
|
||||
value: {{ .Values.app.ldap.userDomain }}
|
||||
- name: LEAN_LDAP_KEYS
|
||||
value: {{ .Values.app.ldap.keys }}
|
||||
- name: LEAN_LDAP_GROUP_ASSIGNMENT
|
||||
value: {{ .Values.app.ldap.groupAssignment }}
|
||||
- name: LEAN_LDAP_DEFAULT_ROLE_KEY
|
||||
value: {{ .Values.app.ldap.defaultRoleKey }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: pubuserfiles
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "leantime.fullname" . }}-publicuserfiles
|
||||
- name: userfiles
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "leantime.fullname" . }}-userfiles
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
28
helm/templates/hpa.yaml
Normal file
28
helm/templates/hpa.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "leantime.fullname" . }}
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "leantime.fullname" . }}
|
||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
61
helm/templates/ingress.yaml
Normal file
61
helm/templates/ingress.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "leantime.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
35
helm/templates/pvc.yaml
Normal file
35
helm/templates/pvc.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.persistence.enabled }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "leantime.fullname" . }}-publicuserfiles
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size }}
|
||||
{{- with .Values.persistence.storageClass }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "leantime.fullname" . }}-userfiles
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size }}
|
||||
{{- with .Values.persistence.storageClass }}
|
||||
storageClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
15
helm/templates/service.yaml
Normal file
15
helm/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "leantime.fullname" . }}
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "leantime.selectorLabels" . | nindent 4 }}
|
||||
12
helm/templates/serviceaccount.yaml
Normal file
12
helm/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "leantime.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
15
helm/templates/tests/test-connection.yaml
Normal file
15
helm/templates/tests/test-connection.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "leantime.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "leantime.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "leantime.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
||||
185
helm/values.yaml
Normal file
185
helm/values.yaml
Normal file
@@ -0,0 +1,185 @@
|
||||
# Default values for leantime.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
# -- OCI image repository of the Leantime application
|
||||
repository: leantime/leantime
|
||||
# -- The pull policy of the Leantime OCI image applied to the deployment
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Overrides the image tag whose default is the chart appVersion
|
||||
tag: "latest"
|
||||
|
||||
# -- The pull secrets to be used if you want to use a Leantime application image hosted in a private registry
|
||||
imagePullSecrets: []
|
||||
# -- Overrides the name of the chart
|
||||
nameOverride: ""
|
||||
# -- Ovverrides the fullname of the kubernetes object names for this release
|
||||
fullnameOverride: ""
|
||||
|
||||
# PVCs settings for user data and public user data
|
||||
persistence:
|
||||
# -- Enables or disables the persistence
|
||||
enabled: true
|
||||
# -- Sets the size of the PVs for Leantime's public and private userfiles
|
||||
size: 5Gi
|
||||
# -- Sets the storage class for Leantime's volumes
|
||||
# -- empty will use system default
|
||||
storageClass: ""
|
||||
|
||||
# Application-specific environment variables
|
||||
app:
|
||||
# -- Sets the name for the instance
|
||||
sitename: "Leantime"
|
||||
# -- Sets the cookie flag to only allow HTTPS transfer.
|
||||
leanSessionSecure: "true"
|
||||
# -- Sets application language
|
||||
language: "en-US"
|
||||
# -- Sets the default Timezone
|
||||
defaultTimezone: "America/Los_Angeles"
|
||||
s3:
|
||||
# -- Set to true if you want to use S3 instead of local files
|
||||
enabled: false
|
||||
# -- S3 endpoint
|
||||
enpoint: ""
|
||||
# -- S3 key
|
||||
key: ""
|
||||
# -- S3 secret
|
||||
secret: ""
|
||||
# -- S3 bucket
|
||||
bucket: ""
|
||||
# -- Sets wether or not use path-style endpoint
|
||||
usePathStyleEndpoint: "false"
|
||||
# -- S3 region
|
||||
region: ""
|
||||
# -- Sets the foldername within S3 (can be empty)
|
||||
folderName: ""
|
||||
session:
|
||||
# -- Salting sessions. Replace with a strong password
|
||||
password: "changeme"
|
||||
# -- Session expiration in MINUTES (must match the LEAN_SESSION_EXPIRATION
|
||||
# -- semantics used elsewhere in Leantime: Laravel's `session.lifetime` is
|
||||
# -- expressed in minutes, NOT seconds). 480 = 8 hours of idle timeout.
|
||||
# -- See: app/Core/Configuration/laravelConfig.php (`session.lifetime`) and
|
||||
# -- config/sample.env (LEAN_SESSION_EXPIRATION).
|
||||
expiration: 480
|
||||
email:
|
||||
# -- Set to true if you want to use SMTP. If set to false, the default php mail() function will be used
|
||||
enabled: false
|
||||
# -- Sets the email address to use for notifications and registrations
|
||||
return: "leantime@cluster.local"
|
||||
smtp:
|
||||
# -- SMTP host
|
||||
hosts: ""
|
||||
# -- SMTP username
|
||||
username: ""
|
||||
# -- SMTP password
|
||||
password: ""
|
||||
# -- Set autoTLS?
|
||||
autoTLS: true
|
||||
# -- Sets the SMTP security protocol (usually one of: TLS, SSL, STARTTLS)
|
||||
secure: "STARTLS"
|
||||
# -- SMTP port
|
||||
port: 587
|
||||
ldap:
|
||||
# -- Set to true if you want to use LDAP
|
||||
enabled: false
|
||||
# -- Select the correct directory type. Currently Supported: OL - OpenLdap, AD - Active Directory
|
||||
type: ""
|
||||
# -- FQDN
|
||||
host: ""
|
||||
# -- Sets LDAP port
|
||||
port: 389
|
||||
# -- Base DN, example: DC=example,DC=com
|
||||
baseDN: ""
|
||||
# -- Location of users, example: CN=users,DC=example,DC=com
|
||||
DN: ""
|
||||
# -- Domain after ldap, example @example.com
|
||||
userDomain: ""
|
||||
# -- Default ldap keys in your directory
|
||||
keys: ""
|
||||
# -- Default role assignments upon first login
|
||||
groupAssignment: ""
|
||||
# -- Sets the default role for users when they are first created
|
||||
defaultRoleKey: ""
|
||||
|
||||
mariadb:
|
||||
enabled: true
|
||||
auth:
|
||||
# -- Database root password
|
||||
rootPassword: "changeme"
|
||||
# -- Database name
|
||||
database: "leantime"
|
||||
# -- Database username
|
||||
username: "leantime"
|
||||
# -- Database password
|
||||
password: "changeme"
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: false
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
Reference in New Issue
Block a user