diff --git a/charts/plane-enterprise/Chart.yaml b/charts/plane-enterprise/Chart.yaml index 32f8330..e1eb826 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: 3.0.0 +version: 3.1.0 appVersion: "3.0.0" home: https://plane.so/ diff --git a/charts/plane-enterprise/README.md b/charts/plane-enterprise/README.md index 1fa17fe..d4a05ef 100644 --- a/charts/plane-enterprise/README.md +++ b/charts/plane-enterprise/README.md @@ -793,6 +793,25 @@ Note: When the email service is enabled, the cert-issuer will be automatically c | env.webhook_consumer_envs.queue_name | "plane.webhook" | | RabbitMQ queue name the webhook consumer reads from | | env.webhook_consumer_envs.prefetch_count | 10 | | Prefetch count for the webhook consumer | +### Agent Consumer Deployment + +| Setting | Default | Required | Description | +| ------------------------------------------------ | :------------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| services.agent_consumer.enabled | false | | Set to `true` to enable the agent consumer service deployment | +| services.agent_consumer.replicas | 1 | | Number of replicas for the agent consumer service deployment | +| services.agent_consumer.memoryLimit | 1000Mi | | Memory limit for the agent consumer service deployment | +| services.agent_consumer.cpuLimit | 500m | | CPU limit for the agent consumer service deployment | +| services.agent_consumer.memoryRequest | 500Mi | | Memory request for the agent consumer service deployment | +| services.agent_consumer.cpuRequest | 250m | | CPU request for the agent consumer service deployment | +| services.agent_consumer.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service | +| services.agent_consumer.nodeSelector | {} | | This key allows you to set the node selector for the deployment of `agent_consumer`. This is useful when you want to run the deployment on specific nodes in your Kubernetes cluster. | +| services.agent_consumer.tolerations | [] | | This key allows you to set the tolerations for the deployment of `agent_consumer`. This is useful when you want to run the deployment on nodes with specific taints in your Kubernetes cluster. | +| services.agent_consumer.affinity | {} | | This key allows you to set the affinity rules for the deployment of `agent_consumer`. This is useful when you want to control how pods are scheduled on nodes in your Kubernetes cluster. | +| services.agent_consumer.labels | {} | | Custom labels to add to the agent consumer deployment | +| services.agent_consumer.annotations | {} | | Custom annotations to add to the agent consumer deployment | +| env.agent_consumer_envs.queue_name | "plane.agent" | | RabbitMQ queue name the agent consumer reads from | +| env.agent_consumer_envs.prefetch_count | 10 | | Prefetch count for the agent consumer | + ### Iframely Deployment | Setting | Default | Required | Description | diff --git a/charts/plane-enterprise/questions.yml b/charts/plane-enterprise/questions.yml index 12241b8..61fcd4d 100644 --- a/charts/plane-enterprise/questions.yml +++ b/charts/plane-enterprise/questions.yml @@ -883,6 +883,46 @@ questions: type: int default: 10 +- variable: services.agent_consumer.enabled + label: "Enable Agent Consumer" + type: boolean + default: false + group: "Agent Consumer Setup" + show_subquestion_if: true + subquestions: + - variable: services.agent_consumer.replicas + label: "Default Replica Count" + type: int + default: 1 + - variable: services.agent_consumer.memoryLimit + label: "Memory Limit" + type: string + default: 1000Mi + - variable: services.agent_consumer.cpuLimit + label: "CPU Limit" + type: string + default: 500m + - variable: services.agent_consumer.memoryRequest + label: "Memory Request" + type: string + default: 500Mi + - variable: services.agent_consumer.cpuRequest + label: "CPU Request" + type: string + default: 250m + - variable: services.agent_consumer.assign_cluster_ip + label: "Assign Cluster IP" + type: boolean + default: false + - variable: env.agent_consumer_envs.queue_name + label: "Agent Queue Name" + type: string + default: "plane.agent" + - variable: env.agent_consumer_envs.prefetch_count + label: "Agent Prefetch Count" + type: int + default: 10 + - variable: services.iframely.enabled label: "Enable Iframely" type: boolean diff --git a/charts/plane-enterprise/templates/config-secrets/agent-consumer.yaml b/charts/plane-enterprise/templates/config-secrets/agent-consumer.yaml new file mode 100644 index 0000000..a6a320e --- /dev/null +++ b/charts/plane-enterprise/templates/config-secrets/agent-consumer.yaml @@ -0,0 +1,13 @@ +{{- if .Values.services.agent_consumer.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-agent-consumer-vars + labels: + {{- include "plane.commonLabels" $ | nindent 4 }} +data: + AGENT_QUEUE_NAME: {{ .Values.env.agent_consumer_envs.queue_name | default "plane.agent" | quote }} + AGENT_PREFETCH_COUNT: {{ .Values.env.agent_consumer_envs.prefetch_count | default 10 | quote }} +--- +{{- end }} diff --git a/charts/plane-enterprise/templates/workloads/agent-consumer.deployment.yaml b/charts/plane-enterprise/templates/workloads/agent-consumer.deployment.yaml new file mode 100644 index 0000000..bd76502 --- /dev/null +++ b/charts/plane-enterprise/templates/workloads/agent-consumer.deployment.yaml @@ -0,0 +1,80 @@ +{{- if .Values.services.agent_consumer.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: {{ .Release.Namespace }} + name: {{ .Release.Name }}-agent-consumer-wl + {{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.services.agent_consumer) }} +spec: + replicas: {{ .Values.services.agent_consumer.replicas | default 1 }} + selector: + matchLabels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-agent-consumer + template: + metadata: + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-agent-consumer + {{- include "plane.commonLabels" $ | nindent 8 }} + annotations: + timestamp: {{ now | quote }} + spec: + {{- include "plane.podScheduling" .Values.services.agent_consumer }} + {{- include "plane.podSecurityContext" . }} + containers: + - name: {{ .Release.Name }}-agent-consumer + {{- include "plane.containerSecurityContext" . }} + imagePullPolicy: {{ .Values.services.api.pullPolicy | default "Always" }} + image: {{ .Values.services.api.image | default "makeplane/backend-commercial" }}:{{ .Values.planeVersion }} + stdin: true + tty: true + resources: + requests: + memory: {{ .Values.services.agent_consumer.memoryRequest | default "500Mi" | quote }} + cpu: {{ .Values.services.agent_consumer.cpuRequest | default "250m" | quote }} + limits: + memory: {{ .Values.services.agent_consumer.memoryLimit | default "1000Mi" | quote }} + cpu: {{ .Values.services.agent_consumer.cpuLimit | default "500m" | quote}} + readinessProbe: + exec: + command: + - sh + - -c + - pgrep -f "python" > /dev/null + initialDelaySeconds: 10 + failureThreshold: 3 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + command: + - ./bin/docker-entrypoint-agent-consumer.sh + envFrom: + - configMapRef: + name: {{ .Release.Name }}-agent-consumer-vars + optional: false + - configMapRef: + name: {{ .Release.Name }}-app-vars + optional: false + - secretRef: + name: {{ if not (empty .Values.external_secrets.app_env_existingSecret) }}{{ .Values.external_secrets.app_env_existingSecret }}{{ else }}{{ .Release.Name }}-app-secrets{{ end }} + optional: false + - secretRef: + name: {{ if not (empty .Values.external_secrets.doc_store_existingSecret) }}{{ .Values.external_secrets.doc_store_existingSecret }}{{ else }}{{ .Release.Name }}-doc-store-secrets{{ end }} + optional: false + - secretRef: + name: {{ if not (empty .Values.external_secrets.opensearch_existingSecret) }}{{ .Values.external_secrets.opensearch_existingSecret }}{{ else }}{{ .Release.Name }}-opensearch-secrets{{ end }} + optional: false + {{- if .Values.services.silo.enabled }} + - secretRef: + name: {{ if not (empty .Values.external_secrets.silo_env_existingSecret) }}{{ .Values.external_secrets.silo_env_existingSecret }}{{ else }}{{ .Release.Name }}-silo-secrets{{ end }} + optional: false + {{- end }} + {{- if .Values.extraEnv }} + env: + {{- toYaml .Values.extraEnv | nindent 10 }} + {{- end }} + + serviceAccount: {{ .Release.Name }}-srv-account + serviceAccountName: {{ .Release.Name }}-srv-account +--- +{{- end }} diff --git a/charts/plane-enterprise/values.yaml b/charts/plane-enterprise/values.yaml index 8394e9a..5e283de 100644 --- a/charts/plane-enterprise/values.yaml +++ b/charts/plane-enterprise/values.yaml @@ -436,6 +436,20 @@ services: labels: {} annotations: {} + agent_consumer: + enabled: false + replicas: 1 + memoryLimit: 1000Mi + cpuLimit: 500m + memoryRequest: 500Mi + cpuRequest: 250m + assign_cluster_ip: false + nodeSelector: {} + tolerations: [] + affinity: {} + labels: {} + annotations: {} + pi: enabled: false replicas: 1 @@ -661,6 +675,10 @@ env: queue_name: "plane.webhook" prefetch_count: 10 + agent_consumer_envs: + queue_name: "plane.agent" + prefetch_count: 10 + runner_envs: execution_timeout_ms: "10000" init_timeout_ms: "5000"