From d2d96f65967a0f4d0108b9e2292ecf06fdaedc94 Mon Sep 17 00:00:00 2001 From: Aditya Choudhari Date: Mon, 20 Oct 2025 11:23:49 -0700 Subject: [PATCH] chore: remove event worker --- charts/ctrlplane/Chart.lock | 7 +- charts/ctrlplane/Chart.yaml | 6 +- .../ctrlplane/charts/event-worker/.helmignore | 23 ----- .../ctrlplane/charts/event-worker/Chart.yaml | 6 -- .../event-worker/templates/_helpers.tpl | 62 ------------- .../event-worker/templates/deployment.yaml | 92 ------------------- .../charts/event-worker/templates/hpa.yaml | 28 ------ .../templates/serviceaccount.yaml | 16 ---- .../ctrlplane/charts/event-worker/values.yaml | 39 -------- .../pty-proxy/templates/deployment.yaml | 12 +-- .../pty-proxy/templates/serviceaccount.yaml | 4 +- charts/ctrlplane/values.yaml | 3 - 12 files changed, 11 insertions(+), 287 deletions(-) delete mode 100644 charts/ctrlplane/charts/event-worker/.helmignore delete mode 100644 charts/ctrlplane/charts/event-worker/Chart.yaml delete mode 100644 charts/ctrlplane/charts/event-worker/templates/_helpers.tpl delete mode 100644 charts/ctrlplane/charts/event-worker/templates/deployment.yaml delete mode 100644 charts/ctrlplane/charts/event-worker/templates/hpa.yaml delete mode 100644 charts/ctrlplane/charts/event-worker/templates/serviceaccount.yaml delete mode 100644 charts/ctrlplane/charts/event-worker/values.yaml diff --git a/charts/ctrlplane/Chart.lock b/charts/ctrlplane/Chart.lock index dd3c063..9e586da 100644 --- a/charts/ctrlplane/Chart.lock +++ b/charts/ctrlplane/Chart.lock @@ -8,9 +8,6 @@ dependencies: - name: migrations repository: file://charts/migrations version: 0.1.6 -- name: event-worker - repository: file://charts/event-worker - version: 0.1.7 - name: event-queue repository: file://charts/event-queue version: 0.1.7 @@ -23,5 +20,5 @@ dependencies: - name: workspace-engine repository: file://charts/workspace-engine version: 0.1.0 -digest: sha256:d7a28c69532ba045f866918f5b769f57bb791f6d5eb1209c3e3dbb751c7207b3 -generated: "2025-10-01T19:24:20.209087-04:00" +digest: sha256:0e91f273ef3731567ede504f5dee53983823962a69f54d2e13047e221253f98b +generated: "2025-10-20T11:22:56.849671-07:00" diff --git a/charts/ctrlplane/Chart.yaml b/charts/ctrlplane/Chart.yaml index eb6f9cf..da90037 100644 --- a/charts/ctrlplane/Chart.yaml +++ b/charts/ctrlplane/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: ctrlplane description: Ctrlplane Helm chart for Kubernetes type: application -version: 0.4.13 +version: 0.5.0 appVersion: "1.16.0" maintainers: @@ -23,10 +23,6 @@ dependencies: version: "*.*.*" repository: file://charts/migrations condition: migrations.install - - name: event-worker - condition: event-worker.install - version: "*.*.*" - repository: "file://charts/event-worker" - name: event-queue condition: event-queue.install version: "*.*.*" diff --git a/charts/ctrlplane/charts/event-worker/.helmignore b/charts/ctrlplane/charts/event-worker/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/ctrlplane/charts/event-worker/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/ctrlplane/charts/event-worker/Chart.yaml b/charts/ctrlplane/charts/event-worker/Chart.yaml deleted file mode 100644 index 2d3cb7d..0000000 --- a/charts/ctrlplane/charts/event-worker/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: event-worker -description: A Helm chart for Kubernetes -type: application -version: 0.1.7 -appVersion: "1.16.0" diff --git a/charts/ctrlplane/charts/event-worker/templates/_helpers.tpl b/charts/ctrlplane/charts/event-worker/templates/_helpers.tpl deleted file mode 100644 index 54bb537..0000000 --- a/charts/ctrlplane/charts/event-worker/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "event-worker.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "event-worker.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "event-worker.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "event-worker.labels" -}} -helm.sh/chart: {{ include "event-worker.chart" . }} -{{ include "event-worker.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "event-worker.selectorLabels" -}} -app.kubernetes.io/name: {{ include "event-worker.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "event-worker.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "event-worker.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/ctrlplane/charts/event-worker/templates/deployment.yaml b/charts/ctrlplane/charts/event-worker/templates/deployment.yaml deleted file mode 100644 index 8cea5fe..0000000 --- a/charts/ctrlplane/charts/event-worker/templates/deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -{{- $imageCfg := dict "global" $.Values.global.image "local" $.Values.image -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "event-worker.fullname" . }} - labels: - {{- include "event-worker.labels" . | nindent 4 }} - {{- if .Values.deployment.labels -}} - {{- toYaml .Values.deployment.labels | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.deployment.annotations -}} - {{- toYaml .Values.deployment.annotations | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replica }} - selector: - matchLabels: - {{- include "ctrlplane.selectorLabels" $ | nindent 6 }} - {{- include "event-worker.labels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "event-worker.labels" . | nindent 8 }} - annotations: - {{- if .Values.pod.annotations -}} - {{- toYaml .Values.pod.annotations | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "event-worker.serviceAccountName" . }} - {{- if .tolerations }} - tolerations: - {{- toYaml .tolerations | nindent 8 }} - {{- end }} - {{- include "ctrlplane.nodeSelector" . | nindent 6 }} - {{- include "ctrlplane.priorityClassName" . | nindent 6 }} - {{- include "ctrlplane.podSecurityContext" .Values.pod.securityContext | nindent 6 }} - containers: - - name: event-worker - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - env: - - name: REDIS_URL - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-connections - key: REDIS_URL - - name: POSTGRES_URL - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-connections - key: POSTGRES_URL - - name: VARIABLES_AES_256_KEY - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-encryption-key - key: AES_256_KEY - {{- with (include "ctrlplane.githubBot" . | fromYaml) }} - - name: GITHUB_BOT_APP_ID - value: {{ .appId | quote }} - - name: GITHUB_BOT_CLIENT_ID - value: {{ .clientId | quote }} - - name: GITHUB_BOT_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: {{ .secretRef }} - key: GITHUB_BOT_CLIENT_SECRET - optional: true - - name: GITHUB_BOT_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: {{ .secretRef }} - key: GITHUB_BOT_PRIVATE_KEY - optional: true - - name: GITHUB_BOT_NAME - value: {{ .name }} - {{- end }} - {{- with (include "ctrlplane.azureApp" . | fromYaml) }} - - name: AZURE_APP_CLIENT_ID - value: {{ .clientId | quote }} - - name: AZURE_APP_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: {{ .secretRef }} - key: AZURE_APP_CLIENT_SECRET - optional: true - {{- end }} - {{- include "ctrlplane.extraEnv" . | nindent 12 }} - {{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }} - - name: ENABLE_NEW_POLICY_ENGINE - value: {{ .Values.global.enableNewPolicyEngine | quote }} - resources: - {{- toYaml .Values.resources | nindent 12 }} \ No newline at end of file diff --git a/charts/ctrlplane/charts/event-worker/templates/hpa.yaml b/charts/ctrlplane/charts/event-worker/templates/hpa.yaml deleted file mode 100644 index 5f3ad8a..0000000 --- a/charts/ctrlplane/charts/event-worker/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "event-worker.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "event-worker.labels" . | nindent 4 }} - {{- if .Values.hpa.labels -}} - {{- toYaml .Values.hpa.labels | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.hpa.annotations -}} - {{- toYaml .Values.hpa.annotations | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "event-worker.fullname" . }} - minReplicas: {{ .Values.hpa.minReplicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 70 \ No newline at end of file diff --git a/charts/ctrlplane/charts/event-worker/templates/serviceaccount.yaml b/charts/ctrlplane/charts/event-worker/templates/serviceaccount.yaml deleted file mode 100644 index 6271fac..0000000 --- a/charts/ctrlplane/charts/event-worker/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "event-worker.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "event-worker.labels" . | nindent 4 }} - {{- if .Values.serviceAccount.labels -}} - {{- toYaml .Values.serviceAccount.labels | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.serviceAccount.annotations -}} - {{- toYaml .Values.serviceAccount.annotations | nindent 4 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/ctrlplane/charts/event-worker/values.yaml b/charts/ctrlplane/charts/event-worker/values.yaml deleted file mode 100644 index b217f12..0000000 --- a/charts/ctrlplane/charts/event-worker/values.yaml +++ /dev/null @@ -1,39 +0,0 @@ -nameOverride: "" -fullnameOverride: "" - -replica: 2 - -image: - repository: ctrlplane/event-worker - tag: latest - pullPolicy: Always - -extraEnv: {} -extraEnvFrom: {} - -deployment: - labels: {} - annotations: {} - -hpa: - labels: {} - annotations: {} - minReplicas: 2 - maxReplicas: 5 - -tolerations: [] -pod: {} - -serviceAccount: - create: false - name: "" - labels: {} - annotations: {} - -resources: - requests: - cpu: 1000m - memory: 1Gi - limits: - cpu: 4000m - memory: 4Gi diff --git a/charts/ctrlplane/charts/pty-proxy/templates/deployment.yaml b/charts/ctrlplane/charts/pty-proxy/templates/deployment.yaml index 6327b2a..406647d 100644 --- a/charts/ctrlplane/charts/pty-proxy/templates/deployment.yaml +++ b/charts/ctrlplane/charts/pty-proxy/templates/deployment.yaml @@ -2,9 +2,9 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "event-worker.fullname" . }} + name: {{ include "pty-proxy.fullname" . }} labels: - {{- include "event-worker.labels" . | nindent 4 }} + {{- include "pty-proxy.labels" . | nindent 4 }} {{- if .Values.deployment.labels -}} {{- toYaml .Values.deployment.labels | nindent 4 }} {{- end }} @@ -17,17 +17,17 @@ spec: selector: matchLabels: {{- include "ctrlplane.selectorLabels" $ | nindent 6 }} - {{- include "event-worker.labels" . | nindent 6 }} + {{- include "pty-proxy.labels" . | nindent 6 }} template: metadata: labels: - {{- include "event-worker.labels" . | nindent 8 }} + {{- include "pty-proxy.labels" . | nindent 8 }} annotations: {{- if .Values.pod.annotations -}} {{- toYaml .Values.pod.annotations | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "event-worker.serviceAccountName" . }} + serviceAccountName: {{ include "pty-proxy.serviceAccountName" . }} {{- if .tolerations }} tolerations: {{- toYaml .tolerations | nindent 8 }} @@ -36,7 +36,7 @@ spec: {{- include "ctrlplane.priorityClassName" . | nindent 6 }} {{- include "ctrlplane.podSecurityContext" .Values.pod.securityContext | nindent 6 }} containers: - - name: event-worker + - name: pty-proxy image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" ports: - name: http diff --git a/charts/ctrlplane/charts/pty-proxy/templates/serviceaccount.yaml b/charts/ctrlplane/charts/pty-proxy/templates/serviceaccount.yaml index 6271fac..75d1cb6 100644 --- a/charts/ctrlplane/charts/pty-proxy/templates/serviceaccount.yaml +++ b/charts/ctrlplane/charts/pty-proxy/templates/serviceaccount.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "event-worker.serviceAccountName" . }} + name: {{ include "pty-proxy.serviceAccountName" . }} namespace: {{ $.Release.Namespace }} labels: - {{- include "event-worker.labels" . | nindent 4 }} + {{- include "pty-proxy.labels" . | nindent 4 }} {{- if .Values.serviceAccount.labels -}} {{- toYaml .Values.serviceAccount.labels | nindent 4 }} {{- end }} diff --git a/charts/ctrlplane/values.yaml b/charts/ctrlplane/values.yaml index e645a10..d6d8805 100644 --- a/charts/ctrlplane/values.yaml +++ b/charts/ctrlplane/values.yaml @@ -63,9 +63,6 @@ ingress: labels: {} annotations: {} -event-worker: - install: true - event-queue: install: true