Skip to content

Conversation

@danc094codetogether
Copy link
Contributor

No description provided.

wgalanciak and others added 30 commits May 7, 2025 19:53
* 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
* tweak name of dhparam.pem env var

* fix env var name in nginx template

* fix pam to pem
* 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
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.
- Removed the section referring to metrics(prometeus), etc from the README

Co-authored-by: engineering <[email protected]>
)

* 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 <[email protected]>
* Change resources of ai

* Include gen ai on docker compose.

* undo changes
* 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 <[email protected]>
* initial config

* Docker compose example to run keycloak

---------

Co-authored-by: Ignacio Moreno <[email protected]>
* initial config

* Docker compose example to run keycloak

* Undo properties file change

* fixes on properties file

---------

Co-authored-by: Wojciech Galanciak <[email protected]>
* initial config

* Docker compose example to run keycloak

* Undo properties file change

* fixes on properties file

---------

Co-authored-by: Wojciech Galanciak <[email protected]>
danc094codetogether and others added 29 commits September 24, 2025 12:10
Removed initContainers configuration for read-only mode.
…oup (#178)

* OpenShit Teting Commit

* Intel Changes

* Fixes

* Fixes

* Fix

* feat(charts): OpenShift compatibility + read-only rootfs support for collab & intel

Fixes: #177

This change makes the codetogether-collab and codetogether-intel charts work
out-of-the-box on both vanilla Kubernetes and OpenShift (restricted-v2 SCC),
and adds first-class support for readOnlyRootFilesystem via init containers.

Key changes
-----------
Collab
- Add initContainer `prepare-volatile` to create writable runtime paths when
  readOnlyRootFilesystem=true (e.g., /run, /var/log/nginx, /var/cache/nginx,
  and the existing /run/volatile/* tree).
- Conditionally handle OpenShift vs vanilla:
  - OpenShift: do NOT set runAsUser/runAsGroup/fsGroup; let SCC assign UIDs.
    Keep runAsNonRoot and disallow privilege escalation. Avoid chown.
    Use `install -d -m 0775/2775` for group-write with sticky set as needed.
  - Vanilla: init runs as root (UID 0) to chown created dirs to the non-root
    runtime user (defaults to 1000:1000); main container runs non-root.
- When readOnlyRootFilesystem=true:
  - Mount EmptyDir volumes to /run, /tmp (Memory), /var/log/nginx, /var/cache/nginx.
  - Add matching volumeMounts.
- Keep probes and ports unchanged.
- Values: add/clarify `openshift.enabled` flag, securityContext defaults,
  imageCredentials usage, and sample values for both environments.

Intel
- Add initContainer `prepare-runtime` to create /var/log/nginx and
  /var/cache/nginx and make them writable under read-only rootfs.
- Same OpenShift vs vanilla split as collab (no explicit UID/GID on OCP;
  root init + non-root app for vanilla).
- Mount EmptyDir + volumeMounts for /run, /tmp (Memory), /var/log/nginx,
/var/cache/nginx when readOnlyRootFilesystem=true.
- Preserve existing envs (AI mode, HQ base URL, Java options, etc.).

Why
---
- Fixes SCC denials on OpenShift when explicit runAsUser/fsGroup were set.
- Fixes initContainer permission errors (e.g., "Operation not permitted" on /run)
  by avoiding chown on OpenShift and using 2775 with umask 002.
- Enables secure read-only rootfs operation by provisioning necessary
  writable paths via EmptyDir.

Testing
-------
- OpenShift 4.x:
  - `openshift.enabled=true`, remove fsGroup=0, do not set runAsUser/runAsGroup.
  - initContainers succeed; pods transition to Running.
- Vanilla (DigitalOcean Kubernetes):
  - `openshift.enabled=false`, readOnlyRootFilesystem=true.
  - init runs as root, chowns to 1000:1000; app runs as non-root.
  - Pods healthy; readiness/liveness OK.

Breaking changes
----------------
- None functionally; however, when enabling readOnlyRootFilesystem, the chart
  now requires the EmptyDir mounts (added by default when the flag is true).

* Testing

* fix(openshift): make Intel/Collab charts run on OpenShift; verified in-cluster

Fixes: #177

- Validated (same OpenShift env)
- This change fixes the customer’s OpenShift issue.
Removed volumeMounts configuration for properties-volume.
Changed the medium of the codetogether-tmp volume from 'Memory' to an empty object.
Fixes: #180

- Render clients url when codetogether.customClientsUrl
Removed run-nginx volume mount from deployment.
Updated volume mounts and volumes to use memory medium for tmp and run-volatile.
* feat(helm): add warning log when deprecated AV settings are detected

Fixes: #192

- Added a startup warning when any Audio/Video related values
  (av.enabled, av.serverIP, av.stunServers, av.jitsiUrl) are present
  in Helm chart configurations.
- Ensures deployments are notified that built in A/V support is no
  longer available.
- No functional behavior changed, only logs a warning at container start.

* chore: add AV deprecation warning and clean up env vars

- Add Helm NOTES warning when AV related values are configured
- Remove unused CT_AV_DEPRECATED_WARNING environment variable from Deployment
- Keep AV env configuration minimal while clearly signaling that A/V is no longer supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants