Skip to content

Commit 4f0bf93

Browse files
authored
feat: merge dev to main (#75)
1 parent 25672a0 commit 4f0bf93

12 files changed

Lines changed: 181 additions & 24 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Helm Template Validation
2+
3+
on:
4+
pull_request:
5+
branches: [main, dev]
6+
7+
jobs:
8+
helm-lint:
9+
name: Validate Helm Charts
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Install Required Dependencies
17+
run: |
18+
apt-get update && apt-get install -y unzip
19+
20+
- name: Install Helm
21+
uses: azure/setup-helm@v3
22+
23+
- name: Validate Collab Chart
24+
run: |
25+
helm template collab ./charts/collab --values ./charts/collab/values.yaml
26+
27+
- name: Validate HQ Chart
28+
run: |
29+
helm template hq ./charts/hq --values ./charts/hq/values.yaml
30+
31+
- name: Validate Intel Chart
32+
run: |
33+
helm template intel ./charts/intel --values ./charts/intel/values.yaml
34+
35+
- name: Validate Live Chart
36+
run: |
37+
helm template live ./charts/live --values ./charts/live/values.yaml

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
1-
This is a Helm Chart repository for CodeTogether's Live and HQ products.
1+
# CodeTogether Helm Chart Repository
22

3-
## Helm Charts Directory
3+
This repository contains Helm charts for deploying CodeTogether software, including:
44

5-
### CodeTogether Live
5+
- Intelligence Suite – Engineering intelligence for data-driven insights
6+
- Collabolation Module – Real-time collaboration within the IDE
7+
8+
## Latest Helm Charts
9+
10+
### CodeTogether Intel
11+
12+
The `codetogether/codetogether-intel` Helm chart deploys the latest version of the CodeTogether Intelligence Suite backend. The Intelligence Suite leverages DevEx Workflow AI to drive goal-oriented success. It operates independently of server connectivity, allowing clients to continue tracking project activity locally and synchronize once the server is available.
13+
14+
### CodeTogether Collab
615

7-
The `codetogether/codetogether` Helm chart can be used to deploy the CodeTogether Live
8-
backend. Live provides teams the ability to code together real-time right from within
9-
their IDE.
16+
The `codetogether/codetogether-collab` Helm chart deploys the latest version of the CodeTogether Collabolation module backend. It enables real-time collaborative coding within the IDE, enhancing team synergy and communication across projects.
17+
18+
## Deprecated Helm Charts
1019

1120
### CodeTogether HQ
1221

13-
The `codetogether/codetogether-hq` Helm chart can be used to deploy the CodeTogether HQ
14-
backend. HQ provides teams unique insights into project hotspots and areas of opportunity
15-
to foster collaboration and on-time delivery of software.
22+
The `codetogether/codetogether-hq` Helm chart supports legacy users needing to deploy a previous version of the CodeTogether HQ Intelligence Suite backend.
23+
24+
### CodeTogether Live
25+
26+
The `codetogether/codetogether` Helm chart supports legacy users needing to deploy a previous version of the CodeTogether Live backend.
1627

1728
## Getting Started
1829

19-
To begin using the repository, first add it to your Helm configuration:
30+
Add the CodeTogether repository to your Helm configuration:
2031
`helm repo add codetogether https://helm.codetogether.io`
2132

22-
Then you can provision services using a command such as:
23-
`helm install codetogether codetogether/codetogether -f codetogether-values.yaml`
33+
Install a Helm chart using:
34+
`helm install codetogether codetogether/codetogether -f codetogether-values.yaml`

charts/collab/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ name: codetogether-collab
33
description: CodeTogether Collab
44

55
type: application
6-
version: 1.1.0
6+
version: 1.2.0
77
appVersion: "2025.1.0"
8-
kubeVersion: ">= 1.18.0"
98

109
icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
1110
home: https://www.codetogether.com

charts/collab/templates/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ spec:
3333
- name: {{ .Chart.Name }}
3434
securityContext:
3535
{{- toYaml .Values.securityContext | nindent 12 }}
36-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
36+
image: >-
37+
{{ .Values.image.repository }}
38+
{{- if .Values.image.digest }}@{{ .Values.image.digest }}
39+
{{- else }}:{{ .Values.image.tag | default .Chart.AppVersion }}{{- end }}
3740
imagePullPolicy: {{ .Values.image.pullPolicy }}
3841

3942
env:

charts/collab/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ image:
1818
pullPolicy: Always
1919
# Overrides the image tag whose default is the chart appVersion.
2020
tag: "latest"
21+
# Optional - set to override the image tag, e.g. "sha256:1234567890"
22+
digest: ""
2123

2224
#
2325
# Configure the source location for the Docker image, using the

charts/hq/Chart.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description: CodeTogether HQ provides advanced project insights for developers
55
type: application
66
version: 1.4.19
77
appVersion: "2024.1.0"
8-
kubeVersion: ">= 1.18.0"
98

109
icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
1110
home: https://www.codetogether.com

charts/intel/Chart.yaml

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

55
type: application
6-
version: 1.1.0
6+
version: 1.2.0
77
appVersion: "2025.1.0"
8-
kubeVersion: ">= 1.18.0"
98

109
icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
1110
home: https://www.codetogether.com

charts/intel/README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This chart creates a CodeTogether Intel server deployment on a Kubernetes cluste
1010

1111
This chart has been created with Helm v3 and tested with:
1212

13-
- Kubernetes v1.18+
1413
- Helm v3.5+
1514
- Cassandra v3.11+
1615

@@ -25,6 +24,7 @@ The following table lists configurable parameters of the CodeTogether Intel char
2524
| `image.repository` | Docker image repository for CodeTogether Intel | `hub.edge.codetogether.com/releases/codetogether-intel` |
2625
| `image.pullPolicy` | Container image pull policy | `Always` |
2726
| `image.tag` | Tag for the CodeTogether Intel image | `latest` |
27+
| `image.digest` | (Optional) Set to override the image tag, e.g. `sha256:1234567890` | |
2828
| `imageCredentials.enabled` | Enables authentication for private Docker registry | `true` |
2929
| `imageCredentials.registry` | Docker registry URL | `hub.edge.codetogether.com` |
3030
| `imageCredentials.username` | Docker registry username | `my-customer-username` |
@@ -47,7 +47,11 @@ The following table lists configurable parameters of the CodeTogether Intel char
4747
| `hqproperties.hq.cassandra.db.username` | Username for Cassandra database | `cassandra` |
4848
| `hqproperties.hq.collab.url` | URL of the collaboration server integrated with Intel | `https://your-collab-server` |
4949
| `hqproperties.hq.collab.secret` | Secret key for secure communication with the collaboration server | `SECRET` |
50-
50+
| `java.customJavaOptions` | Additional Java options to be passed to the application | `""` |
51+
| `java.customCacerts.enabled` | Enables mounting a custom Java trust store (cacerts) | `false` |
52+
| `java.customCacerts.cacertsSecretName` | Name of the Kubernetes secret containing the `cacerts` file | `custom-java-cacerts` |
53+
| `java.customCacerts.trustStorePasswordKey` | (Optional) Key inside the Kubernetes secret containing the trust store password | `trustStorePassword` |
54+
| `cassandra.passwordSecret` | (Optional) Name of a Kubernetes secret containing the Cassandra database password. | |
5155
| `ingress.enabled` | Enables ingress controller resource | `true` |
5256
| `ingress.annotations` | Annotations for ingress | `{}` |
5357
| `ingress.tls.secretName` | TLS secret name for ingress | `codetogether-intel-tls` |
@@ -80,6 +84,29 @@ To secure CodeTogether, you can add a `secret` that contains your TLS (Transport
8084
$ kubectl create secret tls codetogether-intel-tls --key <your-private-key-filename> --cert <your-certificate-filename>
8185
```
8286

87+
## Custom Java Trust Store
88+
89+
If your environment requires a custom CA certificate bundle, you can configure a custom Java trust store by creating a secret.
90+
91+
If trust store is not protected by the password, use the following command to create the secret:
92+
```bash
93+
$ kubectl create secret generic custom-java-cacerts --from-file=cacerts=/path/to/custom/cacerts --namespace=codetogether-intel
94+
```
95+
96+
If password is required to access the trust store, store it in the same secret:
97+
```bash
98+
$ kubectl create secret generic custom-java-cacerts --from-file=cacerts=/path/to/custom/cacerts --from-literal=trustStorePassword='your-secure-password' --namespace=codetogether-intel
99+
```
100+
101+
## Using Secret for Cassandra Password
102+
103+
If you prefer not to store the Cassandra password in values.yaml, you can store it securely in a Kubernetes secret.
104+
105+
```bash
106+
kubectl create secret generic cassandra-password-secret --from-literal=cassandraPassword='your-secure-cassandra-password' --namespace=codetogether-intel
107+
```
108+
109+
83110
## Installing the Chart
84111

85112
To install the chart with the release name `codetogether-intel`:

charts/intel/templates/deployment.yaml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,49 @@ spec:
3131
- name: {{ .Chart.Name }}
3232
securityContext:
3333
{{- toYaml .Values.securityContext | nindent 12 }}
34-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
34+
image: >-
35+
{{ .Values.image.repository }}
36+
{{- if .Values.image.digest }}@{{ .Values.image.digest }}
37+
{{- else }}:{{ .Values.image.tag | default .Chart.AppVersion }}{{- end }}
3538
imagePullPolicy: {{ .Values.image.pullPolicy }}
36-
3739
env:
3840
#
3941
# Set CodeTogether runtime configuration
4042
#
4143
- name: CT_HQ_BASE_URL
4244
value: {{ .Values.codetogether.url | quote }}
45+
46+
{{- if .Values.java.customCacerts.enabled }}
47+
- name: CT_TRUST_STORE
48+
value: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
49+
{{- end }}
50+
51+
# Custom Java options (excluding trust store related settings)
52+
{{- if .Values.java.customJavaOptions }}
53+
- name: CT_JAVA_OPTIONS
54+
value: "{{ .Values.java.customJavaOptions | default "" }}"
55+
{{- end }}
56+
57+
# Set trust store password only if trustStorePasswordKey is provided
58+
{{- if and .Values.java.customCacerts.enabled .Values.java.customCacerts.trustStorePasswordKey }}
59+
- name: CT_TRUST_STORE_PASSWD
60+
valueFrom:
61+
secretKeyRef:
62+
name: {{ .Values.java.customCacerts.cacertsSecretName }}
63+
key: {{ .Values.java.customCacerts.trustStorePasswordKey }}
64+
optional: true # Ensures the key is optional
65+
{{- end }}
66+
4367
volumeMounts:
4468
- name: properties-volume
4569
mountPath: /opt/codetogether/runtime/cthq.properties
4670
subPath: cthq.properties
71+
{{- if .Values.java.customCacerts.enabled }}
72+
- name: java-cacerts
73+
mountPath: /etc/ssl/certs/java/cacerts
74+
subPath: cacerts
75+
{{- end }}
76+
4777
#
4878
# Set container configuration
4979
#
@@ -78,6 +108,11 @@ spec:
78108
- name: properties-volume
79109
secret:
80110
secretName: {{ if .Values.fullnameOverride }}{{ .Values.fullnameOverride }}-hqproperties{{ else }}hqproperties{{ end }}
111+
{{- if .Values.java.customCacerts.enabled }}
112+
- name: java-cacerts
113+
secret:
114+
secretName: {{ .Values.java.customCacerts.cacertsSecretName }}
115+
{{- end }}
81116
{{- with .Values.nodeSelector }}
82117
nodeSelector:
83118
{{- toYaml . | nindent 8 }}

charts/intel/templates/secret-properties.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ metadata:
55
type: Opaque
66
stringData:
77
cthq.properties: |-
8+
{{- $cassandraPassword := "" }}
9+
{{- if and (hasKey .Values "cassandra") (hasKey .Values.cassandra "passwordSecret") .Values.cassandra.passwordSecret (lookup "v1" "Secret" .Release.Namespace .Values.cassandra.passwordSecret) }}
10+
{{- $cassandraPassword := (lookup "v1" "Secret" .Release.Namespace .Values.cassandra.passwordSecret).data.cassandraPassword | b64dec }}
11+
{{- end }}
812
{{- range $key, $value := .Values.hqproperties }}
9-
{{ $key }}={{ $value }}
13+
{{- if and (eq $key "hq.cassandra.db.password") $cassandraPassword }}
14+
{{ $key }}={{ $cassandraPassword }}
15+
{{- else }}
16+
{{ $key }}={{ $value }}
17+
{{- end }}
1018
{{- end }}

0 commit comments

Comments
 (0)