diff --git a/charts/plane-ce/README.md b/charts/plane-ce/README.md index 1729a22..abc1403 100644 --- a/charts/plane-ce/README.md +++ b/charts/plane-ce/README.md @@ -1,5 +1,3 @@ -# Plane CE Helm Chart - ## Pre-requisite - A working Kubernetes cluster diff --git a/charts/plane-enterprise/README.md b/charts/plane-enterprise/README.md index 192164e..6f695c1 100644 --- a/charts/plane-enterprise/README.md +++ b/charts/plane-enterprise/README.md @@ -1,24 +1,16 @@ -# Plane One Helm Chart - ## Pre-requisite -- A Plane One license - > If you don’t have a license, get it at [prime.plane.so](https://prime.plane.so) - A working Kubernetes cluster - `kubectl` and `helm` on the client system that you will use to install our Helm charts -## Installing Plane One +## Installing Plane Enterprise 1. Open Terminal or any other command-line app that has access to Kubernetes tools on your local system. 2. Set the following environment variables. 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. - > 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. ```bash - LICENSE_KEY= - REG_USER_ID= - REG_PASSWORD=<******> PLANE_VERSION= DOMAIN_NAME= ``` @@ -40,15 +32,13 @@ Continue to be on the same Terminal window as you have so far, copy the code below, and paste it on your Terminal screen. ```bash - helm install one-app plane/plane-enterprise \ + helm install plane-app plane/plane-enterprise \ --create-namespace \ - --namespace plane-one \ - --set dockerRegistry.loginid=${REG_USER_ID} \ - --set dockerRegistry.password=${REG_PASSWORD} \ - --set license.licenseKey=${LICENSE_KEY} \ + --namespace plane \ --set license.licenseDomain=${DOMAIN_NAME} \ --set license.licenseServer=https://prime.plane.so \ --set planeVersion=${PLANE_VERSION} \ + --set ingress.enabled=true \ --set ingress.ingressClass=nginx \ --set env.storageClass=longhorn \ --timeout 10m \ @@ -56,8 +46,8 @@ --wait-for-jobs ``` - > This is the minimum required to set up Plane One. You can change the default namespace from `plane-one`, the default appname - from `one-app`, the default storage class from `env.storageClass`, and the default ingress class from `ingress.ingressClass` to + > This is the minimum required to set up Plane Enterprise. You can change the default namespace from `plane`, the default appname + from `plane-app`, the default storage class from `longhorn`, and the default ingress class from `nginx` to whatever you would like to.

You can also pass other settings referring to `Configuration Settings` section. @@ -72,11 +62,9 @@ Make sure you set the minimum required values as below. - `planeVersion: ` - - `dockerRegistry.loginid: ` - - `dockerRegistry.password: ` - - `license.licenseKey: ` - `license.licenseDomain: ` - `license.licenseServer: https://prime.plane.so` + - `ingress.enabled: ` - `ingress.ingressClass: ` - `env.storageClass: ` @@ -85,9 +73,9 @@ 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. ```bash - helm install one-app plane/plane-enterprise \ + helm install plane-app plane/plane-enterprise \ --create-namespace \ - --namespace plane-one \ + --namespace plane \ -f values.yaml \ --timeout 10m \ --wait \ @@ -100,7 +88,7 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| -| dockerRegistry.enabled | true | Yes | Plane uses a private Docker registry which needs authenticated login. This must be set to `true` to install Plane One. | +| dockerRegistry.enabled | false | | Plane uses a private Docker registry which needs authenticated login. This must be set to `true` to install Plane Enterprise. | | dockerRegistry.registry | registry.plane.tools| Yes | The host that will serve the required Docker images; Don't change this. | | dockerRegistry.loginid | | Yes | Sets the `loginid` for the Docker registry. This is the same as the REG_USER_ID value on prime. plane.so | | 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 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| -| planeVersion | v1.1.1 | Yes | Specifies the version of Plane to be deployed. Copy this from prime.plane.so. | +| planeVersion | v1.2.1 | Yes | Specifies the version of Plane to be deployed. Copy this from prime.plane.so. | | license.licenseServer | | Yes | Sets the value of the `licenseServer` that gets you your license and validates it periodically. Don't change this. | -| license.licenseKey | | Yes | Holds your license key to Plane One. Copy this from prime.plane.so. | | 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. | ### Postgres @@ -187,6 +174,16 @@ | 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 | +### Monitor Deployment + +| Setting | Default | Required | Description | +|---|:---:|:---:|---| +| 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.| +| 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.| +| 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 | +| 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) | +| services.monitor.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service | + ### API Deployment | Setting | Default | Required | Description | @@ -243,10 +240,10 @@ If you are planning to use 3rd party ingress providers, here is the available ro | Host | Path | Service | |--- |:---:|---| -| plane.example.com | / | | -| plane.example.com | /spaces/* | | -| plane.example.com | /god-mode/* | | -| plane.example.com | /api/* | | -| plane.example.com | /auth/* | | -| plane.example.com | /uploads/* | | -| plane-minio.example.com | / | | +| plane.example.com | / | | +| plane.example.com | /spaces/* | | +| plane.example.com | /god-mode/* | | +| plane.example.com | /api/* | | +| plane.example.com | /auth/* | | +| plane.example.com | /uploads/* | | +| plane-minio.example.com | / | | diff --git a/charts/plane-enterprise/questions.yml b/charts/plane-enterprise/questions.yml index 9b73088..9c56158 100644 --- a/charts/plane-enterprise/questions.yml +++ b/charts/plane-enterprise/questions.yml @@ -3,7 +3,7 @@ questions: - variable: dockerRegistry.enabled label: Docker Registry Enabled type: boolean - default: true + default: false group: "Docker Registry" show_subquestion_if: true subquestions: @@ -20,7 +20,7 @@ questions: - variable: planeVersion label: Plane Version (Docker Image Tag) type: string - default: latest + default: v1.2.0 required: true group: "Docker Registry" subquestions: @@ -39,6 +39,11 @@ questions: type: string required: true default: "registry.plane.tools/plane/admin-enterprise" + - variable: services.monitor.image + label: Monitor Docker Image + type: string + required: true + default: "registry.plane.tools/plane/monitor-enterprise" - variable: services.api.image label: Backend Docker Image type: string @@ -56,9 +61,6 @@ questions: required: true group: "License Setup" subquestions: - - variable: license.licenseKey - label: "License Key" - type: string - variable: license.licenseDomain label: "License Domain" type: string @@ -121,6 +123,25 @@ questions: type: boolean default: false +- variable: services.monitor.memoryLimit + label: "Memory Limit" + type: string + default: 1000Mi + group: "Monitor Setup" + subquestions: + - variable: services.monitor.cpuLimit + label: "CPU Limit" + type: string + default: 500m + - variable: services.monitor.volumeSize + label: "Volume Size" + type: string + default: "100Mi" + - variable: services.monitor.assign_cluster_ip + label: "Assign Cluster IP" + type: boolean + default: false + - variable: services.api.replicas label: "Default Replica Count" type: int diff --git a/charts/plane-enterprise/templates/_helpers.tpl b/charts/plane-enterprise/templates/_helpers.tpl index e5de9ec..17abdd0 100644 --- a/charts/plane-enterprise/templates/_helpers.tpl +++ b/charts/plane-enterprise/templates/_helpers.tpl @@ -3,5 +3,5 @@ {{- end }} {{- define "hashString" -}} -{{- printf "%s%s%s%s%s" .Values.license.licenseServer .Values.license.licenseDomain .Values.license.licenseKey .Release.Namespace .Release.Name | sha256sum -}} -{{- end -}} \ No newline at end of file +{{- printf "%s%s%s%s" .Values.license.licenseServer .Values.license.licenseDomain .Release.Namespace .Release.Name | sha256sum -}} +{{- end -}} diff --git a/charts/plane-enterprise/templates/config-secrets/app-env.yaml b/charts/plane-enterprise/templates/config-secrets/app-env.yaml index ec1d4c3..67bc077 100644 --- a/charts/plane-enterprise/templates/config-secrets/app-env.yaml +++ b/charts/plane-enterprise/templates/config-secrets/app-env.yaml @@ -16,11 +16,11 @@ metadata: name: {{ .Release.Name }}-app-vars data: PRIME_HOST: {{ .Values.license.licenseServer | quote }} - LICENSE_KEY: {{ .Values.license.licenseKey | quote }} MACHINE_SIGNATURE: {{ include "hashString" . | quote }} - LICENSE_DOMAIN: {{ .Values.license.licenseDomain | quote }} - LICENSE_VERSION: {{ .Values.planeVersion | quote }} - DEPLOY_PLATFORM: "KUBERNETES" + 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/" SENTRY_DSN: {{ .Values.env.sentry_dsn | default "" | quote}} SENTRY_ENVIRONMENT: {{ .Values.env.sentry_environment | default "" | quote}} diff --git a/charts/plane-enterprise/templates/config-secrets/monitor.yaml b/charts/plane-enterprise/templates/config-secrets/monitor.yaml new file mode 100644 index 0000000..4ba3941 --- /dev/null +++ b/charts/plane-enterprise/templates/config-secrets/monitor.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-monitor-vars +data: + PRIME_HOST: {{ .Values.license.licenseServer | quote }} + MACHINE_SIGNATURE: {{ include "hashString" . | quote }} + APP_DOMAIN: {{ .Values.license.licenseDomain | quote }} + APP_VERSION: {{ .Values.planeVersion | quote }} + DEPLOY_PLATFORM: "KUBERNETES" + API_URL: "http://{{ .Release.Name }}-api.{{ .Release.Namespace }}.svc.cluster.local:8000/" diff --git a/charts/plane-enterprise/templates/workloads/api.deployment.yaml b/charts/plane-enterprise/templates/workloads/api.deployment.yaml index b8775c4..c30af4c 100644 --- a/charts/plane-enterprise/templates/workloads/api.deployment.yaml +++ b/charts/plane-enterprise/templates/workloads/api.deployment.yaml @@ -78,5 +78,4 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account - ---- \ No newline at end of file +--- diff --git a/charts/plane-enterprise/templates/workloads/monitor.stateful.yaml b/charts/plane-enterprise/templates/workloads/monitor.stateful.yaml new file mode 100644 index 0000000..09394b7 --- /dev/null +++ b/charts/plane-enterprise/templates/workloads/monitor.stateful.yaml @@ -0,0 +1,74 @@ +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-monitor + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor +spec: + {{- if not .Values.services.monitor.assign_cluster_ip }} + clusterIP: None + {{- end }} + ports: + - name: monitor-80 + port: 80 + protocol: TCP + targetPort: 80 + selector: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor +--- + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-monitor-wl +spec: + selector: + matchLabels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor + serviceName: {{ .Release.Name }}-monitor + template: + metadata: + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-monitor + spec: + containers: + - image: {{ .Values.services.monitor.image | default "registry.plane.tools/plane/monitor-enterprise" }}:{{ .Values.planeVersion }} + imagePullPolicy: Always + name: {{ .Release.Name }}-monitor + stdin: true + tty: true + resources: + requests: + memory: "50Mi" + cpu: "50m" + limits: + memory: {{ .Values.services.monitor.memoryLimit | default "1000Mi" | quote }} + cpu: {{ .Values.services.monitor.cpuLimit | default "500m" | quote}} + envFrom: + - configMapRef: + name: {{ .Release.Name }}-monitor-vars + optional: false + volumeMounts: + - mountPath: /app + name: pvc-{{ .Release.Name }}-monitor-vol + subPath: '' + serviceAccount: {{ .Release.Name }}-srv-account + serviceAccountName: {{ .Release.Name }}-srv-account + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + creationTimestamp: null + namespace: {{ .Release.Namespace }} + name: pvc-{{ .Release.Name }}-monitor-vol + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.services.monitor.volumeSize | default "100Mi" | quote }} + storageClassName: {{ .Values.env.storageClass | quote }} + volumeMode: Filesystem + \ No newline at end of file diff --git a/charts/plane-enterprise/values.yaml b/charts/plane-enterprise/values.yaml index 77526b0..4ee8d54 100644 --- a/charts/plane-enterprise/values.yaml +++ b/charts/plane-enterprise/values.yaml @@ -1,14 +1,13 @@ planeVersion: v1.2.1 dockerRegistry: - enabled: true + enabled: false registry: registry.plane.tools loginid: '' password: '' license: licenseServer: https://prime.plane.so - licenseKey: '' licenseDomain: 'plane.example.com' ingress: @@ -71,6 +70,13 @@ services: image: registry.plane.tools/plane/web-enterprise assign_cluster_ip: false + monitor: + memoryLimit: 1000Mi + cpuLimit: 500m + image: registry.plane.tools/plane/monitor-enterprise + volumeSize: 100Mi + assign_cluster_ip: false + space: replicas: 1 memoryLimit: 1000Mi