Skip to content

Commit f8540bc

Browse files
committed
Merge pull request #530 from wunderio/feature/vmproxy-chart
vm stack proxy
2 parents c54c3b6 + a09cd50 commit f8540bc

5 files changed

Lines changed: 195 additions & 0 deletions

File tree

vmproxy/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: vmproxy
3+
description: A Helm chart for Victoria Metrics stack Proxy
4+
version: 0.1.0
5+
appVersion: 1.0.0

vmproxy/templates/deployment.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ .Release.Name }}
5+
labels:
6+
app: vmproxy
7+
release: {{ .Release.Name }}
8+
spec:
9+
replicas: {{ .Values.replicaCount }}
10+
selector:
11+
matchLabels:
12+
app: vmproxy
13+
release: {{ .Release.Name }}
14+
template:
15+
metadata:
16+
labels:
17+
app: vmproxy
18+
release: {{ .Release.Name }}
19+
spec:
20+
containers:
21+
- name: vmproxy
22+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
23+
imagePullPolicy: {{ .Values.image.pullPolicy }}
24+
env:
25+
- name: JWKS_URL
26+
value: {{ .Values.proxies.jwksUrl }}
27+
- name: METRICS_WRITE_URL
28+
value: {{ .Values.proxies.metrics.writeUrl }}
29+
- name: METRICS_READ_URL
30+
value: {{ .Values.proxies.metrics.readUrl }}
31+
- name: DEBUG_METRICS_INSERT
32+
value: {{ .Values.proxies.metrics.debugInsert }}
33+
- name: DEBUG_METRICS_SELECT
34+
value: {{ .Values.proxies.metrics.debugSelect }}
35+
- name: LOGS_WRITE_URL
36+
value: {{ .Values.proxies.logs.writeUrl }}
37+
- name: LOGS_READ_URL
38+
value: {{ .Values.proxies.logs.readUrl }}
39+
- name: DEBUG_LOGS_INSERT
40+
value: {{ .Values.proxies.logs.debugInsert }}
41+
- name: DEBUG_LOGS_SELECT
42+
value: {{ .Values.proxies.logs.debugSelect }}
43+
- name: TRACES_WRITE_URL
44+
value: {{ .Values.proxies.traces.writeUrl }}
45+
- name: TRACES_READ_URL
46+
value: {{ .Values.proxies.traces.readUrl }}
47+
- name: DEBUG_TRACES_INSERT
48+
value: {{ .Values.proxies.traces.debugInsert }}
49+
- name: DEBUG_TRACES_SELECT
50+
value: {{ .Values.proxies.traces.debugSelect }}
51+
- name: VM_PROXY_REPLICA
52+
valueFrom:
53+
fieldRef:
54+
fieldPath: metadata.name
55+
ports:
56+
- name: http
57+
containerPort: {{ .Values.service.port }}
58+
resources:
59+
{{- toYaml .Values.resources | nindent 12 }}

vmproxy/templates/ingress.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{{- if .Values.ingress.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ .Release.Name }}
6+
annotations:
7+
{{- range $key, $value := .Values.ingress.annotations }}
8+
{{ $key }}: {{ $value | quote }}
9+
{{- end }}
10+
spec:
11+
rules:
12+
- host: {{ .Values.ingress.host }}
13+
http:
14+
paths:
15+
- backend:
16+
service:
17+
name: {{ $.Release.Name }}
18+
port:
19+
number: {{ $.Values.service.port }}
20+
path: /metrics/insert
21+
pathType: Prefix
22+
- backend:
23+
service:
24+
name: {{ $.Release.Name }}
25+
port:
26+
number: {{ $.Values.service.port }}
27+
path: /metrics/select
28+
pathType: Prefix
29+
- host: {{ .Values.ingress.host }}
30+
http:
31+
paths:
32+
- backend:
33+
service:
34+
name: {{ $.Release.Name }}
35+
port:
36+
number: {{ $.Values.service.port }}
37+
path: /logs/insert
38+
pathType: Prefix
39+
- backend:
40+
service:
41+
name: {{ $.Release.Name }}
42+
port:
43+
number: {{ $.Values.service.port }}
44+
path: /logs/select
45+
pathType: Prefix
46+
- host: {{ .Values.ingress.host }}
47+
http:
48+
paths:
49+
- backend:
50+
service:
51+
name: {{ $.Release.Name }}
52+
port:
53+
number: {{ $.Values.service.port }}
54+
path: /traces/insert
55+
pathType: Prefix
56+
- backend:
57+
service:
58+
name: {{ $.Release.Name }}
59+
port:
60+
number: {{ $.Values.service.port }}
61+
path: /traces/select
62+
pathType: Prefix
63+
tls:
64+
- hosts:
65+
- {{ .Values.ingress.host }}
66+
secretName: {{ $.Release.Name }}-ingress-tls
67+
{{- end }}

vmproxy/templates/service.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ .Release.Name }}
5+
labels:
6+
app: vmproxy
7+
release: {{ .Release.Name }}
8+
spec:
9+
type: {{ .Values.service.type }}
10+
ports:
11+
- port: {{ .Values.service.port }}
12+
targetPort: {{ .Values.service.port }}
13+
selector:
14+
app: vmproxy
15+
release: {{ .Release.Name }}

vmproxy/values.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
replicaCount: 1
2+
3+
image:
4+
repository: wunderio/silta-vmproxy
5+
tag: latest
6+
pullPolicy: IfNotPresent
7+
8+
proxies:
9+
# JWKS URL for JWT authentication. This should point to the JWKS endpoint of your identity provider (e.g., Keycloak, Auth0).
10+
# It is used by vmproxy to validate incoming JWT tokens and extract user information for authentication and authorization purposes.
11+
# For example, grafana query proxy checks project permissions based on the "project" claim in the JWT token, which is validated using the JWKS URL.
12+
jwksUrl: https://example.com/realms/example/protocol/openid-connect/certs
13+
metrics:
14+
writeUrl: http://vm-cluster-victoria-metrics-cluster-vminsert:8480/insert/prometheus
15+
readUrl: http://vm-cluster-victoria-metrics-cluster-vmselect:8481/select/prometheus
16+
debugInsert: "false"
17+
debugSelect: "false"
18+
logs:
19+
writeUrl: http://vl-cluster-victoria-logs-cluster-vlinsert:9481/insert/opentelemetry/v1/logs
20+
readUrl: http://vl-cluster-victoria-logs-cluster-vlselect:9471
21+
debugInsert: "false"
22+
debugSelect: "false"
23+
traces:
24+
writeUrl: http://vt-cluster-vtinsert:10481/insert/opentelemetry/v1/traces
25+
readUrl: http://vt-cluster-vtselect:10471/select
26+
debugInsert: "false"
27+
debugSelect: "false"
28+
29+
service:
30+
type: ClusterIP
31+
port: 80
32+
33+
ingress:
34+
enabled: false
35+
annotations: {}
36+
host: vmproxy.local
37+
tls: []
38+
39+
resources:
40+
limits:
41+
cpu: 100m
42+
memory: 128Mi
43+
requests:
44+
cpu: 100m
45+
memory: 128Mi
46+
47+
affinity: {}
48+
nodeSelector: {}
49+
tolerations: []

0 commit comments

Comments
 (0)