Skip to content

Commit e4b5f79

Browse files
henit-chobisamguptahubakshat5302
authored
feat: modified environment variables for monitor service (#36)
* feat: added monitor container in plane-enterprise * chore: bumped version of plane ee helm --------- Co-authored-by: Manish Gupta <[email protected]> Co-authored-by: Akshat Jain <[email protected]>
1 parent 1cacda9 commit e4b5f79

File tree

9 files changed

+155
-48
lines changed

9 files changed

+155
-48
lines changed

charts/plane-ce/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Plane CE Helm Chart
2-
31
## Pre-requisite
42

53
- A working Kubernetes cluster

charts/plane-enterprise/README.md

+28-31
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
# Plane One Helm Chart
2-
31
## Pre-requisite
42

5-
- A Plane One license
6-
> If you don’t have a license, get it at [prime.plane.so](https://prime.plane.so)
73
- A working Kubernetes cluster
84
- `kubectl` and `helm` on the client system that you will use to install our Helm charts
95

10-
## Installing Plane One
6+
## Installing Plane Enterprise
117

128
1. Open Terminal or any other command-line app that has access to Kubernetes tools on your local system.
139
2. Set the following environment variables.
1410

1511
Copy the format of constants below, paste it on Terminal to start setting environment variables, set values for each variable, and hit ENTER or RETURN.
16-
> You will get the values for the variables from [prime.plane.so](https://prime.plane.so) under the Kuberntes tab of your license's details page. When installing Plane One for the first time, remember to specify a domain name.
1712

1813
```bash
19-
LICENSE_KEY=<your_license_key>
20-
REG_USER_ID=<license-XXXXX+XXXX-XXXX-XXX-XXXXX>
21-
REG_PASSWORD=<******>
2214
PLANE_VERSION=<v1.xx.x>
2315
DOMAIN_NAME=<subdomain.domain.tld or domain.tld>
2416
```
@@ -40,24 +32,22 @@
4032
Continue to be on the same Terminal window as you have so far, copy the code below, and paste it on your Terminal screen.
4133

4234
```bash
43-
helm install one-app plane/plane-enterprise \
35+
helm install plane-app plane/plane-enterprise \
4436
--create-namespace \
45-
--namespace plane-one \
46-
--set dockerRegistry.loginid=${REG_USER_ID} \
47-
--set dockerRegistry.password=${REG_PASSWORD} \
48-
--set license.licenseKey=${LICENSE_KEY} \
37+
--namespace plane \
4938
--set license.licenseDomain=${DOMAIN_NAME} \
5039
--set license.licenseServer=https://prime.plane.so \
5140
--set planeVersion=${PLANE_VERSION} \
41+
--set ingress.enabled=true \
5242
--set ingress.ingressClass=nginx \
5343
--set env.storageClass=longhorn \
5444
--timeout 10m \
5545
--wait \
5646
--wait-for-jobs
5747
```
5848

59-
> This is the minimum required to set up Plane One. You can change the default namespace from `plane-one`, the default appname
60-
from `one-app`, the default storage class from `env.storageClass`, and the default ingress class from `ingress.ingressClass` to
49+
> This is the minimum required to set up Plane Enterprise. You can change the default namespace from `plane`, the default appname
50+
from `plane-app`, the default storage class from `longhorn`, and the default ingress class from `nginx` to
6151
whatever you would like to.<br> <br>
6252
You can also pass other settings referring to `Configuration Settings` section.
6353

@@ -72,11 +62,9 @@
7262

7363
Make sure you set the minimum required values as below.
7464
- `planeVersion: <v1.xx.x>`
75-
- `dockerRegistry.loginid: <REG_USER_ID as on prime.plane.so>`
76-
- `dockerRegistry.password: <REG_PASSWORD as on prime.plane.so>`
77-
- `license.licenseKey: <LICENSE_KEY as on prime.plane.so>`
7865
- `license.licenseDomain: <The domain you have specified to host Plane>`
7966
- `license.licenseServer: https://prime.plane.so`
67+
- `ingress.enabled: <true | false>`
8068
- `ingress.ingressClass: <nginx or any other ingress class configured in your cluster>`
8169
- `env.storageClass: <longhorn or any other storage class configured in your cluster>`
8270

@@ -85,9 +73,9 @@
8573
After saving the `values.yaml` file, continue to be on the same Terminal window as on the previous steps, copy the code below, and paste it on your Terminal screen.
8674

8775
```bash
88-
helm install one-app plane/plane-enterprise \
76+
helm install plane-app plane/plane-enterprise \
8977
--create-namespace \
90-
--namespace plane-one \
78+
--namespace plane \
9179
-f values.yaml \
9280
--timeout 10m \
9381
--wait \
@@ -100,7 +88,7 @@
10088

10189
| Setting | Default | Required | Description |
10290
|---|:---:|:---:|---|
103-
| dockerRegistry.enabled | true | Yes | Plane uses a private Docker registry which needs authenticated login. This must be set to `true` to install Plane One. |
91+
| dockerRegistry.enabled | false | | Plane uses a private Docker registry which needs authenticated login. This must be set to `true` to install Plane Enterprise. |
10492
| dockerRegistry.registry | registry.plane.tools| Yes | The host that will serve the required Docker images; Don't change this. |
10593
| dockerRegistry.loginid | | Yes | Sets the `loginid` for the Docker registry. This is the same as the REG_USER_ID value on prime. plane.so |
10694
| dockerRegistry.password | | Yes | Sets the `password` for the Docker registry. This is the same as the REG_PASSWORD value on prime.plane.so|
@@ -109,9 +97,8 @@
10997
11098
| Setting | Default | Required | Description |
11199
|---|:---:|:---:|---|
112-
| planeVersion | v1.1.1 | Yes | Specifies the version of Plane to be deployed. Copy this from prime.plane.so. |
100+
| planeVersion | v1.2.1 | Yes | Specifies the version of Plane to be deployed. Copy this from prime.plane.so. |
113101
| license.licenseServer | <https://prime.plane.so> | Yes | Sets the value of the `licenseServer` that gets you your license and validates it periodically. Don't change this. |
114-
| license.licenseKey | | Yes | Holds your license key to Plane One. Copy this from prime.plane.so. |
115102
| license.licenseDomain | 'plane.example.com' | Yes | The fully-qualified domain name (FQDN) in the format `sudomain.domain.tld` or `domain.tld` that the license is bound to. It is also attached to your `ingress` host to access Plane. |
116103

117104
### Postgres
@@ -187,6 +174,16 @@
187174
| 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 |
188175
| services.admin.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |
189176

177+
### Monitor Deployment
178+
179+
| Setting | Default | Required | Description |
180+
|---|:---:|:---:|---|
181+
| services.monitor.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.|
182+
| services.monitor.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.|
183+
| services.monitor.image| registry.plane.tools/plane/monitor-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 |
184+
| services.monitor.volumeSize | 100Mi | | 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) |
185+
| services.monitor.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service |
186+
190187
### API Deployment
191188

192189
| Setting | Default | Required | Description |
@@ -243,10 +240,10 @@ If you are planning to use 3rd party ingress providers, here is the available ro
243240
244241
| Host | Path | Service |
245242
|--- |:---:|---|
246-
| plane.example.com | / | <http://plane-web.plane-one:3000> |
247-
| plane.example.com | /spaces/* | <http://plane-space.plane-one:3000> |
248-
| plane.example.com | /god-mode/* | <http://plane-admin.plane-one:3000> |
249-
| plane.example.com | /api/* | <http://plane-api.plane-one:8000> |
250-
| plane.example.com | /auth/* | <http://plane-api.plane-one:8000> |
251-
| plane.example.com | /uploads/* | <http://plane-minio.plane-one:9000> |
252-
| plane-minio.example.com | / | <http://plane-minio.plane-one:9090> |
243+
| plane.example.com | / | <http://plane-app-web.plane:3000> |
244+
| plane.example.com | /spaces/* | <http://plane-app-space.plane:3000> |
245+
| plane.example.com | /god-mode/* | <http://plane-app-admin.plane:3000> |
246+
| plane.example.com | /api/* | <http://plane-app-api.plane:8000> |
247+
| plane.example.com | /auth/* | <http://plane-app-api.plane:8000> |
248+
| plane.example.com | /uploads/* | <http://plane-app-minio.plane:9000> |
249+
| plane-minio.example.com | / | <http://plane-app-minio.plane:9090> |

charts/plane-enterprise/questions.yml

+26-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ questions:
33
- variable: dockerRegistry.enabled
44
label: Docker Registry Enabled
55
type: boolean
6-
default: true
6+
default: false
77
group: "Docker Registry"
88
show_subquestion_if: true
99
subquestions:
@@ -20,7 +20,7 @@ questions:
2020
- variable: planeVersion
2121
label: Plane Version (Docker Image Tag)
2222
type: string
23-
default: latest
23+
default: v1.2.0
2424
required: true
2525
group: "Docker Registry"
2626
subquestions:
@@ -39,6 +39,11 @@ questions:
3939
type: string
4040
required: true
4141
default: "registry.plane.tools/plane/admin-enterprise"
42+
- variable: services.monitor.image
43+
label: Monitor Docker Image
44+
type: string
45+
required: true
46+
default: "registry.plane.tools/plane/monitor-enterprise"
4247
- variable: services.api.image
4348
label: Backend Docker Image
4449
type: string
@@ -56,9 +61,6 @@ questions:
5661
required: true
5762
group: "License Setup"
5863
subquestions:
59-
- variable: license.licenseKey
60-
label: "License Key"
61-
type: string
6264
- variable: license.licenseDomain
6365
label: "License Domain"
6466
type: string
@@ -121,6 +123,25 @@ questions:
121123
type: boolean
122124
default: false
123125

126+
- variable: services.monitor.memoryLimit
127+
label: "Memory Limit"
128+
type: string
129+
default: 1000Mi
130+
group: "Monitor Setup"
131+
subquestions:
132+
- variable: services.monitor.cpuLimit
133+
label: "CPU Limit"
134+
type: string
135+
default: 500m
136+
- variable: services.monitor.volumeSize
137+
label: "Volume Size"
138+
type: string
139+
default: "100Mi"
140+
- variable: services.monitor.assign_cluster_ip
141+
label: "Assign Cluster IP"
142+
type: boolean
143+
default: false
144+
124145
- variable: services.api.replicas
125146
label: "Default Replica Count"
126147
type: int

charts/plane-enterprise/templates/_helpers.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
{{- end }}
44

55
{{- define "hashString" -}}
6-
{{- printf "%s%s%s%s%s" .Values.license.licenseServer .Values.license.licenseDomain .Values.license.licenseKey .Release.Namespace .Release.Name | sha256sum -}}
7-
{{- end -}}
6+
{{- printf "%s%s%s%s" .Values.license.licenseServer .Values.license.licenseDomain .Release.Namespace .Release.Name | sha256sum -}}
7+
{{- end -}}

charts/plane-enterprise/templates/config-secrets/app-env.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ metadata:
1616
name: {{ .Release.Name }}-app-vars
1717
data:
1818
PRIME_HOST: {{ .Values.license.licenseServer | quote }}
19-
LICENSE_KEY: {{ .Values.license.licenseKey | quote }}
2019
MACHINE_SIGNATURE: {{ include "hashString" . | quote }}
21-
LICENSE_DOMAIN: {{ .Values.license.licenseDomain | quote }}
22-
LICENSE_VERSION: {{ .Values.planeVersion | quote }}
23-
DEPLOY_PLATFORM: "KUBERNETES"
20+
APP_DOMAIN: {{ .Values.license.licenseDomain | quote }}
21+
APP_VERSION: {{ .Values.planeVersion | quote }}
22+
PAYMENT_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local/"
23+
FEATURE_FLAG_SERVER_BASE_URL: "http://{{ .Release.Name }}-monitor.{{ .Release.Namespace }}.svc.cluster.local/"
2424

2525
SENTRY_DSN: {{ .Values.env.sentry_dsn | default "" | quote}}
2626
SENTRY_ENVIRONMENT: {{ .Values.env.sentry_environment | default "" | quote}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
namespace: {{ .Release.Namespace }}
5+
name: {{ .Release.Name }}-monitor-vars
6+
data:
7+
PRIME_HOST: {{ .Values.license.licenseServer | quote }}
8+
MACHINE_SIGNATURE: {{ include "hashString" . | quote }}
9+
APP_DOMAIN: {{ .Values.license.licenseDomain | quote }}
10+
APP_VERSION: {{ .Values.planeVersion | quote }}
11+
DEPLOY_PLATFORM: "KUBERNETES"
12+
API_URL: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/"

charts/plane-enterprise/templates/workloads/api.deployment.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ spec:
7878

7979
serviceAccount: {{ .Release.Name }}-srv-account
8080
serviceAccountName: {{ .Release.Name }}-srv-account
81-
82-
---
81+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
namespace: {{ .Release.Namespace }}
5+
name: {{ .Release.Name }}-monitor
6+
labels:
7+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
8+
spec:
9+
{{- if not .Values.services.monitor.assign_cluster_ip }}
10+
clusterIP: None
11+
{{- end }}
12+
ports:
13+
- name: monitor-80
14+
port: 80
15+
protocol: TCP
16+
targetPort: 80
17+
selector:
18+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
19+
---
20+
21+
apiVersion: apps/v1
22+
kind: StatefulSet
23+
metadata:
24+
namespace: {{ .Release.Namespace }}
25+
name: {{ .Release.Name }}-monitor-wl
26+
spec:
27+
selector:
28+
matchLabels:
29+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
30+
serviceName: {{ .Release.Name }}-monitor
31+
template:
32+
metadata:
33+
labels:
34+
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor
35+
spec:
36+
containers:
37+
- image: {{ .Values.services.monitor.image | default "registry.plane.tools/plane/monitor-enterprise" }}:{{ .Values.planeVersion }}
38+
imagePullPolicy: Always
39+
name: {{ .Release.Name }}-monitor
40+
stdin: true
41+
tty: true
42+
resources:
43+
requests:
44+
memory: "50Mi"
45+
cpu: "50m"
46+
limits:
47+
memory: {{ .Values.services.monitor.memoryLimit | default "1000Mi" | quote }}
48+
cpu: {{ .Values.services.monitor.cpuLimit | default "500m" | quote}}
49+
envFrom:
50+
- configMapRef:
51+
name: {{ .Release.Name }}-monitor-vars
52+
optional: false
53+
volumeMounts:
54+
- mountPath: /app
55+
name: pvc-{{ .Release.Name }}-monitor-vol
56+
subPath: ''
57+
serviceAccount: {{ .Release.Name }}-srv-account
58+
serviceAccountName: {{ .Release.Name }}-srv-account
59+
volumeClaimTemplates:
60+
- apiVersion: v1
61+
kind: PersistentVolumeClaim
62+
metadata:
63+
creationTimestamp: null
64+
namespace: {{ .Release.Namespace }}
65+
name: pvc-{{ .Release.Name }}-monitor-vol
66+
spec:
67+
accessModes:
68+
- ReadWriteOnce
69+
resources:
70+
requests:
71+
storage: {{ .Values.services.monitor.volumeSize | default "100Mi" | quote }}
72+
storageClassName: {{ .Values.env.storageClass | quote }}
73+
volumeMode: Filesystem
74+

charts/plane-enterprise/values.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
planeVersion: v1.2.1
22

33
dockerRegistry:
4-
enabled: true
4+
enabled: false
55
registry: registry.plane.tools
66
loginid: ''
77
password: ''
88

99
license:
1010
licenseServer: https://prime.plane.so
11-
licenseKey: ''
1211
licenseDomain: 'plane.example.com'
1312

1413
ingress:
@@ -71,6 +70,13 @@ services:
7170
image: registry.plane.tools/plane/web-enterprise
7271
assign_cluster_ip: false
7372

73+
monitor:
74+
memoryLimit: 1000Mi
75+
cpuLimit: 500m
76+
image: registry.plane.tools/plane/monitor-enterprise
77+
volumeSize: 100Mi
78+
assign_cluster_ip: false
79+
7480
space:
7581
replicas: 1
7682
memoryLimit: 1000Mi

0 commit comments

Comments
 (0)