Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
ca1b560
fix: separate SSL certificates (#101)
wgalanciak May 7, 2025
b64df46
fix: Set environment variables via .env file. (#99)
nmorenor May 8, 2025
2c6b287
fix: add env_file to codetogether-intel (#105)
wgalanciak May 10, 2025
2605843
fix: missing CT_HQ_BASE_URL env var (#107)
wgalanciak May 12, 2025
fb116ee
feat: nginx auto config (#109)
wgalanciak May 12, 2025
4d79a6d
fix: add step for sso provider (#110)
wgalanciak May 12, 2025
063a4eb
fix: add client_max_body_size to intel (#112)
wgalanciak May 12, 2025
d665be1
fix: tweak name of dhparam.pem env var (#113)
wgalanciak May 12, 2025
56d5eee
fix: missing env file on collab (#114)
nmorenor May 12, 2025
f21332a
fix: handle nil ai.openai.api_key to prevent template er… (#116)
danc094codetogether May 12, 2025
11960dd
fix: cleanup for sso tenants (#117)
wgalanciak May 12, 2025
9cd2f48
feat(intel): add option to disable AI integration entirely (#120)
danc094codetogether May 16, 2025
c7bee30
Change gen ai image name on values file (#122)
nmorenor Jun 10, 2025
75c414f
fix: bump up version number (#123)
nmorenor Jun 10, 2025
aacad57
docs: remove outdated metrics section from README (#130)
danc094codetogether Jun 16, 2025
23ddc3e
fix: add note to env-template file (#127)
nmorenor Jun 17, 2025
447a8a7
fix: update LLM image URL to hub.edge (#132)
danc094codetogether Jun 18, 2025
61a8250
docs: add deprecation notice to old Live chart (#131)
danc094codetogether Jun 18, 2025
d4665b0
126 automatically configure ollama integration when llm is enabled (#…
danc094codetogether Jun 18, 2025
9e1cae0
Gen AI Changes (#124)
nmorenor Jun 18, 2025
4fab2ad
Fix collab helm chart to allow usage of locator. (#134)
nmorenor Jun 18, 2025
8033f54
fix: invalid values in AI values section (#137)
wgalanciak Jun 30, 2025
5547e74
fix: support automatic configuration of the LLM integration if AI is …
wgalanciak Jun 30, 2025
6e96ea7
Fixes after Testing (#139)
danc094codetogether Jun 30, 2025
b55b89c
Changes to use localhost always to avoid dns issues (#142)
nmorenor Jun 30, 2025
ea40024
Merge branch 'main' into dev
nmorenor Jun 30, 2025
c481aed
feat: support for optional keycloak deployment (#145)
wgalanciak Jul 10, 2025
40dffd5
144 keycloak (#146)
nmorenor Jul 10, 2025
502eb16
144 keycloak (#147)
nmorenor Jul 10, 2025
f3790b8
144 keycloak (#149)
nmorenor Jul 10, 2025
a044e60
fixes on properties file
nmorenor Jul 10, 2025
98cd5b5
Prepare examples for deployment with keycloak.
nmorenor Jul 10, 2025
0191fcd
move files
nmorenor Jul 10, 2025
65d2a48
feat(charts, compose): add CT_TRUST_ALL_CERTS support (#158)
danc094codetogether Jul 21, 2025
5f5741c
feat(chart): guard `ai-secrets` template behind `ai.enabled` (#161)
danc094codetogether Aug 11, 2025
264c8e4
fix: improve keycloak compose health check (#162)
nmorenor Aug 12, 2025
ecf00a4
fix(helm/intel): scope AI resources per-release to avoid cross-releas…
danc094codetogether Aug 27, 2025
b7f92f8
chore(keycloak): switch to KC_BOOTSTRAP_* admin vars and update compo…
danc094codetogether Sep 5, 2025
2256e9d
feat(helm): add RO rootfs support for Intel and Collab (#169)
danc094codetogether Sep 18, 2025
54402d5
feat(helm-collab): Support optional existing secret for Intel connect…
danc094codetogether Sep 18, 2025
fd6aec4
Merge branch 'main' into dev
danc094codetogether Sep 18, 2025
d382f96
collab, intel: align read-only handling with live legacy chart (#175)
danc094codetogether Sep 24, 2025
5bfed1d
Bump version from 1.2.5 to 1.2.6
danc094codetogether Sep 24, 2025
7a46a70
Bump version to 1.2.3 in Chart.yaml
danc094codetogether Sep 24, 2025
3c5c184
Merge branch 'main' into dev
danc094codetogether Sep 24, 2025
8ca5b5d
Fix indentation in deployment.yaml
danc094codetogether Sep 24, 2025
71c7bdf
Remove initContainers for readOnlyMode
danc094codetogether Sep 24, 2025
6d3ed2a
Bump version from 1.2.6 to 1.2.7
danc094codetogether Sep 25, 2025
75aa28f
Bump version from 1.2.3 to 1.2.4
danc094codetogether Sep 25, 2025
dc6854c
177 collab intel rofs on open shift avoid run as user 0 support fs gr…
danc094codetogether Oct 1, 2025
0bfa15d
Allow to set the CT_CUSTOM_CLIENTS_ORIGIN env variable.
nmorenor Oct 1, 2025
f914f00
fix env variable name
nmorenor Oct 2, 2025
f66443d
Allow to add custom ide location url (#184)
nmorenor Oct 2, 2025
f22274c
Merge branch 'main' into dev
danc094codetogether Oct 2, 2025
29e56fb
Remove volumeMounts for readOnlyRootFilesystem
danc094codetogether Oct 2, 2025
d489e34
Update codetogether-tmp volume medium configuration
danc094codetogether Oct 2, 2025
235a2dd
Simplify emptyDir volume definition in deployment.yaml
danc094codetogether Oct 2, 2025
0c577f7
Update version and appVersion in Chart.yaml
danc094codetogether Oct 2, 2025
a9aa401
refactor(helm): decouple customClientsUrl from AI config (#187)
danc094codetogether Oct 15, 2025
b38154c
Bump version and appVersion in Chart.yaml
danc094codetogether Oct 15, 2025
eb0923f
Bump version and appVersion in Chart.yaml
danc094codetogether Oct 15, 2025
6864944
Merge branch 'main' into dev
danc094codetogether Oct 15, 2025
d7781b9
fix: enable read-only FS support (#189)
danc094codetogether Nov 18, 2025
aa788ea
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 18, 2025
f7c5c32
Bump version to 1.2.7 and appVersion to 2025.4.2
danc094codetogether Nov 18, 2025
264abe2
Merge branch 'main' into dev
danc094codetogether Nov 18, 2025
261565d
Remove run-nginx volume mount
danc094codetogether Nov 18, 2025
cb24f6f
Add run-volatile mount and volume to deployment.yaml
danc094codetogether Nov 27, 2025
4f8670b
Refactor deployment.yaml for memory-backed volumes
danc094codetogether Nov 27, 2025
8fbe8b3
feat: add warning log when deprecated AV settings are detected (#193)
danc094codetogether Nov 27, 2025
42d4167
192 add warning log when av related helm values are detected (#194)
danc094codetogether Nov 28, 2025
6416900
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 28, 2025
bfc07e0
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 28, 2025
6df6ba1
Merge branch 'main' into dev
danc094codetogether Nov 28, 2025
1df2081
fix(intel-chart): ensure Ingress v1 + pathType for modern Kubernetes …
danc094codetogether Jan 23, 2026
5c14696
feat(helm): add optional service annotations to collab chart Service …
danc094codetogether Feb 10, 2026
b9918b1
Bump version and appVersion in Chart.yaml
danc094codetogether Feb 10, 2026
2384e38
Merge branch 'main' into dev
danc094codetogether Feb 10, 2026
9a6874d
Bump version and appVersion in Chart.yaml
danc094codetogether Feb 10, 2026
bb4dbaa
feat(helm): add configurable initContainers (startup containers) to I…
danc094codetogether Feb 18, 2026
af2e7a0
feat: add configurable initContainers to collab helm chart (#204)
danc094codetogether Feb 23, 2026
ebeab76
Add dedicated Keycloak readiness gate to prevent Intel starting too e…
danc094codetogether Mar 5, 2026
a64d856
Support adding extra volume mounts via the values.yml file in Helm
TimWebb Mar 20, 2026
2e4fa51
Add extraContainers support for sidecar injection (#206)
danc094codetogether Mar 23, 2026
3f285f5
Merge branch 'main' into dev
danc094codetogether Mar 23, 2026
673c1e1
feat: make health probe path/port configurable (v1.3.5) (#208)
danc094codetogether Apr 9, 2026
358b209
Merge branch 'main' into dev
danc094codetogether Apr 9, 2026
1f6b30b
This is a test
danc094codetogether May 18, 2026
662b9bd
This is a test
danc094codetogether May 18, 2026
7c64b0f
Testing
danc094codetogether May 18, 2026
dc154d4
Publish/codetogether ai helm chart (#212)
danc094codetogether Jun 30, 2026
b4a77e8
Remove local MCP config and test artifacts from dev.
danc094codetogether Jun 30, 2026
08b0b2f
[codex] AITRAX-581 support immutable standalone Live images (#215)
CodeTogetherBot Jul 22, 2026
31382a1
AITRAX-2721: codetogether-ai chart - Gateway API (HTTPRoute) and clie…
CodeTogetherBot Oct 20, 2026
4fe445f
AITRAX-2721: codetogether-ai chart 0.2.1 - appVersion 1.2.8165 (#218)
CodeTogetherBot Oct 20, 2026
e1e3da9
AITRAX-2721: codetogether-ai chart 0.2.2 - keep helm upgrade --reuse-…
CodeTogetherBot Oct 20, 2026
6374cb9
AITRAX-2853: codetogether-ai chart 0.2.3 - optional Gateway API Liste…
CodeTogetherBot Nov 2, 2026
81657a3
AITRAX-2853: fail when gateway.listenerSet.enabled is set without gat…
CodeTogetherBot Nov 2, 2026
31c6d20
AITRAX-2853: codetogether-ai chart 0.2.3 - appVersion 1.2.8616 (#225)
CodeTogetherBot Nov 5, 2026
1ee6cb4
Merge pull request #228 from CodeTogether-Inc/main
CodeTogetherBot Nov 5, 2026
eca8de8
AITRAX-2881: codetogether-collab chart 1.3.0 - optional Gateway API H…
CodeTogetherBot Nov 9, 2026
23a71c2
AITRAX-2881: collab README - adopt the hand-applied HTTPRoute too (#231)
CodeTogetherBot Nov 9, 2026
1aa810a
AITRAX-2921: codetogether-ai chart 0.2.4 - deploymentStrategy, old po…
CodeTogetherBot Nov 12, 2026
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
49 changes: 49 additions & 0 deletions .github/workflows/helm-template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ jobs:
- name: Validate Collab Chart
run: |
helm template collab ./charts/collab --values ./charts/collab/values.yaml
# Gateway API: HTTPRoute on an existing Gateway listener
helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set ingress.enabled=false \
--set gateway.enabled=true \
--set 'gateway.parentRefs[0].name=shared-gateway' \
--set 'gateway.parentRefs[0].namespace=gateway-system' \
--api-versions gateway.networking.k8s.io/v1/HTTPRoute
# ListenerSet on a shared Gateway; the HTTPRoute attaches to it
helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set ingress.enabled=false \
--set gateway.enabled=true \
--set gateway.listenerSet.enabled=true \
--set gateway.listenerSet.parentRef.name=shared-gateway \
--set gateway.listenerSet.parentRef.namespace=gateway-system \
--api-versions gateway.networking.k8s.io/v1/HTTPRoute \
--api-versions gateway.networking.k8s.io/v1/ListenerSet \
> /tmp/collab-listenerset.yaml
grep -q '^kind: ListenerSet$' /tmp/collab-listenerset.yaml
grep -q 'kind: ListenerSet$' <(sed -n '/^kind: HTTPRoute$/,/^---/p' /tmp/collab-listenerset.yaml)
# listenerSet without gateway.enabled must fail instead of rendering nothing
if helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set gateway.listenerSet.enabled=true \
--set gateway.listenerSet.parentRef.name=shared-gateway > /tmp/collab-ls-no-gw.out 2>&1; then
echo "listenerSet without gateway.enabled rendered" >&2; exit 1
fi
grep -q 'requires gateway.enabled=true' /tmp/collab-ls-no-gw.out
# helm upgrade --reuse-values from a chart without `gateway` drops the key
helm template collab ./charts/collab --values ./charts/collab/values.yaml --set gateway=null

- name: Validate HQ Chart
run: |
Expand Down Expand Up @@ -85,6 +113,27 @@ jobs:
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--set gateway=null
# Rollout strategy: the default, what --reuse-values from a chart
# before 0.2.4 leaves (no deploymentStrategy), and a Recreate override.
ai_strategy() {
helm template test ./charts/ai \
--set-file ctaiPropertiesFile=./charts/ai/ctai-configuration.properties.template \
--set service.fqdn=https://example.codetogether.io \
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--show-only templates/deployment.yaml "$@" \
| sed -n '/^ strategy:$/,/^ selector:$/p'
}
default_strategy="$(ai_strategy)"
grep -q 'type: RollingUpdate' <<<"$default_strategy"
grep -q 'maxSurge: 0' <<<"$default_strategy"
grep -q 'maxUnavailable: 1' <<<"$default_strategy"
[ "$(ai_strategy --set deploymentStrategy=null)" = "$default_strategy" ]
recreate_strategy="$(ai_strategy --set deploymentStrategy.type=Recreate --set deploymentStrategy.rollingUpdate=null)"
grep -q 'type: Recreate' <<<"$recreate_strategy"
if grep -q 'rollingUpdate' <<<"$recreate_strategy"; then
echo "Recreate rendered rollingUpdate" >&2; exit 1
fi

- name: Validate Live Chart
run: |
Expand Down
2 changes: 1 addition & 1 deletion charts/ai/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: codetogether-ai
description: CodeTogether AI on-premises Kubernetes deployment

type: application
version: 0.2.3
version: 0.2.4
appVersion: "1.2.8616"

icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
Expand Down
97 changes: 97 additions & 0 deletions charts/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,58 @@ If login fails after returning from Google or another identity provider with
and that the registered OAuth redirect URI exactly matches
`{service_fqdn}/api/v1/auth/sso/provider/callback`.

### What the container image contains

The image is built on [Wolfi](https://github.com/wolfi-dev), a minimal Linux
distribution, and runs as the non-root user `ctai` (uid and gid `2200`).

- Shell and tools: `bash`, BusyBox `sh` (`/bin/sh`), `curl`, `ps`, `top`,
`ping`, `netstat`, `vi`, `less`, and the GNU core utilities. `ss`, `ip`,
`openssl` and `dig` are not included.
- Java: OpenJDK 25 with its tools (`jcmd`, `jstack`, `jmap`, `jfr`,
`keytool`). `JAVA_HOME` is `/usr/lib/jvm/default-jvm`, and the JDK's trust
store is `/etc/ssl/certs/java/cacerts`.
- Packages: the package manager is `apk`. It needs root, so it cannot install
anything in the running container. An image built `FROM` this one installs
packages with `apk add` as root before switching back to `USER 2200`.

### Inspect a running pod

`kubectl exec` is enough for the tools above:

```bash
kubectl exec -it -n codetogether-ai deploy/codetogether-ai -c codetogether-ai -- bash
```

For a tool the image does not have, attach an ephemeral debug container. It
shares the application's process namespace and network, so it sees the Java
process, its files under `/proc/<pid>/root` and `localhost`, and nothing
restarts. Use kubectl 1.32 or later, and any image your cluster can pull:

```bash
POD=$(kubectl get pod -n codetogether-ai -l app.kubernetes.io/name=codetogether-ai -o name | head -1)
kubectl debug -it -n codetogether-ai "$POD" \
--image=<a debugging image> \
--target=codetogether-ai --profile=general -c debug -- sh
```

If the namespace enforces the Pod Security `restricted` profile, which does not
allow a root debug container, use the CodeTogether AI image itself as the debug
image and run it as the application's user. The image names its user (`ctai`),
so the numeric uid has to be given:

```bash
echo '{"securityContext":{"runAsUser":2200,"runAsGroup":2200}}' > uid2200.json
IMAGE=$(kubectl get "$POD" -n codetogether-ai -o jsonpath='{.spec.containers[0].image}')
kubectl debug -it -n codetogether-ai "$POD" --image="$IMAGE" \
--target=codetogether-ai --profile=restricted --custom=uid2200.json \
-c debug-app -- bash
```

An ephemeral container stays in the pod's spec until the pod is replaced, and
each one needs a new name (`-c`). The process environment and the mounted
properties file contain secrets: do not paste them into tickets or chat.

## Upgrade

```bash
Expand All @@ -399,6 +451,51 @@ helm upgrade codetogether-ai codetogether/codetogether-ai \

The Deployment rolls when the chart-managed properties Secret changes.

### Rollout strategy

From chart 0.2.4 the Deployment stops the old pod before it starts the new one
(`deploymentStrategy`: `RollingUpdate` with `maxSurge: 0`, `maxUnavailable: 1`).
On a single replica an upgrade therefore has a short outage while the new pod
starts. Earlier charts used the Kubernetes default, which starts the new pod
first.

The pods of one release share an embedded Hazelcast cluster, and a pod only
joins a cluster that runs its own Hazelcast minor version. When a release
changes that version (the release notes say so), any old pod still running
makes the new pod fail to join: its container exits and restarts in a loop, and
the rollout never completes while the old pods keep serving. `helm upgrade`
without `--wait` still prints `deployed`; `kubectl rollout status` shows the
stall.

- **One replica:** the default strategy handles it, as long as the release was
upgraded to chart 0.2.4 or later. Upgrade the chart and the image in the same
`helm upgrade`, as above.
- **More than one replica:** upgrade across a Hazelcast version with
`Recreate`, which stops every old pod first (a short outage):

```bash
helm upgrade codetogether-ai codetogether/codetogether-ai \
--namespace codetogether-ai \
--reset-then-reuse-values \
--set deploymentStrategy.type=Recreate \
--set deploymentStrategy.rollingUpdate=null
```

`rollingUpdate=null` is required: Helm merges overrides into the existing
values, and Kubernetes rejects `Recreate` while `rollingUpdate` is set. The
same command completes a rollout that has already stalled.
`--reset-then-reuse-values` keeps `Recreate` for later upgrades; to return to
the default on a later upgrade, add (Helm 3.10 or later)
`--set-json 'deploymentStrategy={"type":"RollingUpdate","rollingUpdate":{"maxSurge":0,"maxUnavailable":1}}'`.

If a rollout has already stalled on a chart older than 0.2.4, switch the
Deployment to `Recreate` directly:

```bash
kubectl -n codetogether-ai patch deployment codetogether-ai \
-p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}'
```

## Uninstall

```bash
Expand Down
4 changes: 4 additions & 0 deletions charts/ai/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ metadata:
{{- include "ctai.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
{{- /* Read through default: --reuse-values from a chart before 0.2.4 has no deploymentStrategy. */}}
{{- $strategy := .Values.deploymentStrategy | default (dict "type" "RollingUpdate" "rollingUpdate" (dict "maxSurge" 0 "maxUnavailable" 1)) }}
strategy:
{{- toYaml $strategy | nindent 4 }}
selector:
matchLabels:
{{- include "ctai.selectorLabels" . | nindent 6 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/ai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,21 @@ tolerations: []
affinity: {}
replicaCount: 1

# Rollout strategy. The default stops the old pod before it starts the new one
# (a short outage on a single replica), instead of the Kubernetes default
# (maxSurge 25%, which rounds up to one extra pod). Pods of one release share an
# embedded Hazelcast cluster, and a pod only joins a cluster of its own
# Hazelcast minor version: when a release changes that version, an old pod still
# running makes the new pod fail to join and restart in a loop, so a surge
# rollout never completes. With more than one replica, upgrade across a
# Hazelcast version with Recreate (see "Upgrade" in README.md):
# --set deploymentStrategy.type=Recreate --set deploymentStrategy.rollingUpdate=null
deploymentStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1

extraEnvVars: []
extraVolumes: []
extraVolumeMounts: []
Expand Down
2 changes: 1 addition & 1 deletion charts/collab/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: codetogether-collab
description: CodeTogether Collab

type: application
version: 1.2.9
version: 1.3.0
appVersion: "2026.1.2"

icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
Expand Down
105 changes: 105 additions & 0 deletions charts/collab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ This chart has been created with Helm v3 and tested with:
- Kubernetes v1.18+
- Helm v3.5+

With `gateway.enabled=true` (see [Gateway API](#gateway-api-nginx-gateway-fabric)),
the cluster also needs the Gateway API CRDs (v1.5+ for the ListenerSet) and a
`Gateway`, for example from NGINX Gateway Fabric.

## Configuration

The following table lists configurable parameters of the CodeTogether Collab chart and their default values:
Expand Down Expand Up @@ -47,6 +51,14 @@ The following table lists configurable parameters of the CodeTogether Collab cha
| `locatorEdge.region` | Region for the edge server | `default` |
| `ingress.enabled` | Enables ingress controller resource | `true` |
| `ingress.tls.secretName` | TLS secret name for ingress | `codetogether-tls` |
| `gateway.enabled` | Creates a Gateway API `HTTPRoute` for the `codetogether.url` host | `false` |
| `gateway.parentRefs` | Gateway(s) the `HTTPRoute` attaches to; required when enabled unless `gateway.listenerSet.enabled` | `[]` |
| `gateway.annotations` / `gateway.labels` | Extra `HTTPRoute` metadata (`labels` also go on the `ListenerSet`) | `{}` |
| `gateway.listenerSet.enabled` | Creates a `ListenerSet` with this release's HTTPS listener; requires `gateway.enabled=true` | `false` |
| `gateway.listenerSet.parentRef` | The shared Gateway (`name`, `namespace`); required when enabled | `{}` |
| `gateway.listenerSet.listenerName` / `port` | Listener name (the route's `sectionName`) and port | `https` / `443` |
| `gateway.listenerSet.tlsSecretName` | TLS Secret for the listener | `<release fullname>-tls` |
| `gateway.listenerSet.annotations` | `ListenerSet` annotations (e.g. the cert-manager issuer) | `{}` |
| `dashboard.enabled` | Enables the dashboard and allows configuration of credentials | `false` |
| `dashboard.username` | Dashboard username | `my-dashboard-username` |
| `dashboard.password` | Dashboard password | `my-dashboard-password` |
Expand Down Expand Up @@ -78,6 +90,99 @@ To secure CodeTogether, you can add a `secret` that contains your TLS (Transport
$ kubectl create secret tls codetogether-tls --key <your-private-key-filename> --cert <your-certificate-filename>
```

## Gateway API (NGINX Gateway Fabric)

Clusters that route with Gateway API instead of an Ingress controller (for
example NGINX Gateway Fabric, which replaces the retired ingress-nginx) can have
the chart attach an `HTTPRoute` to an existing `Gateway`:

```yaml
ingress:
enabled: false
gateway:
enabled: true
parentRefs:
- name: shared-gateway # your Gateway
namespace: gateway-system # omit if it is in the release namespace
sectionName: https # the HTTPS listener with the certificate
```

The chart renders an `HTTPRoute` for the `codetogether.url` host that sends `/`
to the chart Service. WebSocket connections need no extra setting: NGINX Gateway
Fabric passes the upgrade through. Settings you added as Ingress annotations
(`ingress.annotations`, `ingress.config`) don't carry over; set the equivalent on
your Gateway.

### ListenerSet: your own listener on a shared Gateway

Instead of adding a listener to the shared `Gateway` for this host, the chart
can create a `ListenerSet` (`gateway.networking.k8s.io/v1`, Gateway API v1.5+)
that adds the HTTPS listener for the `codetogether.url` host, with its
certificate, from the release namespace. The `HTTPRoute` then attaches to that
ListenerSet, so leave `gateway.parentRefs` empty:

```yaml
ingress:
enabled: false
gateway:
enabled: true
listenerSet:
enabled: true
parentRef:
name: gateway-ngf # the shared Gateway
namespace: kube-system
# The certificate Secret defaults to <release fullname>-tls. Set
# tlsSecretName: codetogether-tls to keep the certificate from the TLS step.
annotations:
cert-manager.io/cluster-issuer: cert-manager-clusterissuer
```

The shared Gateway has to accept ListenerSets from the release namespace
(`spec.allowedListeners.namespaces`). With a cert-manager version that supports
ListenerSets, the issuer annotation on the ListenerSet issues the certificate
into that Secret; otherwise create the Secret yourself. On cert-manager v1.21
that support is off by default; enable it in the cert-manager chart values:

```yaml
config:
apiVersion: controller.config.cert-manager.io/v1alpha1
kind: ControllerConfiguration
enableGatewayAPI: true
enableGatewayAPIListenerSet: true
featureGates: ListenerSets=true
```

Chart versions before 1.3.0 don't render Gateway API objects, so a Gateway setup
on them was applied by hand. If a ListenerSet or an HTTPRoute with the release
fullname already exists, Helm refuses to take it over (`invalid ownership
metadata`) and the upgrade stops without changing anything. Let Helm adopt each
one that exists before the upgrade:

```bash
for kind in listenerset httproute; do
kubectl -n <namespace> label $kind <release-fullname> app.kubernetes.io/managed-by=Helm
kubectl -n <namespace> annotate $kind <release-fullname> \
meta.helm.sh/release-name=<release> meta.helm.sh/release-namespace=<namespace>
done
```

With the same host and TLS Secret name, the upgrade keeps serving traffic and
cert-manager keeps the existing certificate.

A `helm rollback` to a chart version without `gateway`, or a `helm uninstall`,
deletes the ListenerSet and the HTTPRoute, and with them this host's listener
and route.

The chart doesn't create the `Gateway`. On the Gateway side, check that:

- the listener allows routes from the release namespace
(`allowedRoutes.namespaces`);
- the listener can read its certificate Secret. A Secret in another namespace
needs a `ReferenceGrant` there;
- the route is accepted:
`kubectl get httproute <release-fullname> -o jsonpath='{.status.parents[*].conditions}'`
(the install notes print the exact command).

## Installing the Chart

To install the chart with the release name `codetogether-collab`:
Expand Down
29 changes: 29 additions & 0 deletions charts/collab/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,36 @@
Application URL:
{{- $gw := .Values.gateway | default dict }}
{{- if .Values.ingress.enabled }}
{{- $host := (urlParse .Values.codetogether.url).host }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ .path }}
{{- else if $gw.enabled }}
https://{{ (urlParse .Values.codetogether.url).host }}/
{{- end }}

{{- if $gw.enabled }}

Gateway API:
{{- $parents := list }}
{{- range $gw.parentRefs }}
{{- $p := .name }}
{{- with .namespace }}{{ $p = printf "%s (namespace %s)" $p . }}{{ end }}
{{- with .sectionName }}{{ $p = printf "%s listener %s" $p . }}{{ end }}
{{- $parents = append $parents $p }}
{{- end }}
{{- if eq (include "codetogether.listenerSetEnabled" .) "true" }}
{{- $lsParent := $gw.listenerSet.parentRef }}
ListenerSet {{ include "codetogether.fullname" . }} adds an HTTPS listener to Gateway {{ $lsParent.name }}{{ with $lsParent.namespace }} (namespace {{ . }}){{ end }}.
Check it was accepted: kubectl get listenerset {{ include "codetogether.fullname" . }} -n {{ .Release.Namespace }} -o jsonpath='{.status.conditions}'
{{- if not $parents }}
{{- $parents = list (printf "ListenerSet %s listener %s" (include "codetogether.fullname" .) ($gw.listenerSet.listenerName | default "https")) }}
{{- end }}
{{- end }}
HTTPRoute {{ include "codetogether.fullname" . }} attaches to: {{ join ", " $parents }}
Check it was accepted: kubectl get httproute {{ include "codetogether.fullname" . }} -n {{ .Release.Namespace }} -o jsonpath='{.status.parents[*].conditions}'
{{- if .Values.ingress.enabled }}
WARNING: ingress.enabled is also true, so both an Ingress and an HTTPRoute
serve this host. Set ingress.enabled=false once the Gateway path works.
{{- end }}
{{- end }}

{{- if or .Values.av.enabled .Values.av.serverIP .Values.av.stunServers.enabled .Values.av.jitsiUrl }}
Expand Down
Loading
Loading