diff --git a/charts/collab/README.md b/charts/collab/README.md index 621f5a5..f235f45 100644 --- a/charts/collab/README.md +++ b/charts/collab/README.md @@ -36,11 +36,6 @@ The following table lists configurable parameters of the CodeTogether Collab cha | `codetogether.noclients` | Disables the `/clients` endpoint if set to `true` | `false` | | `codetogether.timeZone.enabled` | Enables a customized time zone for the container | `false` | | `codetogether.timeZone.region` | Time zone region for the container | `America/Chicago` | -| `direct.metrics.statsdEnabled` | Enables StatsD metrics collection | `false` | -| `direct.metrics.statsdHost` | Host for StatsD metrics | `https://my-graphite-fqdn` | -| `direct.metrics.statsdPort` | Port for StatsD metrics | `8125` | -| `direct.metrics.statsdProtocol` | Protocol for StatsD metrics | `UDP` | -| `direct.metrics.prometheusEnabled` | Enables Prometheus metrics collection | `false` | | `locatorCentral.database.host` | Host for locator-central database | `10.10.0.2` | | `locatorCentral.database.port` | Port for locator-central database | `3306` | | `locatorCentral.database.schema` | Schema name for locator-central database | `codetogether` | diff --git a/charts/collab/templates/deployment.yaml b/charts/collab/templates/deployment.yaml index 7c08ca3..689f562 100644 --- a/charts/collab/templates/deployment.yaml +++ b/charts/collab/templates/deployment.yaml @@ -99,6 +99,10 @@ spec: {{- if eq .Values.codetogether.mode "locator-edge" }} - name: CT_LOCATOR value: {{ .Values.locatorEdge.locator | quote }} + {{- if .Values.locatorEdge.locatorLan }} + - name: CT_LOCATOR_INTERNAL + value: {{ .Values.locatorEdge.locatorLan | quote }} + {{- end }} - name: CT_REGION value: {{ .Values.locatorEdge.region | quote }} {{- end }} diff --git a/charts/collab/values.yaml b/charts/collab/values.yaml index 04a4d89..b05bde9 100644 --- a/charts/collab/values.yaml +++ b/charts/collab/values.yaml @@ -117,6 +117,9 @@ locatorCentral: locatorEdge: # URL that the Locator is listening on. locator: "https://codetogether.locator" + # Internal k8s url for the locator service. + # Optional - If not set k8s dns need to know how to resolve the locator url. + # locatorLan: "http://..svc.cluster.local:443" # Optional region which can have CIDR IP address regions assigned to # allowing regional routing of requests. Only enable if deploying # CodeTogether to multiple regional data centers. diff --git a/charts/intel/Chart.yaml b/charts/intel/Chart.yaml index a63a302..23c312a 100644 --- a/charts/intel/Chart.yaml +++ b/charts/intel/Chart.yaml @@ -3,8 +3,8 @@ name: codetogether-intel description: CodeTogether Intel provides advanced project insights for developers type: application -version: 1.2.3 -appVersion: "2025.1.0" +version: 1.2.5 +appVersion: "2025.3.0" icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png home: https://www.codetogether.com diff --git a/charts/intel/templates/ai-config.yaml b/charts/intel/templates/ai-config.yaml new file mode 100644 index 0000000..763fedb --- /dev/null +++ b/charts/intel/templates/ai-config.yaml @@ -0,0 +1,11 @@ +{{- if and .Values.ai.enabled (eq .Values.ai.mode "external") }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: ai-config + namespace: {{ .Release.Namespace }} +data: + ai_provider: {{ .Values.ai.provider | quote }} + ai_url: {{ .Values.ai.url | quote }} +{{- end }} + diff --git a/charts/intel/templates/ai-external-secret.yaml b/charts/intel/templates/ai-external-secret.yaml new file mode 100644 index 0000000..b01e8ad --- /dev/null +++ b/charts/intel/templates/ai-external-secret.yaml @@ -0,0 +1,12 @@ +{{- $extSecret := (index .Values.ai "externalSecret" | default dict) }} +{{- if and .Values.ai.enabled (eq .Values.ai.mode "external") (or (not $extSecret.name) $extSecret.create) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ $extSecret.name | default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) }} + namespace: {{ .Release.Namespace }} +type: Opaque +stringData: + apiKey: {{ $extSecret.apiKey | quote }} +{{- end }} + diff --git a/charts/intel/templates/deployment.yaml b/charts/intel/templates/deployment.yaml index 9c0d7e0..8cdb59e 100644 --- a/charts/intel/templates/deployment.yaml +++ b/charts/intel/templates/deployment.yaml @@ -28,38 +28,19 @@ spec: {{- end }} serviceAccountName: {{ include "codetogether.serviceAccountName" . }} containers: - {{- if .Values.ai.enabled }} - {{- if eq .Values.ai.mode "bundled" }} - - name: codetogether-llm - image: "{{ .Values.ai.image.repository }}:{{ .Values.ai.image.tag }}" - imagePullPolicy: Always - ports: - - name: ai - containerPort: 8000 - protocol: TCP - resources: - requests: - cpu: {{ .Values.ai.resources.requests.cpu | quote }} - memory: {{ .Values.ai.resources.requests.memory | quote }} - limits: - cpu: {{ .Values.ai.resources.limits.cpu | quote }} - memory: {{ .Values.ai.resources.limits.memory | quote }} - {{- end }} - {{- end }} - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: AI_MODE - value: {{ .Values.ai.mode | quote }} - {{- if eq .Values.ai.mode "bundled" }} - - name: AI_BUNDLED_URL - value: "http://codetogether-llm:8000" - {{- end }} - {{- if .Values.ai.enabled }} - {{- if eq .Values.ai.mode "external" }} + - name: AI_MODE + value: {{ .Values.ai.mode | quote }} + {{- if eq .Values.ai.mode "bundled" }} + - name: AI_BUNDLED_URL + value: "http://localhost:8000" + {{- end }} + {{- if and .Values.ai.enabled (eq .Values.ai.mode "external") }} - name: AI_PROVIDER valueFrom: configMapKeyRef: @@ -73,36 +54,47 @@ spec: - name: AI_EXTERNAL_API_KEY valueFrom: secretKeyRef: - name: ai-external-secret - key: api-key + name: {{ default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) .Values.ai.externalSecret.name | quote }} + key: apiKey + {{- end }} + # Set CodeTogether runtime configuration + - name: CT_HQ_BASE_URL + value: {{ .Values.codetogether.url | quote }} + {{- if .Values.java.customCacerts.enabled }} + - name: CT_TRUST_STORE + value: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts + {{- end }} + {{- if .Values.java.customJavaOptions }} + - name: CT_JAVA_OPTIONS + value: "{{ .Values.java.customJavaOptions | default "" }}" + {{- end }} + {{- if and .Values.java.customCacerts.enabled .Values.java.customCacerts.trustStorePasswordKey }} + - name: CT_TRUST_STORE_PASSWD + valueFrom: + secretKeyRef: + name: {{ .Values.java.customCacerts.cacertsSecretName }} + key: {{ .Values.java.customCacerts.trustStorePasswordKey }} + optional: true + {{- end }} + {{- if .Values.ai.enabled }} + - name: CT_HQ_OLLAMA_AI_URL + value: {{ if eq .Values.ai.mode "bundled" }} + "http://localhost:8000" + {{ else }} + {{ .Values.ai.url | quote }} + {{ end }} + - name: CT_HQ_OLLAMA_AI_MODEL_NAME + value: {{ .Values.ai.modelName | default "gemma3:1b" | quote }} + - name: CT_HQ_OLLAMA_AI_API_KEY + {{- if eq .Values.ai.mode "bundled" }} + value: "apiKey" + {{- else }} + valueFrom: + secretKeyRef: + name: {{ default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) .Values.ai.externalSecret.name | quote }} + key: apiKey + {{- end }} {{- end }} - {{- end }} - # - # Set CodeTogether runtime configuration - # - - name: CT_HQ_BASE_URL - value: {{ .Values.codetogether.url | quote }} - {{- if .Values.java.customCacerts.enabled }} - - name: CT_TRUST_STORE - value: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts - {{- end }} - - # Custom Java options (excluding trust store related settings) - {{- if .Values.java.customJavaOptions }} - - name: CT_JAVA_OPTIONS - value: "{{ .Values.java.customJavaOptions | default "" }}" - {{- end }} - - # Set trust store password only if trustStorePasswordKey is provided - {{- if and .Values.java.customCacerts.enabled .Values.java.customCacerts.trustStorePasswordKey }} - - name: CT_TRUST_STORE_PASSWD - valueFrom: - secretKeyRef: - name: {{ .Values.java.customCacerts.cacertsSecretName }} - key: {{ .Values.java.customCacerts.trustStorePasswordKey }} - optional: true - {{- end }} - volumeMounts: - name: properties-volume mountPath: /opt/codetogether/runtime/cthq.properties @@ -112,29 +104,20 @@ spec: mountPath: /etc/ssl/certs/java/cacerts subPath: cacerts {{- end }} - - # - # Set container configuration - # ports: - name: http containerPort: 1080 protocol: TCP - livenessProbe: - httpGet: - path: / - port: http initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} successThreshold: {{ .Values.livenessProbe.successThreshold }} failureThreshold: {{ .Values.livenessProbe.failureThreshold }} - readinessProbe: httpGet: path: / port: http - + readinessProbe: initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} @@ -147,6 +130,19 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} + {{- if and .Values.ai.enabled (eq .Values.ai.mode "bundled") }} + - name: codetogether-llm + image: "{{ .Values.ai.image.repository }}:{{ .Values.ai.image.tag }}" + imagePullPolicy: Always + ports: + - name: ai + containerPort: 8000 + protocol: TCP + {{- if .Values.ai.resources }} + resources: + {{- toYaml .Values.ai.resources | nindent 12 }} + {{- end }} + {{- end }} volumes: - name: properties-volume secret: diff --git a/charts/intel/values.yaml b/charts/intel/values.yaml index 04507b2..5587d5f 100644 --- a/charts/intel/values.yaml +++ b/charts/intel/values.yaml @@ -141,20 +141,16 @@ securityContext: {} ai: enabled: false mode: "bundled" # Options: bundled | external - provider: "ollama" # No OpenAI dependency - resources: - requests: - cpu: "2" - memory: "4Gi" - gpu: false - limits: - cpu: "4" - memory: "8Gi" - gpu: false image: - repository: registry.digitalocean.com/codetogether-registry/ai-summarization + repository: hub.edge.codetogether.com/releases/codetogether-llm tag: latest - +# resources: # Recommended resources configuration + # requests: + # cpu: "2" + # memory: "4Gi" + #limits: + # cpu: "4" + #memory: "4Gi" readinessProbe: initialDelaySeconds: 60 diff --git a/charts/live/README.md b/charts/live/README.md index 76048f3..b8cbf31 100644 --- a/charts/live/README.md +++ b/charts/live/README.md @@ -1,7 +1,10 @@ # README.md Helm Chart for CodeTogether Live +# CodeTogether Live Chart (Legacy) -## Summary +> **⚠️ Legacy Chart** +> This chart is now considered legacy and is not longer supported, is not recommended for new deployments. +## Summary This chart creates a CodeTogether Live server deployment on a Kubernetes cluster using the Helm package manager. ## Prerequisites diff --git a/compose/.env-template b/compose/.env-template index c88f162..82fa77c 100644 --- a/compose/.env-template +++ b/compose/.env-template @@ -39,10 +39,15 @@ COLLAB_FQDN=collab.example.com INTEL_FQDN=intel.example.com INTEL_SECRET=super-secret-string +# SSL cerfificate files should be placed in the `nginx/ssl` directory. SSL_COLLAB_CERT=ssl-collab.crt SSL_COLLAB_KEY=ssl-collab.key SSL_INTEL_CERT=ssl-intel.crt SSL_INTEL_KEY=ssl-intel.key -DHPARAM_PEM=dhparam.pem \ No newline at end of file +DHPARAM_PEM=dhparam.pem + +# Uncomment the following lines to enable AI integration with Ollama +#CT_HQ_OLLAMA_AI_URL=http://codetogether-llm:8000 +#CT_HQ_OLLAMA_AI_MODEL_NAME=gemma3:1b diff --git a/compose/compose.ai.yaml b/compose/compose.ai.yaml new file mode 100644 index 0000000..d3ef932 --- /dev/null +++ b/compose/compose.ai.yaml @@ -0,0 +1,13 @@ +# 👇 Rename `.env-template` to `.env` before running this file +# Set the appropriate values once renamed +services: + ai: + image: hub.edge.codetogether.com/releases/codetogether-llm:latest + container_name: codetogether-llm + ports: + - "8000:8000" + networks: + - codetogethernet + depends_on: + codetogether-intel: + condition: service_healthy \ No newline at end of file