Skip to content

Commit 10d701b

Browse files
committed
feat: add perses as optional standalone dashboarding component
Adds Perses (CNCF dashboard tool) as an opt-in component alongside the existing Prometheus and VictoriaLogs stack. Deployed via a new `Perses` kro ResourceGraphDefinition; not part of ObservabilityStack. Signed-off-by: Michael Sprauer <Michael.Sprauer@sap.com>
1 parent 713786d commit 10d701b

12 files changed

Lines changed: 352 additions & 1 deletion

File tree

component-constructor.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,19 @@ components:
188188
path: "docker.io/victoriametrics/victoria-logs:${VICTORIA_LOGS_IMAGE_VERSION}"
189189
repository: images/victoria-logs
190190

191+
# perses
192+
- name: perses-kustomization
193+
version: ${OBSERVABILITY_STACK_VERSION}
194+
type: kustomization
195+
access:
196+
type: ociArtifact
197+
imageReference: "${KUSTOMIZATIONS_LOCATION_PREFIX}/perses:${OBSERVABILITY_STACK_VERSION}"
198+
199+
- name: perses-image
200+
version: ${PERSES_IMAGE_VERSION}
201+
type: ociImage
202+
input:
203+
type: ociImage
204+
path: "docker.io/persesdev/perses:${PERSES_IMAGE_VERSION#v}"
205+
repository: images/perses
206+

component-settings.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ ALERTMANAGER_IMAGE_VERSION: "v0.33.0"
2626
# victoria logs
2727
VICTORIA_LOGS_IMAGE_VERSION: "v1.6.0-victorialogs"
2828

29+
# perses
30+
PERSES_IMAGE_VERSION: "v0.51.0"
31+
2932

3033
# E2E Test dependencies
3134
# Not used for deployment

hack/build-component.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def push_kustomizations(repo_root: Path, version: str) -> None:
7777
("prometheus", "prometheus"),
7878
("metrics", "metrics"),
7979
("victoria-logs", "victoria-logs"),
80-
("observability-gateway", "observability-gateway")
80+
("observability-gateway", "observability-gateway"),
81+
("perses", "perses"),
8182
]
8283

8384
# Get git information

kustomizations/observability-gateway/gateway.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ spec:
4141
certificateRefs:
4242
- kind: Secret
4343
name: otlp-logs-cert
44+
- name: perses
45+
port: 8443
46+
protocol: HTTPS
47+
hostname: "<perses-dnsname>"
48+
allowedRoutes:
49+
namespaces:
50+
from: All
51+
tls:
52+
mode: Terminate
53+
certificateRefs:
54+
- kind: Secret
55+
name: perses-cert
4456
---
4557
apiVersion: gateway.envoyproxy.io/v1alpha1
4658
kind: ClientTrafficPolicy
@@ -92,3 +104,20 @@ spec:
92104
- kind: "Secret"
93105
group: ""
94106
name: "observability-client-ca-cert"
107+
---
108+
apiVersion: gateway.envoyproxy.io/v1alpha1
109+
kind: ClientTrafficPolicy
110+
metadata:
111+
name: perses-mtls
112+
spec:
113+
targetRefs:
114+
- group: gateway.networking.k8s.io
115+
kind: Gateway
116+
name: observability-gateway
117+
sectionName: perses
118+
tls:
119+
clientValidation:
120+
caCertificateRefs:
121+
- kind: "Secret"
122+
group: ""
123+
name: "observability-client-ca-cert"

kustomizations/observability-gateway/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ resources:
66
- prometheus-certificates.yaml
77
- victoria-logs-certificates.yaml
88
- otlp-logs-certificates.yaml
9+
- perses-certificates.yaml
910
- client-certificates.yaml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: Certificate
3+
metadata:
4+
name: perses-gateway-cert
5+
spec:
6+
secretName: perses-cert
7+
issuerRef:
8+
name: gateway-selfsigned-issuer
9+
kind: Issuer
10+
dnsNames: []
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: perses-config
5+
data:
6+
config.yaml: |
7+
database:
8+
file:
9+
folder: /tmp/perses
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: perses
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app.kubernetes.io/name: perses
10+
template:
11+
metadata:
12+
labels:
13+
app.kubernetes.io/name: perses
14+
spec:
15+
securityContext:
16+
fsGroup: 2000
17+
runAsNonRoot: true
18+
runAsUser: 1000
19+
containers:
20+
- name: perses
21+
args:
22+
- --config=/etc/perses/config.yaml
23+
ports:
24+
- containerPort: 8080
25+
name: http
26+
volumeMounts:
27+
- name: config
28+
mountPath: /etc/perses
29+
resources:
30+
requests:
31+
memory: 128Mi
32+
cpu: 50m
33+
limits:
34+
memory: 512Mi
35+
cpu: 500m
36+
volumes:
37+
- name: config
38+
configMap:
39+
name: perses-config
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: HTTPRoute
3+
metadata:
4+
name: perses
5+
spec:
6+
parentRefs:
7+
- name: observability-gateway
8+
namespace: observability-gateway-system
9+
sectionName: perses
10+
hostnames: []
11+
rules:
12+
- matches:
13+
- path:
14+
type: PathPrefix
15+
value: /
16+
backendRefs:
17+
- name: perses
18+
port: 8080
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- deployment.yaml
5+
- service.yaml
6+
- configmap.yaml
7+
- httproute.yaml

0 commit comments

Comments
 (0)