Skip to content

Commit 8bc9b47

Browse files
authored
Plane CE live service (#47)
* Add live service for CE * fix redis env issue * changed live image tag to preview * Revert "changed live image tag to preview" This reverts commit 222978d. * added readme for live service
1 parent 70c7664 commit 8bc9b47

File tree

7 files changed

+163
-1
lines changed

7 files changed

+163
-1
lines changed

charts/plane-ce/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Meet Plane. An open-source software development tool to manage issu
55

66
type: application
77

8-
version: 1.0.24
8+
version: 1.0.25
99
appVersion: "0.22.0"
1010

1111
home: https://plane.so

charts/plane-ce/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,19 @@
146146
| admin.image| makeplane/plane-admin | | 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 |
147147
| admin.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |
148148

149+
### Live Service Deployment
150+
151+
| Setting | Default | Required | Description |
152+
|---|:---:|:---:|---|
153+
| 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 |
154+
| 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.|
155+
| 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.|
156+
| live.image| makeplane/plane-live | | 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 |
157+
| 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.|
158+
| 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.|
159+
| 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.|
160+
| live.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |
161+
149162
### API Deployment
150163

151164
| Setting | Default | Required | Description |

charts/plane-ce/questions.yml

+46
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,52 @@ questions:
120120
type: boolean
121121
default: true
122122

123+
- variable: live.image
124+
label: Live Docker Image
125+
type: string
126+
required: true
127+
default: "makeplane/plane-live"
128+
description: "Live Server Setup"
129+
group: "Live Setup"
130+
subquestions:
131+
- variable: live.pullPolicy
132+
label: "Image Pull Policy"
133+
type: enum
134+
options:
135+
- "Always"
136+
- "IfNotPresent"
137+
- "Never"
138+
default: "IfNotPresent"
139+
- variable: live.replicas
140+
label: "Default Replica Count"
141+
type: int
142+
default: 1
143+
- variable: live.memoryLimit
144+
label: "Memory Limit"
145+
type: string
146+
default: 1000Mi
147+
- variable: live.cpuLimit
148+
label: "CPU Limit"
149+
type: string
150+
default: 500m
151+
- variable: live.assign_cluster_ip
152+
label: "Assign Cluster IP"
153+
type: boolean
154+
default: false
155+
156+
- variable: env.live_sentry_dsn
157+
label: "Live Sentry DSN"
158+
type: string
159+
default: ""
160+
- variable: env.live_sentry_environment
161+
label: "Live Sentry Environment"
162+
type: string
163+
default: ""
164+
- variable: env.live_sentry_traces_sample_rate
165+
label: "Live Sentry Traces Sample Rate"
166+
type: string
167+
default: ""
168+
123169
- variable: api.image
124170
label: Backend Docker Image
125171
type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
namespace: {{ .Release.Namespace }}
5+
name: {{ .Release.Name }}-live-vars
6+
data:
7+
API_BASE_URL: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/"
8+
LIVE_SENTRY_DSN: {{ .Values.env.live_sentry_dsn | default "" | quote }}
9+
LIVE_SENTRY_ENVIRONMENT: {{ .Values.env.live_sentry_environment | default "" | quote }}
10+
LIVE_SENTRY_TRACES_SAMPLE_RATE: {{ .Values.env.live_sentry_traces_sample_rate | default "" | quote }}
11+
LIVE_BASE_PATH: "/live"
12+
13+
{{- if .Values.redis.local_setup }}
14+
REDIS_URL: "redis://{{ .Release.Name }}-redis.{{ .Release.Namespace }}.svc.cluster.local:6379/"
15+
{{- else }}
16+
REDIS_URL: {{ .Values.env.remote_redis_url | default "" | quote }}
17+
{{- end }}
18+
---

charts/plane-ce/templates/ingress.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ spec:
3838
name: {{ .Release.Name }}-api
3939
path: /auth
4040
pathType: Prefix
41+
- backend:
42+
service:
43+
port:
44+
number: 3000
45+
name: {{ .Release.Name }}-live
46+
path: /live/
47+
pathType: Prefix
4148
- backend:
4249
service:
4350
port:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
namespace: {{ .Release.Namespace }}
6+
name: {{ .Release.Name }}-live
7+
labels:
8+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
9+
spec:
10+
{{- if not .Values.live.assign_cluster_ip }}
11+
clusterIP: None
12+
{{- end }}
13+
ports:
14+
- name: live-3000
15+
port: 3000
16+
protocol: TCP
17+
targetPort: 3000
18+
selector:
19+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
20+
21+
---
22+
23+
apiVersion: apps/v1
24+
kind: Deployment
25+
metadata:
26+
namespace: {{ .Release.Namespace }}
27+
name: {{ .Release.Name }}-live-wl
28+
spec:
29+
replicas: {{ .Values.live.replicas | default 1}}
30+
selector:
31+
matchLabels:
32+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
33+
template:
34+
metadata:
35+
namespace: {{ .Release.Namespace }}
36+
labels:
37+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
38+
annotations:
39+
timestamp: {{ now | quote }}
40+
spec:
41+
containers:
42+
- name: {{ .Release.Name }}-live
43+
imagePullPolicy: Always
44+
image: {{ .Values.live.image | default "makeplane/plane-live" }}:{{ .Values.planeVersion }}
45+
stdin: true
46+
tty: true
47+
resources:
48+
requests:
49+
memory: "50Mi"
50+
cpu: "50m"
51+
limits:
52+
memory: {{ .Values.live.memoryLimit | default "1000Mi" | quote }}
53+
cpu: {{ .Values.live.cpuLimit | default "500m" | quote}}
54+
command:
55+
- node
56+
args:
57+
- live/dist/server.js
58+
envFrom:
59+
- configMapRef:
60+
name: {{ .Release.Name }}-live-vars
61+
optional: false
62+
serviceAccount: {{ .Release.Name }}-srv-account
63+
serviceAccountName: {{ .Release.Name }}-srv-account
64+
65+
---

charts/plane-ce/values.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ admin:
9191
pullPolicy: Always
9292
assign_cluster_ip: false
9393

94+
live:
95+
replicas: 1
96+
memoryLimit: 1000Mi
97+
cpuLimit: 500m
98+
image: makeplane/plane-live
99+
pullPolicy: Always
100+
assign_cluster_ip: false
101+
94102
api:
95103
replicas: 1
96104
memoryLimit: 1000Mi
@@ -141,3 +149,8 @@ env:
141149

142150
cors_allowed_origins: ""
143151
default_cluster_domain: cluster.local
152+
153+
live_sentry_dsn: ""
154+
live_sentry_environment: ""
155+
live_sentry_traces_sample_rate: ""
156+

0 commit comments

Comments
 (0)