Skip to content

Commit f3f53e0

Browse files
Simplify shared cache node chart
1 parent 61eb636 commit f3f53e0

8 files changed

Lines changed: 29 additions & 97 deletions

File tree

theia-shared-cache/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: theia-shared-cache
3-
description: A Helm chart for Kubernetes
3+
description: A Gradle Shared Cache for Theia IDE deployments in Kubernetes
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1. Port-forward to access the build cache node locally:
22

3-
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "theia-shared-cache.fullname" . }} 5071:5071
3+
kubectl --namespace {{ .Release.Namespace }} port-forward svc/theia-shared-cache 5071:5071
44

55
Open http://127.0.0.1:5071 in your local Gradle build cache config to test the service.

theia-shared-cache/templates/_helpers.tpl

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: {{ include "theia-shared-cache.fullname" . }}-gradle-config
4+
name: theia-shared-cache-gradle-config
55
labels:
6-
app: {{ include "theia-shared-cache.name" . }}
6+
app: theia-shared-cache
77
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
88
data:
99
gradle.properties: |-
1010
org.gradle.caching=true
1111
org.gradle.caching.remote.push=true
12-
# Use the release-scoped service name so DNS resolves correctly within the cluster
13-
org.gradle.caching.remote.url=http://{{ include "theia-shared-cache.fullname" . }}-node.{{ .Release.Namespace }}.svc.cluster.local:5071
12+
# Use the static service name so DNS resolves correctly within the cluster
13+
org.gradle.caching.remote.url=http://theia-shared-cache:5071

theia-shared-cache/templates/service.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
name: {{ include "theia-shared-cache.fullname" . }}-node
4+
name: theia-shared-cache
55
labels:
6-
app.kubernetes.io/name: {{ include "theia-shared-cache.name" . }}
7-
app.kubernetes.io/instance: {{ .Release.Name }}
6+
app.kubernetes.io/name: theia-shared-cache
7+
app.kubernetes.io/instance: theia-shared-cache
88
spec:
99
selector:
10-
app.kubernetes.io/name: {{ include "theia-shared-cache.name" . }}
11-
app.kubernetes.io/instance: {{ .Release.Name }}
10+
app.kubernetes.io/part-of: gradle-enterprise
11+
app.kubernetes.io/component: theia-shared-cache
1212
ports:
1313
- name: http
1414
port: 5071

theia-shared-cache/templates/statefulset.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
apiVersion: apps/v1
22
kind: StatefulSet
33
metadata:
4-
name: {{ include "theia-shared-cache.fullname" . }}-node
4+
name: theia-shared-cache
55
labels:
6-
app.kubernetes.io/name: {{ include "theia-shared-cache.name" . }}
7-
app.kubernetes.io/instance: {{ .Release.Name }}
6+
app.kubernetes.io/name: theia-shared-cache
7+
app.kubernetes.io/instance: theia-shared-cache
88
spec:
99
selector:
1010
matchLabels:
11-
app.kubernetes.io/name: {{ include "theia-shared-cache.name" . }}
12-
app.kubernetes.io/instance: {{ .Release.Name }}
13-
serviceName: {{ include "theia-shared-cache.fullname" . }}-node
11+
app.kubernetes.io/name: theia-shared-cache
12+
app.kubernetes.io/instance: theia-shared-cache
13+
serviceName: theia-shared-cache
1414
replicas: {{ .Values.replicaCount | default 1 }}
1515
template:
1616
metadata:
1717
labels:
18-
app.kubernetes.io/name: {{ include "theia-shared-cache.name" . }}
19-
app.kubernetes.io/instance: {{ .Release.Name }}
18+
app.kubernetes.io/name: theia-shared-cache
19+
app.kubernetes.io/instance: theia-shared-cache
2020
spec:
2121
containers:
22-
- name: build-cache-node
22+
- name: theia-shared-cache
2323
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2424
args: ["start"]
2525
ports:
@@ -28,16 +28,16 @@ spec:
2828
- name: grpc-bazel
2929
containerPort: 6011
3030
resources:
31-
{{ toYaml .Values.resources | indent 12 }}
31+
{{ toYaml .Values.resources | nindent 12 }}
3232
env:
3333
- name: EXCLUSIVE_VOLUME_SIZE
3434
value: "{{ .Values.persistence.size }}"
3535
volumeMounts:
3636
- mountPath: /data
37-
name: {{ include "theia-shared-cache.fullname" . }}-data
37+
name: theia-shared-cache-data-volume
3838
volumeClaimTemplates:
3939
- metadata:
40-
name: {{ include "theia-shared-cache.fullname" . }}-data
40+
name: theia-shared-cache-data-volume
4141
spec:
4242
accessModes:
4343
- ReadWriteOnce
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
apiVersion: v1
22
kind: Pod
33
metadata:
4-
name: "{{ include "theia-shared-cache.fullname" . }}-test-connection"
4+
name: "theia-shared-cache-test-connection"
55
labels:
6-
{{- include "theia-shared-cache.labels" . | nindent 4 }}
6+
app.kubernetes.io/name: theia-shared-cache
7+
app.kubernetes.io/instance: theia-shared-cache
78
annotations:
89
"helm.sh/hook": test
910
spec:
1011
containers:
1112
- name: wget
1213
image: busybox
13-
command: ['wget']
14-
args: ['http://{{ include "theia-shared-cache.fullname" . }}:5071']
14+
command: ["wget"]
15+
args: ["http://theia-shared-cache:5071"]
1516
restartPolicy: Never

theia-shared-cache/values.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,3 @@ persistence:
1313

1414
# Resources applied to the container. Keep empty to use cluster defaults.
1515
resources: {}
16-
17-
# Gradle configmap settings (operator can mount this ConfigMap)
18-
gradleConfig:
19-
enabled: true
20-
# If you want to override the default gradle.properties entirely, set this string.
21-
# If empty, the template will write a sensible default using the release service name.
22-
gradleProperties: ""

0 commit comments

Comments
 (0)