Skip to content
Closed

Main #172

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions charts/collab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
4 changes: 4 additions & 0 deletions charts/collab/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/collab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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://<collab-locator-service-name>.<namespace>.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.
Expand Down
4 changes: 2 additions & 2 deletions charts/intel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions charts/intel/templates/ai-config.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

12 changes: 12 additions & 0 deletions charts/intel/templates/ai-external-secret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

126 changes: 61 additions & 65 deletions charts/intel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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:
Expand Down
20 changes: 8 additions & 12 deletions charts/intel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion charts/live/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion compose/.env-template
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
63 changes: 63 additions & 0 deletions compose/.env-with-keycloak-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# CodeTogether – Environment Template
# -----------------------------------------------------------------------------
# 1. Copy this file to `.env` in the same directory as `compose.yaml`.
# 2. Replace the placeholders on the right‑hand side with your real values.
# 3. Place all SSL certificates and Diffie‑Hellman parameters in the
# `nginx/ssl` directory.
# 4. Configure your SSO provider in the `cthq.properties` file.
# 5. Run `docker‑compose up -d` to start the containers.
#
# Variables (all required unless stated otherwise)
# ----------------------------------------------
# COLLAB_FQDN Public hostname (FQDN) that end‑users hit to reach the
# Collab service (e.g. collab.example.com).
#
# INTEL_FQDN Public hostname (FQDN) for the Intel service
# (e.g. intel.example.com).
#
# INTEL_SECRET Shared secret Collab uses to authenticate when
# communicating with the Intel service. Use a strong,
# private value.
#
# SSL_COLLAB_CERT Certificate filename that Nginx serves for the Collab
# virtual host (e.g. ssl-collab.crt).
#
# SSL_COLLAB_KEY Private key filename for the Collab certificate
# (e.g. ssl-collab.key).
#
# SSL_INTEL_CERT Certificate filename for the Intel virtual host
# (e.g. ssl-intel.crt).
#
# SSL_INTEL_KEY Private key filename for the Intel certificate
# (e.g. ssl-intel.key).
#
# DHPARAM_PEM Diffie‑Hellman parameters file (e.g. dhparam.pem).
###############################################################################

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

KEYCLOAK_FQDN=keycloak.example.com
SSL_KEYCLOAK_CERT=ssl-keycloak.crt
SSL_KEYCLOAK_KEY=ssl-keycloak.key

KEYCLOAK_DB_USERNAME=keycloak
KEYCLOAK_DB_PASSWORD=keycloak

KEYCLOAK_ADMIN_PASSWORD=keycloak
KEYCLOAK_ADMIN=admin

# 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
10 changes: 10 additions & 0 deletions compose/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
data/
nginx/log/
nginx/ssl/*.key
nginx/ssl/*.pem
nginx/ssl/*.crt
keycloak/nginx/log/*.log
keycloak/nginx/ssl/*.key
keycloak/nginx/ssl/*.pem
keycloak/nginx/ssl/*.crt
.env
13 changes: 13 additions & 0 deletions compose/compose.ai.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading