From b9032e1a0b1f8dd9d3fd255c846e173156a9001c Mon Sep 17 00:00:00 2001 From: Alejandro Ponce de Leon Date: Fri, 21 Feb 2025 13:27:11 +0200 Subject: [PATCH] Revert "feat: adds codegate helm chart (#1102)" This reverts commit 6634fca83630ca9376a2ac68b747b33ff529f4e8. --- cr.yaml | 1 - ct.yaml | 5 - deploy/charts/codegate/.helmignore | 23 --- deploy/charts/codegate/Chart.yaml | 6 - deploy/charts/codegate/README.md | 50 ------- deploy/charts/codegate/ci/default-values.yaml | 2 - deploy/charts/codegate/templates/_helpers.tpl | 62 -------- .../charts/codegate/templates/deployment.yaml | 70 --------- deploy/charts/codegate/templates/hpa.yaml | 33 ----- deploy/charts/codegate/templates/ingress.yaml | 44 ------ deploy/charts/codegate/templates/pvc.yaml | 15 -- deploy/charts/codegate/templates/service.yaml | 19 --- .../codegate/templates/serviceaccount.yaml | 14 -- deploy/charts/codegate/values.yaml | 140 ------------------ 14 files changed, 484 deletions(-) delete mode 100644 cr.yaml delete mode 100644 ct.yaml delete mode 100644 deploy/charts/codegate/.helmignore delete mode 100644 deploy/charts/codegate/Chart.yaml delete mode 100644 deploy/charts/codegate/README.md delete mode 100644 deploy/charts/codegate/ci/default-values.yaml delete mode 100644 deploy/charts/codegate/templates/_helpers.tpl delete mode 100644 deploy/charts/codegate/templates/deployment.yaml delete mode 100644 deploy/charts/codegate/templates/hpa.yaml delete mode 100644 deploy/charts/codegate/templates/ingress.yaml delete mode 100644 deploy/charts/codegate/templates/pvc.yaml delete mode 100644 deploy/charts/codegate/templates/service.yaml delete mode 100644 deploy/charts/codegate/templates/serviceaccount.yaml delete mode 100644 deploy/charts/codegate/values.yaml diff --git a/cr.yaml b/cr.yaml deleted file mode 100644 index 8c8f7546..00000000 --- a/cr.yaml +++ /dev/null @@ -1 +0,0 @@ -generate-release-notes: true \ No newline at end of file diff --git a/ct.yaml b/ct.yaml deleted file mode 100644 index df3fdacb..00000000 --- a/ct.yaml +++ /dev/null @@ -1,5 +0,0 @@ -chart-dirs: - - deploy/charts -validate-maintainers: false -remote: origin -target-branch: main \ No newline at end of file diff --git a/deploy/charts/codegate/.helmignore b/deploy/charts/codegate/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/deploy/charts/codegate/.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/deploy/charts/codegate/Chart.yaml b/deploy/charts/codegate/Chart.yaml deleted file mode 100644 index 171c7ce7..00000000 --- a/deploy/charts/codegate/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: codegate -description: A Helm chart for deploying Codegate onto Kubernetes -type: application -version: 0.0.1 -appVersion: "v0.1.22" diff --git a/deploy/charts/codegate/README.md b/deploy/charts/codegate/README.md deleted file mode 100644 index 47a72f5c..00000000 --- a/deploy/charts/codegate/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Codegate - -![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.22](https://img.shields.io/badge/AppVersion-2.112.0-informational?style=flat-square) - -CodeGate is a local gateway that makes AI agents and coding assistants safer. - -## TL;DR - -```console -helm repo add codegate [] - -helm install codegate/codegate -``` - -## Usage - -The Codegate Chart is available in the following formats: -- [Chart Repository](https://helm.sh/docs/topics/chart_repository/) -- [OCI Artifacts](https://helm.sh/docs/topics/registries/) - -### Installing from Chart Repository - -The following command can be used to add the chart repository: - -```console -helm repo add codegate [] -``` - -Once the chart has been added, install one of the available charts: - -```console -helm install codegate/codegate -``` - -### Installing from an OCI Registry - -Charts are also available in OCI format. The list of available charts can be found [here](https://github.com/stacklok/codegate/deploy/charts). -Install one of the available charts: - -```shell -helm upgrade -i oci://ghcr.io/stacklok/codegate/codegate --version= -``` - -## Source Code - -* - -## Values - - diff --git a/deploy/charts/codegate/ci/default-values.yaml b/deploy/charts/codegate/ci/default-values.yaml deleted file mode 100644 index 0ded8b73..00000000 --- a/deploy/charts/codegate/ci/default-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -volumePersistence: - storageClassName: standard diff --git a/deploy/charts/codegate/templates/_helpers.tpl b/deploy/charts/codegate/templates/_helpers.tpl deleted file mode 100644 index 757dbcac..00000000 --- a/deploy/charts/codegate/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "codegate.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 "codegate.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 "codegate.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "codegate.labels" -}} -helm.sh/chart: {{ include "codegate.chart" . }} -{{ include "codegate.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "codegate.selectorLabels" -}} -app.kubernetes.io/name: {{ include "codegate.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "codegate.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "codegate.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/deploy/charts/codegate/templates/deployment.yaml b/deploy/charts/codegate/templates/deployment.yaml deleted file mode 100644 index 6b3cd7aa..00000000 --- a/deploy/charts/codegate/templates/deployment.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "codegate.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "codegate.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - # we hardcode to 1 at the moment as there is only a single file sqlite database - replicas: 1 - {{- end }} - selector: - matchLabels: - {{- include "codegate.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "codegate.labels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "codegate.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag}}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.port }} - protocol: TCP - livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} - readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.volumeMounts }} - volumeMounts: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.volumes }} - volumes: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/deploy/charts/codegate/templates/hpa.yaml b/deploy/charts/codegate/templates/hpa.yaml deleted file mode 100644 index 01bc451b..00000000 --- a/deploy/charts/codegate/templates/hpa.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "codegate.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "codegate.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "codegate.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/deploy/charts/codegate/templates/ingress.yaml b/deploy/charts/codegate/templates/ingress.yaml deleted file mode 100644 index 1267c98b..00000000 --- a/deploy/charts/codegate/templates/ingress.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ include "codegate.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "codegate.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .Values.ingress.className }} - ingressClassName: {{ . }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- with .pathType }} - pathType: {{ . }} - {{- end }} - backend: - service: - name: {{ include "codegate.fullname" $ }} - port: - number: {{ $.Values.service.port }} - {{- end }} - {{- end }} -{{- end }} diff --git a/deploy/charts/codegate/templates/pvc.yaml b/deploy/charts/codegate/templates/pvc.yaml deleted file mode 100644 index 2e78518f..00000000 --- a/deploy/charts/codegate/templates/pvc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.volumePersistence.enabled }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.volumePersistence.pvcName }} - namespace: {{ .Release.Namespace | quote }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.volumePersistence.resources.requests.storage }} - storageClassName: {{ .Values.volumePersistence.storageClassName }} - volumeMode: {{ .Values.volumePersistence.volumeMode }} -{{- end }} \ No newline at end of file diff --git a/deploy/charts/codegate/templates/service.yaml b/deploy/charts/codegate/templates/service.yaml deleted file mode 100644 index 6ac81de6..00000000 --- a/deploy/charts/codegate/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "codegate.fullname" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "codegate.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.port }} - protocol: TCP - name: http-api - {{- with .Values.extraServicePorts }} - {{- toYaml . | nindent 6 }} - {{- end }} - selector: - {{- include "codegate.selectorLabels" . | nindent 4 }} diff --git a/deploy/charts/codegate/templates/serviceaccount.yaml b/deploy/charts/codegate/templates/serviceaccount.yaml deleted file mode 100644 index 0e5adea8..00000000 --- a/deploy/charts/codegate/templates/serviceaccount.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "codegate.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} - labels: - {{- include "codegate.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automount }} -{{- end }} diff --git a/deploy/charts/codegate/values.yaml b/deploy/charts/codegate/values.yaml deleted file mode 100644 index 013fe504..00000000 --- a/deploy/charts/codegate/values.yaml +++ /dev/null @@ -1,140 +0,0 @@ -# This is to override the chart name. -nameOverride: "" -fullnameOverride: "" - -# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ -image: - repository: ghcr.io/stacklok/codegate - # This sets the pull policy for images. - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "v0.1.22" - -# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ -imagePullSecrets: [] - -# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ -replicaCount: 1 - -# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ -serviceAccount: - # Specifies whether a service account should be created - create: true - # Automatically mount a ServiceAccount's API credentials? - automount: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "codegate" - -# This is for setting Kubernetes Annotations to a Pod. -# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -podAnnotations: {} -# This is for setting Kubernetes Labels to a Pod. -# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -podLabels: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ -service: - # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - type: ClusterIP - # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports - port: 8989 - - extraServicePorts: - - port: 9090 - targetPort: 9090 - protocol: TCP - name: http-dashboard - - port: 8990 - targetPort: 8990 - protocol: TCP - name: http-copilot-proxy - -# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ -livenessProbe: - httpGet: - path: /health - port: http -readinessProbe: - httpGet: - path: /health - port: http - -# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -# Additional volumes on the output Deployment definition. -volumes: -- name: codegate-volume - persistentVolumeClaim: - claimName: codegate-0 - -# Additional volumeMounts on the output Deployment definition. -volumeMounts: -- mountPath: /app/codegate-volume - name: codegate-volume - -# Creates a PVC for a PV volume for persisting codegate data -# Only 1 PV will be created because codegate is not a statefulset -volumePersistence: - enabled: true - pvcName: codegate-0 - resources: - requests: - storage: 10Gi - storageClassName: gp2 - volumeMode: Filesystem - - -nodeSelector: {} - -tolerations: [] - -affinity: {}