Skip to content

Commit 6d777ca

Browse files
authored
Merge pull request #4714 from amvanbaren/helm-chart-redis
Test Redis cluster on staging
2 parents 4edf5e1 + 11a7de1 commit 6d777ca

File tree

12 files changed

+249
-228
lines changed

12 files changed

+249
-228
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/generated-staging/
44
/jsonnet-generated-production/
55
/jsonnet-generated-staging/
6+
/charts/openvsx/charts

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG SERVER_VERSION=v0.27.0
1+
ARG SERVER_VERSION=5dd4aa28
22

33
# Builder image to compile the website
44
FROM ubuntu AS builder
@@ -27,13 +27,13 @@ RUN /usr/bin/yarn --cwd website \
2727
&& /usr/bin/yarn --cwd website build
2828

2929
# Main image derived from openvsx-server
30-
FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION}
30+
# FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION}
31+
FROM docker.io/amvanbaren/openvsx-server:${SERVER_VERSION}
3132
ARG SERVER_VERSION
3233

3334
COPY --from=builder --chown=openvsx:openvsx /workdir/website/static/ BOOT-INF/classes/static/
3435
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/application.yml config/
3536
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/logback-spring.xml BOOT-INF/classes/
36-
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/ehcache.xml BOOT-INF/classes/
3737

3838
# Replace version placeholder with arg value
3939
RUN sed -i "s/<SERVER_VERSION>/$SERVER_VERSION/g" config/application.yml

charts/openvsx/Chart.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: redis-cluster
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 12.0.12
5+
- name: alloy
6+
repository: https://grafana.github.io/helm-charts
7+
version: 1.1.2
8+
digest: sha256:e9f71eed4e319e79393873684f56db74c9db3408604c934755aecbd0ff9a457e
9+
generated: "2025-08-04T14:57:58.074328516+03:00"

charts/openvsx/Chart.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@ apiVersion: v2
22
name: openvsx
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.1.0
5+
version: 0.2.0
66
appVersion: "1.16.0"
7+
dependencies:
8+
- name: redis-cluster
9+
version: 12.0.12
10+
repository: https://charts.bitnami.com/bitnami
11+
- name: alloy
12+
version: 1.1.2
13+
repository: https://grafana.github.io/helm-charts

charts/openvsx/templates/configmap.yaml

Lines changed: 0 additions & 65 deletions
This file was deleted.

charts/openvsx/templates/deployment.yaml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,7 @@ spec:
7777
path: /actuator/health/readiness
7878
port: http-management
7979
periodSeconds: 10
80-
- name: grafana-agent
81-
image: docker.io/grafana/agent:v0.39.1
82-
command:
83-
- /bin/grafana-agent
84-
args:
85-
- --config.file=$(CONFIG_FILE_PATH)
86-
- --metrics.wal-directory=$(DATA_FILE_PATH)
87-
- --config.expand-env=true
88-
env:
89-
- name: CONFIG_FILE_PATH
90-
value: /etc/grafana-agent/agent.yml
91-
- name: DATA_FILE_PATH
92-
value: /etc/grafana-agent/data
93-
- name: ENVNAME
94-
value: {{ .Values.environment }}
95-
envFrom:
96-
- secretRef:
97-
name: grafana-cloud-secret-{{ .Values.environment }}
98-
volumeMounts:
99-
- name: grafana-agent-config-volume
100-
mountPath: /etc/grafana-agent
101-
- name: grafana-agent-data-volume
102-
mountPath: /etc/grafana-agent/data
80+
initialDelaySeconds: 30
10381
initContainers:
10482
- command:
10583
- sh
@@ -131,15 +109,6 @@ spec:
131109
defaultMode: 420
132110
optional: false
133111
secretName: elasticsearch-{{ .Values.environment }}-es-http-certs-internal
134-
- name: grafana-agent-config-volume
135-
configMap:
136-
name: grafana-agent-configmap-{{ .Values.environment }}
137-
items:
138-
- key: agent.yml
139-
path: agent.yml
140-
- name: grafana-agent-data-volume
141-
emptyDir:
142-
medium: Memory
143112
- name: truststore-with-elasticsearch-certs
144113
emptyDir:
145114
medium: Memory
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
labels:
5+
app: {{ .Values.name }}
6+
environment: {{ .Values.environment }}
7+
name: {{ .Values.alloy.alloy.configMap.name }}
8+
namespace: {{ .Values.namespace }}
9+
data:
10+
{{ .Values.alloy.alloy.configMap.key }}: |
11+
logging {
12+
level = "debug"
13+
format = "logfmt"
14+
}
15+
16+
prometheus.operator.servicemonitors "spring_boot" {
17+
namespaces = ["{{ .Values.namespace }}"]
18+
selector {
19+
match_labels = {
20+
app = "{{ .Values.name }}",
21+
environment = "{{ .Values.environment }}",
22+
}
23+
}
24+
25+
forward_to = [prometheus.relabel.spring_boot_relabel.receiver]
26+
}
27+
28+
prometheus.relabel "spring_boot_relabel" {
29+
rule {
30+
source_labels = ["exported_instance"]
31+
target_label = "instance"
32+
action = "replace"
33+
}
34+
35+
rule {
36+
regex = "^(exported_instance|deployment_environment|service_instance_id|service_name)$"
37+
action = "labeldrop"
38+
}
39+
40+
forward_to = [prometheus.remote_write.default.receiver]
41+
}
42+
43+
prometheus.operator.servicemonitors "redis" {
44+
namespaces = ["{{ index .Values "redis-cluster" "namespaceOverride" }}"]
45+
selector {
46+
match_labels = {
47+
app = "{{ index .Values "redis-cluster" "commonLabels" "app" }}",
48+
environment = "{{ index .Values "redis-cluster" "commonLabels" "environment" }}",
49+
}
50+
}
51+
52+
forward_to = [prometheus.remote_write.default.receiver]
53+
}
54+
55+
prometheus.remote_write "default" {
56+
endpoint {
57+
name = "hosted-prometheus"
58+
url = sys.env("PROMETHEUS_URL")
59+
60+
basic_auth {
61+
username = sys.env("PROMETHEUS_USERNAME")
62+
password = sys.env("PROMETHEUS_PASSWORD")
63+
}
64+
}
65+
}
66+
67+
otelcol.receiver.zipkin "default" {
68+
endpoint = "0.0.0.0:9411"
69+
output {
70+
traces = [otelcol.processor.memory_limiter.default.input]
71+
}
72+
}
73+
74+
otelcol.processor.memory_limiter "default" {
75+
check_interval = "1s"
76+
limit = "400MiB"
77+
spike_limit = "80MiB"
78+
output {
79+
traces = [otelcol.processor.batch.default.input]
80+
}
81+
}
82+
83+
otelcol.processor.batch "default" {
84+
output {
85+
traces = [otelcol.exporter.otlp.tempo.input]
86+
}
87+
}
88+
89+
otelcol.auth.basic "tempo_auth" {
90+
username = sys.env("TEMPO_USERNAME")
91+
password = sys.env("TEMPO_PASSWORD")
92+
}
93+
94+
otelcol.exporter.otlp "tempo" {
95+
client {
96+
endpoint = sys.env("TEMPO_URL")
97+
auth = otelcol.auth.basic.tempo_auth.handler
98+
}
99+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: monitoring.coreos.com/v1
2+
kind: ServiceMonitor
3+
metadata:
4+
labels:
5+
app: {{ .Values.name }}
6+
environment: {{ .Values.environment }}
7+
name: spring-boot-monitor-{{ .Values.environment }}
8+
namespace: {{ .Values.namespace }}
9+
spec:
10+
selector:
11+
matchLabels:
12+
app: {{ .Values.name }}
13+
environment: {{ .Values.environment }}
14+
type: website
15+
namespaceSelector:
16+
matchNames:
17+
- {{ .Values.namespace }}
18+
endpoints:
19+
- port: http
20+
path: /actuator/prometheus
21+
interval: 15s

charts/openvsx/templates/service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ spec:
1313
port: {{ .Values.service.port }}
1414
protocol: TCP
1515
targetPort: {{ .Values.service.targetPort }}
16+
- name: management
17+
port: 8081
18+
protocol: TCP
19+
targetPort: 8081
1620
selector:
1721
app: {{ .Values.name }}
1822
environment: {{ .Values.environment }}

0 commit comments

Comments
 (0)