Skip to content

Commit

Permalink
Merge pull request #41 from makeplane/develop
Browse files Browse the repository at this point in the history
Promoting Develop to Master
  • Loading branch information
mguptahub authored Sep 18, 2024
2 parents 8056e86 + e06c3a3 commit 3148f28
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 11 deletions.
4 changes: 2 additions & 2 deletions charts/plane-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Meet Plane. An Enterprise software development tool to manage issue

type: application

version: 1.0.10
appVersion: "1.2.1"
version: 1.0.11
appVersion: "1.3.0"

home: https://plane.so/
icon: https://plane.so/favicon/favicon-32x32.png
Expand Down
20 changes: 17 additions & 3 deletions charts/plane-enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
4. Set-up and customization
- Quick set-up

This is the fastest way to deploy Plane with default settings. This will create stateful deployments for Postgres, Redis, and Minio with a persistent volume claim using the `longhorn` storage class. This also sets up the ingress routes for you using `nginx` ingress class.
This is the fastest way to deploy Plane with default settings. This will create stateful deployments for Postgres, Redis/Valkey, and Minio with a persistent volume claim using the `longhorn` storage class. This also sets up the ingress routes for you using `nginx` ingress class.
> To customize this, see `Custom ingress routes` below.

Continue to be on the same Terminal window as you have so far, copy the code below, and paste it on your Terminal screen.
Expand Down Expand Up @@ -116,11 +116,11 @@
| services.postgres.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |
| env.pgdb_remote_url | | | Users can also decide to use the remote hosted database and link to Plane deployment. Ignoring all the above keys, set `services.postgres.local_setup` to `false` and set this key with remote connection url. |

### Redis Setup
### Redis/Valkey Setup

| Setting | Default | Required | Description |
|---|:---:|:---:|---|
| services.redis.local_setup | true | | Plane uses `redis` to cache the session authentication and other static data. This database can be hosted within kubernetes as part of helm chart deployment or can be used as hosted service remotely (e.g. aws rds or similar services). Set this to `true` when you choose to setup stateful deployment of `redis`. Mark it as `false` when using a remotely hosted database |
| services.redis.local_setup | true | | Plane uses `valkey` to cache the session authentication and other static data. This database can be hosted within kubernetes as part of helm chart deployment or can be used as hosted service remotely (e.g. aws rds or similar services). Set this to `true` when you choose to setup stateful deployment of `redis`. Mark it as `false` when using a remotely hosted database |
| services.redis.image | registry.plane.tools/plane/valkey:7.2.5-alpine | | Using this key, user must provide the docker image name to setup the stateful deployment of `redis`. (must be set when `services.redis.local_setup=true`)|
| services.redis.servicePort | 6379 | | This key sets the default port number to be used while setting up stateful deployment of `redis`. |
| services.redis.volumeSize | 500Mi | | While setting up the stateful deployment, while creating the persistant volume, volume allocation size need to be provided. This key helps you set the volume allocation size. Unit of this value must be in Mi (megabyte) or Gi (gigabyte) |
Expand Down Expand Up @@ -174,6 +174,19 @@
| services.admin.image| registry.plane.tools/plane/admin-enterprise | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment |
| services.admin.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |

### Live Service Deployment

| Setting | Default | Required | Description |
|---|:---:|:---:|---|
| services.live.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 |
| services.live.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.|
| services.live.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.|
| services.live.image| registry.plane.tools/plane/live-enterprise | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment |
| env.live_sentry_dsn | | | (optional) Live service deployment comes with some of the preconfigured integration. Sentry is one among those. Here user can set the Sentry provided DSN for this integration.|
| env.live_sentry_environment | | | (optional) Live service deployment comes with some of the preconfigured integration. Sentry is one among those. Here user can set the Sentry environment name (as configured in Sentry) for this integration.|
| env.live_sentry_traces_sample_rate | | | (optional) Live service deployment comes with some of the preconfigured integration. Sentry is one among those. Here user can set the Sentry trace sample rate (as configured in Sentry) for this integration.|
| services.live.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |

### Monitor Deployment

| Setting | Default | Required | Description |
Expand Down Expand Up @@ -243,6 +256,7 @@ If you are planning to use 3rd party ingress providers, here is the available ro
| plane.example.com | / | <http://plane-app-web.plane:3000> |
| plane.example.com | /spaces/* | <http://plane-app-space.plane:3000> |
| plane.example.com | /god-mode/* | <http://plane-app-admin.plane:3000> |
| plane.example.com | /live/* | <http://plane-app-live.plane:3000> |
| plane.example.com | /api/* | <http://plane-app-api.plane:8000> |
| plane.example.com | /auth/* | <http://plane-app-api.plane:8000> |
| plane.example.com | /uploads/* | <http://plane-app-minio.plane:9000> |
Expand Down
35 changes: 35 additions & 0 deletions charts/plane-enterprise/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ questions:
type: string
required: true
default: "registry.plane.tools/plane/admin-enterprise"
- variable: services.live.image
label: Live Docker Image
type: string
required: true
default: "registry.plane.tools/plane/live-enterprise"
- variable: services.monitor.image
label: Monitor Docker Image
type: string
Expand Down Expand Up @@ -123,6 +128,36 @@ questions:
type: boolean
default: false

- variable: services.live.replicas
label: "Default Replica Count"
type: int
default: 1
group: "Live Setup"
subquestions:
- variable: services.live.memoryLimit
label: "Memory Limit"
type: string
default: 1000Mi
- variable: services.live.cpuLimit
label: "CPU Limit"
type: string
default: 500m
- variable: services.live.assign_cluster_ip
label: "Assign Cluster IP"
type: boolean
default: false
- variable: env.live_sentry_dsn
label: "Sentry DSN"
type: string
default: ""
- variable: env.live_sentry_environment
label: "Sentry Environment"
type: string
default: "Development"
- variable: env.live_sentry_traces_sample_rate
label: "Sentry Traces Sample Rate"
type: string

- variable: services.monitor.memoryLimit
label: "Memory Limit"
type: string
Expand Down
4 changes: 2 additions & 2 deletions charts/plane-enterprise/templates/config-secrets/app-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ data:
MACHINE_SIGNATURE: {{ include "hashString" . | quote }}
APP_DOMAIN: {{ .Values.license.licenseDomain | quote }}
APP_VERSION: {{ .Values.planeVersion | quote }}
PAYMENT_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local/"
FEATURE_FLAG_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local/"
PAYMENT_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local:8080/"
FEATURE_FLAG_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local:8080/"

SENTRY_DSN: {{ .Values.env.sentry_dsn | default "" | quote}}
SENTRY_ENVIRONMENT: {{ .Values.env.sentry_environment | default "" | quote}}
Expand Down
18 changes: 18 additions & 0 deletions charts/plane-enterprise/templates/config-secrets/live-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-vars
data:
API_BASE_URL: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/"
LIVE_SENTRY_DSN: {{ .Values.env.live_sentry_dsn | default "" | quote }}
LIVE_SENTRY_ENVIRONMENT: {{ .Values.env.live_sentry_environment | default "" | quote }}
LIVE_SENTRY_TRACES_SAMPLE_RATE: {{ .Values.env.live_sentry_traces_sample_rate | default "" | quote }}
LIVE_BASE_PATH: "/live"

{{- if .Values.services.redis.local_setup }}
REDIS_URL: "redis://{{ .Release.Name }}-redis.{{ .Release.Namespace }}.svc.cluster.local:6379/"
{{- else }}
REDIS_URL: {{ .Values.env.remote_redis_url | default "" | quote }}
{{- end }}
---
7 changes: 7 additions & 0 deletions charts/plane-enterprise/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ spec:
name: {{ .Release.Name }}-api
path: /auth/
pathType: Prefix
- backend:
service:
port:
number: 3000
name: {{ .Release.Name }}-live
path: /live/
pathType: Prefix
{{- if and .Values.services.minio.local_setup .Values.env.docstore_bucket }}
- backend:
service:
Expand Down
65 changes: 65 additions & 0 deletions charts/plane-enterprise/templates/workloads/live.deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

apiVersion: v1
kind: Service
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live
labels:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
spec:
{{- if not .Values.services.live.assign_cluster_ip }}
clusterIP: None
{{- end }}
ports:
- name: live-3000
port: 3000
protocol: TCP
targetPort: 3000
selector:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live

---

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-live-wl
spec:
replicas: {{ .Values.services.live.replicas | default 1}}
selector:
matchLabels:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
template:
metadata:
namespace: {{ .Release.Namespace }}
labels:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
annotations:
timestamp: {{ now | quote }}
spec:
containers:
- name: {{ .Release.Name }}-live
imagePullPolicy: Always
image: {{ .Values.services.live.image | default "makeplane/live-enterprise" }}:{{ .Values.planeVersion }}
stdin: true
tty: true
resources:
requests:
memory: "50Mi"
cpu: "50m"
limits:
memory: {{ .Values.services.live.memoryLimit | default "1000Mi" | quote }}
cpu: {{ .Values.services.live.cpuLimit | default "500m" | quote}}
command:
- node
args:
- live/dist/server.js
envFrom:
- configMapRef:
name: {{ .Release.Name }}-live-vars
optional: false
serviceAccount: {{ .Release.Name }}-srv-account
serviceAccountName: {{ .Release.Name }}-srv-account

---
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ spec:
clusterIP: None
{{- end }}
ports:
- name: monitor-80
port: 80
- name: monitor-8080
port: 8080
protocol: TCP
targetPort: 80
targetPort: 8080
selector:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
---
Expand Down
14 changes: 13 additions & 1 deletion charts/plane-enterprise/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
planeVersion: v1.2.1
planeVersion: v1.3.0

dockerRegistry:
enabled: false
Expand Down Expand Up @@ -91,6 +91,13 @@ services:
image: registry.plane.tools/plane/admin-enterprise
assign_cluster_ip: false

live:
replicas: 1
memoryLimit: 1000Mi
cpuLimit: 500m
image: registry.plane.tools/plane/live-enterprise
assign_cluster_ip: false

api:
replicas: 1
memoryLimit: 1000Mi
Expand Down Expand Up @@ -138,3 +145,8 @@ env:

cors_allowed_origins: ''
instance_admin_email: ''

live_sentry_dsn: ""
live_sentry_environment: ""
live_sentry_traces_sample_rate: ""

0 comments on commit 3148f28

Please sign in to comment.