Skip to content

Commit db4a91d

Browse files
nmorenorwgalanciakdanc094codetogetherCodeTogetherKeycloak
authored
Changes for release (#143)
* fix: separate SSL certificates (#101) * fix: Set environment variables via .env file. (#99) * Set environment variables via .env file. * Missing change * Change how hostnames and secret are set. * changes for env template * add env variable resolver on sso redirect value * fix: add env_file to codetogether-intel (#105) * fix: missing CT_HQ_BASE_URL env var (#107) * feat: nginx auto config (#109) * fix: add step for sso provider (#110) * fix: add client_max_body_size to intel (#112) * fix: tweak name of dhparam.pem env var (#113) * tweak name of dhparam.pem env var * fix env var name in nginx template * fix pam to pem * fix: missing env file on collab (#114) * fix: handle nil ai.openai.api_key to prevent template er… (#116) * fix(intel-chart): handle nil ai.openai.api_key to prevent template errors Adjusted the Helm chart template for ai-secrets to avoid referencing ai.openai.api_key and ai.external.api_key when undefined. This fixes a fatal error during `helm template` when AI mode is set to `bundled` and no OpenAI config is present. Ensures compatibility with bundled-only deployments. * Changes to fix workflow issues * fix: cleanup for sso tenants (#117) * feat(intel): add option to disable AI integration entirely (#120) Previously, the Helm chart required either 'bundled' or 'external' AI mode to be configured, making it mandatory to include AI integration. This commit introduces a new flag `ai.enabled` to allow disabling AI features entirely, enabling Intel to be deployed without any AI-related containers or resources. * Change gen ai image name on values file (#122) * fix: bump up version number (#123) * docs: remove outdated metrics section from README (#130) - Removed the section referring to metrics(prometeus), etc from the README Co-authored-by: engineering <engineering@codetogether.com> * fix: add note to env-template file (#127) * fix: update LLM image URL to hub.edge (#132) * docs: add deprecation notice to old Live chart (#131) * 126 automatically configure ollama integration when llm is enabled (#128) * Make sidecar AI container resource block optional in deployment - Updated deployment.yaml to include the `resources` block for the `codetogether-llm` sidecar only if values are defined in values.yaml. - Ensures the bundled AI container can run without specifying resource limits/requests by default. - Improved overall Helm template flexibility for embedded AI mode. - Validated that runs with AI Container embeeded. * Enable support for external AI provider - Updated deployment.yaml to support both bundled and external AI modes, allowing selection via .Values.ai.mode. - Added manifests for external AI integration: - ai-config ConfigMap: defines external provider and URL. - ai-external-secret Secret: stores the external API key. - Verified that external AI mode works by routing requests through the configured external service. * feat: automate creation of external AI ConfigMap and Secret from values.yaml - Added Helm templates to generate ai-config ConfigMap and ai-external-secret Secret automatically when AI external mode is enabled. - ConfigMap values (ai_provider, ai_url) and Secret value (api-key) are now configurable via values.yaml. - Ensured resources are only created when ai.enabled=true and ai.mode=external. * feat: allow use of existing or Helm-managed ai-external-secret in deployment - Updated deployment.yaml to support referencing a user-provided Secret for AI external API key, with fallback to Helm-managed creation. - Added ai-external-secret.yaml template to optionally create the secret from values if not provided. * Fixing helm template validations * Adding values configuration --------- Co-authored-by: engineering <engineering@codetogether.com> * Gen AI Changes (#124) * Change resources of ai * Include gen ai on docker compose. * undo changes * Fix collab helm chart to allow usage of locator. (#134) * fix: invalid values in AI values section (#137) * fix: support automatic configuration of the LLM integration if AI is enabled (#138) * Fixes after Testing (#139) * Fixes after Testing - Refactored deployment.yaml to reference ai.externalSecret.name when create: false - Corrected CT_HQ_OLLAMA_AI_API_KEY key to apiKey to match Secret’s stringData - Updated ai-external-secret.yaml to generate a Secret only when create: true * Bump intel chart version to 1.2.5 * Fix to user http://codetogether-llm:8000/ always --------- Co-authored-by: engineering <engineering@codetogether.com> * Changes to use localhost always to avoid dns issues (#142) Co-authored-by: engineering <engineering@codetogether.com> --------- Co-authored-by: Wojciech Galanciak <wojtek@codetogether.com> Co-authored-by: danc094codetogether <daniel@codetogether.com> Co-authored-by: engineering <engineering@codetogether.com>
1 parent 0d7968e commit db4a91d

File tree

11 files changed

+124
-86
lines changed

11 files changed

+124
-86
lines changed

charts/collab/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ The following table lists configurable parameters of the CodeTogether Collab cha
3636
| `codetogether.noclients` | Disables the `/clients` endpoint if set to `true` | `false` |
3737
| `codetogether.timeZone.enabled` | Enables a customized time zone for the container | `false` |
3838
| `codetogether.timeZone.region` | Time zone region for the container | `America/Chicago` |
39-
| `direct.metrics.statsdEnabled` | Enables StatsD metrics collection | `false` |
40-
| `direct.metrics.statsdHost` | Host for StatsD metrics | `https://my-graphite-fqdn` |
41-
| `direct.metrics.statsdPort` | Port for StatsD metrics | `8125` |
42-
| `direct.metrics.statsdProtocol` | Protocol for StatsD metrics | `UDP` |
43-
| `direct.metrics.prometheusEnabled` | Enables Prometheus metrics collection | `false` |
4439
| `locatorCentral.database.host` | Host for locator-central database | `10.10.0.2` |
4540
| `locatorCentral.database.port` | Port for locator-central database | `3306` |
4641
| `locatorCentral.database.schema` | Schema name for locator-central database | `codetogether` |

charts/collab/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ spec:
9999
{{- if eq .Values.codetogether.mode "locator-edge" }}
100100
- name: CT_LOCATOR
101101
value: {{ .Values.locatorEdge.locator | quote }}
102+
{{- if .Values.locatorEdge.locatorLan }}
103+
- name: CT_LOCATOR_INTERNAL
104+
value: {{ .Values.locatorEdge.locatorLan | quote }}
105+
{{- end }}
102106
- name: CT_REGION
103107
value: {{ .Values.locatorEdge.region | quote }}
104108
{{- end }}

charts/collab/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ locatorCentral:
117117
locatorEdge:
118118
# URL that the Locator is listening on.
119119
locator: "https://codetogether.locator"
120+
# Internal k8s url for the locator service.
121+
# Optional - If not set k8s dns need to know how to resolve the locator url.
122+
# locatorLan: "http://<collab-locator-service-name>.<namespace>.svc.cluster.local:443"
120123
# Optional region which can have CIDR IP address regions assigned to
121124
# allowing regional routing of requests. Only enable if deploying
122125
# CodeTogether to multiple regional data centers.

charts/intel/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: codetogether-intel
33
description: CodeTogether Intel provides advanced project insights for developers
44

55
type: application
6-
version: 1.2.3
7-
appVersion: "2025.1.0"
6+
version: 1.2.5
7+
appVersion: "2025.3.0"
88

99
icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
1010
home: https://www.codetogether.com
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if and .Values.ai.enabled (eq .Values.ai.mode "external") }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: ai-config
6+
namespace: {{ .Release.Namespace }}
7+
data:
8+
ai_provider: {{ .Values.ai.provider | quote }}
9+
ai_url: {{ .Values.ai.url | quote }}
10+
{{- end }}
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- $extSecret := (index .Values.ai "externalSecret" | default dict) }}
2+
{{- if and .Values.ai.enabled (eq .Values.ai.mode "external") (or (not $extSecret.name) $extSecret.create) }}
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: {{ $extSecret.name | default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) }}
7+
namespace: {{ .Release.Namespace }}
8+
type: Opaque
9+
stringData:
10+
apiKey: {{ $extSecret.apiKey | quote }}
11+
{{- end }}
12+

charts/intel/templates/deployment.yaml

Lines changed: 61 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,19 @@ spec:
2828
{{- end }}
2929
serviceAccountName: {{ include "codetogether.serviceAccountName" . }}
3030
containers:
31-
{{- if .Values.ai.enabled }}
32-
{{- if eq .Values.ai.mode "bundled" }}
33-
- name: codetogether-llm
34-
image: "{{ .Values.ai.image.repository }}:{{ .Values.ai.image.tag }}"
35-
imagePullPolicy: Always
36-
ports:
37-
- name: ai
38-
containerPort: 8000
39-
protocol: TCP
40-
resources:
41-
requests:
42-
cpu: {{ .Values.ai.resources.requests.cpu | quote }}
43-
memory: {{ .Values.ai.resources.requests.memory | quote }}
44-
limits:
45-
cpu: {{ .Values.ai.resources.limits.cpu | quote }}
46-
memory: {{ .Values.ai.resources.limits.memory | quote }}
47-
{{- end }}
48-
{{- end }}
4931
- name: {{ .Chart.Name }}
5032
securityContext:
5133
{{- toYaml .Values.securityContext | nindent 12 }}
5234
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
5335
imagePullPolicy: {{ .Values.image.pullPolicy }}
5436
env:
55-
- name: AI_MODE
56-
value: {{ .Values.ai.mode | quote }}
57-
{{- if eq .Values.ai.mode "bundled" }}
58-
- name: AI_BUNDLED_URL
59-
value: "http://codetogether-llm:8000"
60-
{{- end }}
61-
{{- if .Values.ai.enabled }}
62-
{{- if eq .Values.ai.mode "external" }}
37+
- name: AI_MODE
38+
value: {{ .Values.ai.mode | quote }}
39+
{{- if eq .Values.ai.mode "bundled" }}
40+
- name: AI_BUNDLED_URL
41+
value: "http://localhost:8000"
42+
{{- end }}
43+
{{- if and .Values.ai.enabled (eq .Values.ai.mode "external") }}
6344
- name: AI_PROVIDER
6445
valueFrom:
6546
configMapKeyRef:
@@ -73,36 +54,47 @@ spec:
7354
- name: AI_EXTERNAL_API_KEY
7455
valueFrom:
7556
secretKeyRef:
76-
name: ai-external-secret
77-
key: api-key
57+
name: {{ default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) .Values.ai.externalSecret.name | quote }}
58+
key: apiKey
59+
{{- end }}
60+
# Set CodeTogether runtime configuration
61+
- name: CT_HQ_BASE_URL
62+
value: {{ .Values.codetogether.url | quote }}
63+
{{- if .Values.java.customCacerts.enabled }}
64+
- name: CT_TRUST_STORE
65+
value: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
66+
{{- end }}
67+
{{- if .Values.java.customJavaOptions }}
68+
- name: CT_JAVA_OPTIONS
69+
value: "{{ .Values.java.customJavaOptions | default "" }}"
70+
{{- end }}
71+
{{- if and .Values.java.customCacerts.enabled .Values.java.customCacerts.trustStorePasswordKey }}
72+
- name: CT_TRUST_STORE_PASSWD
73+
valueFrom:
74+
secretKeyRef:
75+
name: {{ .Values.java.customCacerts.cacertsSecretName }}
76+
key: {{ .Values.java.customCacerts.trustStorePasswordKey }}
77+
optional: true
78+
{{- end }}
79+
{{- if .Values.ai.enabled }}
80+
- name: CT_HQ_OLLAMA_AI_URL
81+
value: {{ if eq .Values.ai.mode "bundled" }}
82+
"http://localhost:8000"
83+
{{ else }}
84+
{{ .Values.ai.url | quote }}
85+
{{ end }}
86+
- name: CT_HQ_OLLAMA_AI_MODEL_NAME
87+
value: {{ .Values.ai.modelName | default "gemma3:1b" | quote }}
88+
- name: CT_HQ_OLLAMA_AI_API_KEY
89+
{{- if eq .Values.ai.mode "bundled" }}
90+
value: "apiKey"
91+
{{- else }}
92+
valueFrom:
93+
secretKeyRef:
94+
name: {{ default (printf "%s-ai-external-secret" (include "codetogether.fullname" .)) .Values.ai.externalSecret.name | quote }}
95+
key: apiKey
96+
{{- end }}
7897
{{- end }}
79-
{{- end }}
80-
#
81-
# Set CodeTogether runtime configuration
82-
#
83-
- name: CT_HQ_BASE_URL
84-
value: {{ .Values.codetogether.url | quote }}
85-
{{- if .Values.java.customCacerts.enabled }}
86-
- name: CT_TRUST_STORE
87-
value: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
88-
{{- end }}
89-
90-
# Custom Java options (excluding trust store related settings)
91-
{{- if .Values.java.customJavaOptions }}
92-
- name: CT_JAVA_OPTIONS
93-
value: "{{ .Values.java.customJavaOptions | default "" }}"
94-
{{- end }}
95-
96-
# Set trust store password only if trustStorePasswordKey is provided
97-
{{- if and .Values.java.customCacerts.enabled .Values.java.customCacerts.trustStorePasswordKey }}
98-
- name: CT_TRUST_STORE_PASSWD
99-
valueFrom:
100-
secretKeyRef:
101-
name: {{ .Values.java.customCacerts.cacertsSecretName }}
102-
key: {{ .Values.java.customCacerts.trustStorePasswordKey }}
103-
optional: true
104-
{{- end }}
105-
10698
volumeMounts:
10799
- name: properties-volume
108100
mountPath: /opt/codetogether/runtime/cthq.properties
@@ -112,29 +104,20 @@ spec:
112104
mountPath: /etc/ssl/certs/java/cacerts
113105
subPath: cacerts
114106
{{- end }}
115-
116-
#
117-
# Set container configuration
118-
#
119107
ports:
120108
- name: http
121109
containerPort: 1080
122110
protocol: TCP
123-
124111
livenessProbe:
125-
httpGet:
126-
path: /
127-
port: http
128112
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
129113
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
130114
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
131115
successThreshold: {{ .Values.livenessProbe.successThreshold }}
132116
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
133-
readinessProbe:
134117
httpGet:
135118
path: /
136119
port: http
137-
120+
138121
readinessProbe:
139122
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
140123
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
@@ -147,6 +130,19 @@ spec:
147130

148131
resources:
149132
{{- toYaml .Values.resources | nindent 12 }}
133+
{{- if and .Values.ai.enabled (eq .Values.ai.mode "bundled") }}
134+
- name: codetogether-llm
135+
image: "{{ .Values.ai.image.repository }}:{{ .Values.ai.image.tag }}"
136+
imagePullPolicy: Always
137+
ports:
138+
- name: ai
139+
containerPort: 8000
140+
protocol: TCP
141+
{{- if .Values.ai.resources }}
142+
resources:
143+
{{- toYaml .Values.ai.resources | nindent 12 }}
144+
{{- end }}
145+
{{- end }}
150146
volumes:
151147
- name: properties-volume
152148
secret:

charts/intel/values.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,16 @@ securityContext: {}
141141
ai:
142142
enabled: false
143143
mode: "bundled" # Options: bundled | external
144-
provider: "ollama" # No OpenAI dependency
145-
resources:
146-
requests:
147-
cpu: "2"
148-
memory: "4Gi"
149-
gpu: false
150-
limits:
151-
cpu: "4"
152-
memory: "8Gi"
153-
gpu: false
154144
image:
155-
repository: registry.digitalocean.com/codetogether-registry/ai-summarization
145+
repository: hub.edge.codetogether.com/releases/codetogether-llm
156146
tag: latest
157-
147+
# resources: # Recommended resources configuration
148+
# requests:
149+
# cpu: "2"
150+
# memory: "4Gi"
151+
#limits:
152+
# cpu: "4"
153+
#memory: "4Gi"
158154

159155
readinessProbe:
160156
initialDelaySeconds: 60

charts/live/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# README.md Helm Chart for CodeTogether Live
2+
# CodeTogether Live Chart (Legacy)
23

3-
## Summary
4+
> **⚠️ Legacy Chart**
5+
> This chart is now considered legacy and is not longer supported, is not recommended for new deployments.
46
7+
## Summary
58
This chart creates a CodeTogether Live server deployment on a Kubernetes cluster using the Helm package manager.
69

710
## Prerequisites

compose/.env-template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ COLLAB_FQDN=collab.example.com
3939
INTEL_FQDN=intel.example.com
4040
INTEL_SECRET=super-secret-string
4141

42+
# SSL cerfificate files should be placed in the `nginx/ssl` directory.
4243
SSL_COLLAB_CERT=ssl-collab.crt
4344
SSL_COLLAB_KEY=ssl-collab.key
4445

4546
SSL_INTEL_CERT=ssl-intel.crt
4647
SSL_INTEL_KEY=ssl-intel.key
4748

48-
DHPARAM_PEM=dhparam.pem
49+
DHPARAM_PEM=dhparam.pem
50+
51+
# Uncomment the following lines to enable AI integration with Ollama
52+
#CT_HQ_OLLAMA_AI_URL=http://codetogether-llm:8000
53+
#CT_HQ_OLLAMA_AI_MODEL_NAME=gemma3:1b

0 commit comments

Comments
 (0)