diff --git a/.github/workflows/chart-releaser.yml b/.github/workflows/chart-releaser.yml index 52d7363..f4b92e3 100644 --- a/.github/workflows/chart-releaser.yml +++ b/.github/workflows/chart-releaser.yml @@ -2,6 +2,15 @@ name: Chart Release on: workflow_dispatch: + inputs: + plane-ce: + description: 'Build Plane CE' + type: boolean + default: false + plane-ee: + description: 'Build Plane EE' + type: boolean + default: false env: CR_CONFIGFILE: "${{ github.workspace }}/cr.yaml" @@ -14,9 +23,13 @@ env: TARGET_BRANCH: "${{ github.ref_name }}" CHART_NAME_CE: "plane-ce" CHART_NAME_ENTERPRISE: "plane-enterprise" + MARK_AS_LATEST: true + MARK_AS_PRERELASE: false + PAGES_INDEX_PATH: "" jobs: setup: + if: ${{ github.event.inputs.plane-ce == 'true' || github.event.inputs.plane-ee == 'true' }} runs-on: ubuntu-latest permissions: contents: write @@ -60,20 +73,41 @@ jobs: chmod 400 ${{env.GNUPGHOME}}/secring.gpg + - name: Remove unwanted charts + run: | + if [ "${{ github.event.inputs.plane-ce }}" = "false" ]; then + rm -rf charts/${{ env.CHART_NAME_CE }} + fi + if [ "${{ github.event.inputs.plane-ee }}" = "false" ]; then + rm -rf charts/${{ env.CHART_NAME_ENTERPRISE }} + fi + - name: Rename Chart if: github.ref_name != 'master' run: | flatBranchName=$(echo "${{ env.TARGET_BRANCH }}" | sed 's/\//\-/g') - sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml - sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml + if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then + sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_CE }}/Chart.yaml + fi + + if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then + sed -i "s/name: \(.*\)/name: \1-${flatBranchName}/" charts/${{ env.CHART_NAME_ENTERPRISE }}/Chart.yaml + fi + + echo "MARK_AS_LATEST=false" >> $GITHUB_ENV + echo "MARK_AS_PRERELASE=true" >> $GITHUB_ENV + echo "PAGES_INDEX_PATH=${flatBranchName}" >> $GITHUB_ENV - name: Release Charts - uses: helm/chart-releaser-action@v1.6.0 + uses: mguptahub/chart-releaser-action@v1.6.2 with: charts_dir: charts config: cr.yaml packages_with_index: false skip_existing: true + mark_as_latest: ${{ env.MARK_AS_LATEST }} + prerelease: ${{ env.MARK_AS_PRERELASE }} + pages_index_path: ${{ env.PAGES_INDEX_PATH }} env: CR_TOKEN: ${{ env.CR_TOKEN }} CR_KEY: ${{ env.GPG_KEY_NAME }} @@ -82,7 +116,7 @@ jobs: CR_SIGN: true - id: publish-plane-enterprise - if: github.ref_name == 'master' + if: ${{ github.ref_name == 'master' && github.event.inputs.plane-ee == 'true' }} name: Harbor Publish Plane-Enterprise env: CHART_REPO: ${{ env.CHART_NAME_ENTERPRISE }} @@ -125,14 +159,23 @@ jobs: - name: Copy Readme run: | - cp code/charts/plane-ce/README.md pages/content/plane-ce.md - cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md + if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then + cp code/charts/plane-ce/README.md pages/content/plane-ce.md + fi + if [ "${{ github.event.inputs.plane-ee }}" = "true" ]; then + cp code/charts/plane-enterprise/README.md pages/content/plane-ee.md + fi - name: Publish pages working-directory: pages run: | git add . - git commit -m "Updated READMEs" - git push - + if git diff-index --quiet HEAD --; then + echo "No changes to commit" + else + # Commit and push the changes + git commit -m "Updated READMEs" + git push + fi + diff --git a/charts/plane-ce/Chart.yaml b/charts/plane-ce/Chart.yaml index 3bde67d..44e3faf 100644 --- a/charts/plane-ce/Chart.yaml +++ b/charts/plane-ce/Chart.yaml @@ -5,7 +5,7 @@ description: Meet Plane. An open-source software development tool to manage issu type: application -version: 1.0.22 +version: 1.0.24 appVersion: "0.22.0" home: https://plane.so 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-ce/questions.yml b/charts/plane-ce/questions.yml index dab544a..00d5ad1 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -225,7 +225,7 @@ questions: - variable: redis.volumeSize label: "Volume Size" type: string - default: "1Gi" + default: "100Mi" show_if: "redis.local_setup=true" - variable: redis.assign_cluster_ip label: "Assign Cluster IP" @@ -267,7 +267,7 @@ questions: - variable: postgres.volumeSize label: "Volume Size" type: string - default: "5Gi" + default: "1Gi" show_if: "postgres.local_setup=true" - variable: env.pgdb_username label: "Username" @@ -295,6 +295,66 @@ questions: default: "postrgres://" show_if: "postgres.local_setup=false" +- variable: rabbitmq.local_setup + label: "Install RabbitMQ" + type: boolean + default: true + group: "RabbitMQ Setup" + subquestions: + - variable: rabbitmq.image + label: "Docker Image" + type: string + default: "rabbitmq:3.13.6-management-alpine" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.pullPolicy + label: "Image Pull Policy" + type: enum + options: + - "Always" + - "IfNotPresent" + - "Never" + default: "IfNotPresent" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.servicePort + label: Service Port + type: int + default: 5672 + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.managementPort + label: Management Port + type: int + default: 15672 + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.assign_cluster_ip + label: "Assign ClusterIP" + type: boolean + default: false + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.storageClass + label: "Storage Class" + type: string + default: "longhorn" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.volumeSize + label: "Volume Size" + type: string + default: "100Mi" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.default_user + label: "Username" + type: string + default: "plane" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.default_password + label: "Password" + type: password + default: "plane" + show_if: "rabbitmq.local_setup=true" + - variable: rabbitmq.external_rabbitmq_url + label: "Remote URL" + type: string + show_if: "rabbitmq.local_setup=false" + - variable: minio.local_setup label: "Install Minio" type: boolean @@ -324,7 +384,7 @@ questions: - variable: minio.volumeSize label: "Volume Size" type: string - default: "5Gi" + default: "1Gi" show_if: "minio.local_setup=true" - variable: minio.assign_cluster_ip label: "Assign Cluster IP" @@ -377,6 +437,11 @@ questions: type: string default: "plane-minio.example.com" show_if: "minio.local_setup=true" + - variable: ingress.rabbitmqHost + label: "Rabbitmq Host" + type: string + default: "plane-rabbitmq.example.com" + show_if: "rabbitmq.local_setup=true" - variable: ingress.ingressClass label: "Ingress Classname" type: string diff --git a/charts/plane-ce/templates/certs/certs.yaml b/charts/plane-ce/templates/certs/certs.yaml index bf6cfda..d312760 100644 --- a/charts/plane-ce/templates/certs/certs.yaml +++ b/charts/plane-ce/templates/certs/certs.yaml @@ -11,6 +11,9 @@ spec: {{- if and .Values.minio.local_setup .Values.ingress.minioHost }} - {{ .Values.ingress.minioHost | quote }} {{- end }} + {{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - {{ .Values.ingress.rabbitmqHost | quote }} + {{- end }} issuerRef: name: {{ .Release.Name }}-cert-issuer secretName: {{ .Release.Name }}-ssl-cert diff --git a/charts/plane-ce/templates/config-secrets/app-env.yaml b/charts/plane-ce/templates/config-secrets/app-env.yaml index 667108e..0c52316 100644 --- a/charts/plane-ce/templates/config-secrets/app-env.yaml +++ b/charts/plane-ce/templates/config-secrets/app-env.yaml @@ -53,3 +53,11 @@ data: {{- else }} DATABASE_URL: "" {{ end }} + + {{- if .Values.rabbitmq.local_setup }} + AMQP_URL: "amqp://{{ .Values.rabbitmq.default_user}}:{{ .Values.rabbitmq.default_password}}@{{ .Release.Name }}-rabbitmq.{{ .Release.Namespace }}.svc.{{ .Values.env.default_cluster_domain | default "cluster.local" }}/" + {{- else if .Values.rabbitmq.external_rabbitmq_url }} + AMQP_URL: {{ .Values.rabbitmq.external_rabbitmq_url}} + {{- else }} + AMQP_URL: "" + {{ end }} diff --git a/charts/plane-ce/templates/config-secrets/rabbitmqdb.yaml b/charts/plane-ce/templates/config-secrets/rabbitmqdb.yaml new file mode 100644 index 0000000..a95009e --- /dev/null +++ b/charts/plane-ce/templates/config-secrets/rabbitmqdb.yaml @@ -0,0 +1,14 @@ +{{- if .Values.rabbitmq.local_setup }} + +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq-secrets +data: + RABBITMQ_DEFAULT_USER: {{ .Values.rabbitmq.default_user | default "plane" | b64enc | quote }} + RABBITMQ_DEFAULT_PASS: {{ .Values.rabbitmq.default_password | default "plane" | b64enc |quote }} +--- + +{{- end }} \ No newline at end of file diff --git a/charts/plane-ce/templates/ingress.yaml b/charts/plane-ce/templates/ingress.yaml index af3fe1c..b0f517b 100644 --- a/charts/plane-ce/templates/ingress.yaml +++ b/charts/plane-ce/templates/ingress.yaml @@ -74,13 +74,28 @@ spec: path: / pathType: Prefix {{- end }} + {{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - host: {{ .Values.ingress.rabbitmqHost }} + http: + paths: + - backend: + service: + port: + number: 15672 + name: {{ .Release.Name }}-rabbitmq + path: / + pathType: Prefix + {{- end }} {{- if .Values.ssl.generateCerts }} tls: - hosts: - {{ .Values.ingress.appHost | quote }} {{- if and .Values.minio.local_setup .Values.ingress.minioHost }} - {{ .Values.ingress.minioHost | quote }} - {{ end }} + {{- end }} + {{- if and .Values.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - {{ .Values.ingress.rabbitmqHost | quote }} + {{- end }} secretName: {{ .Release.Name }}-ssl-cert {{- end }} diff --git a/charts/plane-ce/templates/workloads/minio.stateful.yaml b/charts/plane-ce/templates/workloads/minio.stateful.yaml index f543f82..e32b4df 100644 --- a/charts/plane-ce/templates/workloads/minio.stateful.yaml +++ b/charts/plane-ce/templates/workloads/minio.stateful.yaml @@ -75,7 +75,7 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.minio.volumeSize | default "5Gi" | quote }} + storage: {{ .Values.minio.volumeSize | default "1Gi" | quote }} storageClassName: {{ .Values.minio.storageClass }} volumeMode: Filesystem diff --git a/charts/plane-ce/templates/workloads/postgres.stateful.yaml b/charts/plane-ce/templates/workloads/postgres.stateful.yaml index f023c52..77dc700 100644 --- a/charts/plane-ce/templates/workloads/postgres.stateful.yaml +++ b/charts/plane-ce/templates/workloads/postgres.stateful.yaml @@ -93,7 +93,7 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.postgres.volumeSize | default "5Gi" | quote }} + storage: {{ .Values.postgres.volumeSize | default "1Gi" | quote }} storageClassName: {{ .Values.postgres.storageClass }} volumeMode: Filesystem diff --git a/charts/plane-ce/templates/workloads/rabbitmq.stateful.yaml b/charts/plane-ce/templates/workloads/rabbitmq.stateful.yaml new file mode 100644 index 0000000..b2be949 --- /dev/null +++ b/charts/plane-ce/templates/workloads/rabbitmq.stateful.yaml @@ -0,0 +1,73 @@ +{{- if .Values.rabbitmq.local_setup }} + +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq +spec: + {{- if not .Values.rabbitmq.assign_cluster_ip }} + clusterIP: None + {{- end }} + ports: + - name: rabbitmq-{{ .Values.rabbitmq.servicePort }} + port: {{ .Values.rabbitmq.servicePort }} + protocol: TCP + targetPort: 5672 + - name: rabbitmq-mgmt-{{ .Values.rabbitmq.managementPort }} + port: {{ .Values.rabbitmq.managementPort }} + protocol: TCP + targetPort: 15672 + selector: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq-wl +spec: + selector: + matchLabels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq + serviceName: {{ .Release.Name }}-rabbitmq + template: + metadata: + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq + spec: + containers: + - image: {{ .Values.rabbitmq.image }} + imagePullPolicy: {{ .Values.rabbitmq.pullPolicy | default "IfNotPresent" | quote }} + name: {{ .Release.Name }}-rabbitmq + stdin: true + tty: true + envFrom: + - secretRef: + name: {{ .Release.Name }}-rabbitmq-secrets + optional: false + volumeMounts: + - mountPath: /var/lib/rabbitmq + name: pvc-{{ .Release.Name }}-rabbitmq-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 }}-rabbitmq-vol + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.rabbitmq.volumeSize | default "100Mi" | quote }} + storageClassName: {{ .Values.rabbitmq.storageClass }} + volumeMode: Filesystem + +{{- end }} \ No newline at end of file diff --git a/charts/plane-ce/templates/workloads/redis.stateful.yaml b/charts/plane-ce/templates/workloads/redis.stateful.yaml index c4c20a3..c242bc5 100644 --- a/charts/plane-ce/templates/workloads/redis.stateful.yaml +++ b/charts/plane-ce/templates/workloads/redis.stateful.yaml @@ -61,7 +61,7 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.redis.volumeSize | default "1Gi" | quote }} + storage: {{ .Values.redis.volumeSize | default "100Mi" | quote }} storageClassName: {{ .Values.redis.storageClass }} volumeMode: Filesystem diff --git a/charts/plane-ce/values.yaml b/charts/plane-ce/values.yaml index f96c92d..c3d5430 100644 --- a/charts/plane-ce/values.yaml +++ b/charts/plane-ce/values.yaml @@ -10,6 +10,7 @@ ingress: enabled: true appHost: "plane.example.com" minioHost: "plane-minio.example.com" + rabbitmqHost: "plane-rabbitmq.example.com" ingressClass: "nginx" ingress_annotations: { "nginx.ingress.kubernetes.io/proxy-body-size": "5m", @@ -29,7 +30,7 @@ redis: image: valkey/valkey:7.2.5-alpine servicePort: 6379 storageClass: longhorn - volumeSize: 1Gi + volumeSize: 100Mi pullPolicy: IfNotPresent assign_cluster_ip: false @@ -39,10 +40,23 @@ postgres: servicePort: 5432 cliConnectPort: "" storageClass: longhorn - volumeSize: 5Gi + volumeSize: 1Gi pullPolicy: IfNotPresent assign_cluster_ip: false +rabbitmq: + local_setup: true + image: rabbitmq:3.13.6-management-alpine + pullPolicy: IfNotPresent + servicePort: 5672 + managementPort: 15672 + storageClass: longhorn + volumeSize: 100Mi + default_user: plane + default_password: plane + external_rabbitmq_url: '' + assign_cluster_ip: false + minio: image: minio/minio:latest local_setup: true @@ -50,39 +64,39 @@ minio: root_password: password root_user: admin storageClass: longhorn - volumeSize: 5Gi - assign_cluster_ip: true + volumeSize: 1Gi + assign_cluster_ip: false web: replicas: 1 memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-frontend - pullPolicy: IfNotPresent - assign_cluster_ip: true + pullPolicy: Always + assign_cluster_ip: false space: replicas: 1 memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-space - pullPolicy: IfNotPresent - assign_cluster_ip: true + pullPolicy: Always + assign_cluster_ip: false admin: replicas: 1 memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-admin - pullPolicy: IfNotPresent - assign_cluster_ip: true + pullPolicy: Always + assign_cluster_ip: false api: replicas: 1 memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-backend - pullPolicy: IfNotPresent + pullPolicy: Always assign_cluster_ip: false worker: @@ -90,14 +104,14 @@ worker: memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-backend - pullPolicy: IfNotPresent + pullPolicy: Always beatworker: replicas: 1 memoryLimit: 1000Mi cpuLimit: 500m image: makeplane/plane-backend - pullPolicy: IfNotPresent + pullPolicy: Always env: pgdb_username: plane diff --git a/charts/plane-enterprise/Chart.yaml b/charts/plane-enterprise/Chart.yaml index 914468c..a5dc4c9 100644 --- a/charts/plane-enterprise/Chart.yaml +++ b/charts/plane-enterprise/Chart.yaml @@ -5,7 +5,7 @@ description: Meet Plane. An Enterprise software development tool to manage issue type: application -version: 1.0.8 +version: 1.0.10 appVersion: "1.2.1" home: https://plane.so/ 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 e83c2a1..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 @@ -271,6 +292,57 @@ questions: default: "postgresql://" show_if: "services.postgres.local_setup=false" +- variable: services.rabbitmq.local_setup + label: "Install RabbitMQ" + type: boolean + default: true + group: "RabbitMQ Setup" + subquestions: + - variable: services.rabbitmq.image + label: "Docker Image" + type: string + default: "rabbitmq:3.13.6-management-alpine" + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.servicePort + label: Service Port + type: int + default: 5672 + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.managementPort + label: Management Port + type: int + default: 15672 + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.assign_cluster_ip + label: "Assign ClusterIP" + type: boolean + default: false + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.storageClass + label: "Storage Class" + type: string + default: "longhorn" + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.volumeSize + label: "Volume Size" + type: string + default: "100Mi" + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.default_user + label: "Username" + type: string + default: "plane" + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.default_password + label: "Password" + type: password + default: "plane" + show_if: "services.rabbitmq.local_setup=true" + - variable: services.rabbitmq.external_rabbitmq_url + label: "Remote URL" + type: string + show_if: "services.rabbitmq.local_setup=false" + - variable: services.minio.local_setup label: "Install Minio" type: boolean @@ -327,7 +399,7 @@ questions: type: string default: "uploads" - variable: env.doc_upload_size_limit - label: "FIle Upload Size Limit" + label: "File Upload Size Limit" type: string default: "5242880" @@ -344,6 +416,11 @@ questions: type: string default: "plane-minio.example.com" show_if: "services.minio.local_setup=true" + - variable: ingress.rabbitmqHost + label: "Rabbitmq Host" + type: string + default: "plane-rabbitmq.example.com" + show_if: "services.rabbitmq.local_setup=true" - variable: ingress.ingressClass label: "Ingress Classname" type: string 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/certs/certs.yaml b/charts/plane-enterprise/templates/certs/certs.yaml index 6dc26df..03b7921 100644 --- a/charts/plane-enterprise/templates/certs/certs.yaml +++ b/charts/plane-enterprise/templates/certs/certs.yaml @@ -11,6 +11,9 @@ spec: {{- if and .Values.services.minio.local_setup .Values.ingress.minioHost }} - {{ .Values.ingress.minioHost | quote }} {{- end }} + {{- if and .Values.services.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - {{ .Values.ingress.rabbitmqHost | quote }} + {{- end }} issuerRef: name: {{ .Release.Name }}-cert-issuer secretName: {{ .Release.Name }}-ssl-cert diff --git a/charts/plane-enterprise/templates/config-secrets/app-env.yaml b/charts/plane-enterprise/templates/config-secrets/app-env.yaml index 2beac71..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}} @@ -51,3 +51,11 @@ data: {{ else }} DATABASE_URL: "" {{ end }} + + {{- if .Values.services.rabbitmq.local_setup }} + AMQP_URL: "amqp://{{ .Values.services.rabbitmq.default_user}}:{{ .Values.services.rabbitmq.default_password}}@{{ .Release.Name }}-rabbitmq.{{ .Release.Namespace }}.svc.{{ .Values.env.default_cluster_domain | default "cluster.local" }}/" + {{- else if .Values.services.rabbitmq.external_rabbitmq_url }} + AMQP_URL: {{ .Values.services.rabbitmq.external_rabbitmq_url}} + {{- else }} + AMQP_URL: "" + {{ end }} 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/config-secrets/rabbitmqdb.yaml b/charts/plane-enterprise/templates/config-secrets/rabbitmqdb.yaml new file mode 100644 index 0000000..12b7339 --- /dev/null +++ b/charts/plane-enterprise/templates/config-secrets/rabbitmqdb.yaml @@ -0,0 +1,14 @@ +{{- if .Values.services.rabbitmq.local_setup }} + +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq-secrets +data: + RABBITMQ_DEFAULT_USER: {{ .Values.services.rabbitmq.default_user | default "plane" | b64enc | quote }} + RABBITMQ_DEFAULT_PASS: {{ .Values.services.rabbitmq.default_password | default "plane" | b64enc |quote }} +--- + +{{- end }} \ No newline at end of file diff --git a/charts/plane-enterprise/templates/ingress.yaml b/charts/plane-enterprise/templates/ingress.yaml index bb2cfab..5891522 100644 --- a/charts/plane-enterprise/templates/ingress.yaml +++ b/charts/plane-enterprise/templates/ingress.yaml @@ -74,6 +74,18 @@ spec: path: / pathType: Prefix {{- end }} + {{- if and .Values.services.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - host: {{ .Values.ingress.rabbitmqHost}} + http: + paths: + - backend: + service: + port: + number: 15672 + name: {{ .Release.Name }}-rabbitmq + path: / + pathType: Prefix + {{- end }} {{- if .Values.ssl.generateCerts }} tls: - hosts: @@ -81,6 +93,9 @@ spec: {{- if and .Values.services.minio.local_setup .Values.ingress.minioHost }} - {{ .Values.ingress.minioHost | quote }} {{ end }} + {{- if and .Values.services.rabbitmq.local_setup .Values.ingress.rabbitmqHost }} + - {{ .Values.ingress.rabbitmqHost | quote }} + {{ end }} secretName: {{ .Release.Name }}-ssl-cert {{- end }} 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/templates/workloads/rabbitmq.stateful.yaml b/charts/plane-enterprise/templates/workloads/rabbitmq.stateful.yaml new file mode 100644 index 0000000..1e5e00a --- /dev/null +++ b/charts/plane-enterprise/templates/workloads/rabbitmq.stateful.yaml @@ -0,0 +1,73 @@ +{{- if .Values.services.rabbitmq.local_setup }} + +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq +spec: + {{- if not .Values.services.rabbitmq.assign_cluster_ip }} + clusterIP: None + {{- end }} + ports: + - name: rabbitmq-{{ .Values.services.rabbitmq.servicePort }} + port: {{ .Values.services.rabbitmq.servicePort }} + protocol: TCP + targetPort: 5672 + - name: rabbitmq-mgmt-{{ .Values.services.rabbitmq.managementPort }} + port: {{ .Values.services.rabbitmq.managementPort }} + protocol: TCP + targetPort: 15672 + selector: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-rabbitmq-wl +spec: + selector: + matchLabels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq + serviceName: {{ .Release.Name }}-rabbitmq + template: + metadata: + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-rabbitmq + spec: + containers: + - image: {{ .Values.services.rabbitmq.image }} + imagePullPolicy: Always + name: {{ .Release.Name }}-rabbitmq + stdin: true + tty: true + envFrom: + - secretRef: + name: {{ .Release.Name }}-rabbitmq-secrets + optional: false + volumeMounts: + - mountPath: /var/lib/rabbitmq + name: pvc-{{ .Release.Name }}-rabbitmq-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 }}-rabbitmq-vol + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.services.rabbitmq.volumeSize | default "100Mi" | quote }} + storageClassName: {{ .Values.services.rabbitmq.storageClass }} + volumeMode: Filesystem + +{{- end }} \ No newline at end of file diff --git a/charts/plane-enterprise/values.yaml b/charts/plane-enterprise/values.yaml index 851cd55..4ee8d54 100644 --- a/charts/plane-enterprise/values.yaml +++ b/charts/plane-enterprise/values.yaml @@ -1,19 +1,19 @@ 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: enabled: true minioHost: '' + rabbitmqHost: '' ingressClass: 'nginx' ingress_annotations: { "nginx.ingress.kubernetes.io/proxy-body-size": "5m", @@ -43,6 +43,18 @@ services: volumeSize: 2Gi assign_cluster_ip: false + rabbitmq: + local_setup: true + image: rabbitmq:3.13.6-management-alpine + servicePort: 5672 + managementPort: 15672 + storageClass: longhorn + volumeSize: 100Mi + default_user: plane + default_password: plane + external_rabbitmq_url: '' + assign_cluster_ip: false + minio: local_setup: true image: registry.plane.tools/plane/minio:latest @@ -58,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 diff --git a/cr.yaml b/cr.yaml index b67a65c..af20440 100644 --- a/cr.yaml +++ b/cr.yaml @@ -9,4 +9,3 @@ generate-release-notes: true # skip-existing: true git-base-url: https://api.github.com/ git-upload-url: https://uploads.github.com/ -