-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcharmcraft.yaml
156 lines (139 loc) · 4.67 KB
/
charmcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Copyright 2025 Canonical
# See LICENSE file for licensing details.
name: parca-k8s
summary: Parca continuous profiling tool.
description: |
Continuous profiling for analysis of CPU and memory usage, down to the line number and throughout
time. Saving infrastructure cost, improving performance, and increasing reliability.
type: "charm"
links:
documentation: https://discourse.charmhub.io/t/16552
website: https://charmhub.io/parca-k8s
source: https://github.com/canonical/parca-k8s-operator
issues: https://github.com/canonical/parca-k8s-operator/issues
platforms:
ubuntu@24.04:amd64:
ubuntu@22.04:amd64:
parts:
charm:
charm-binary-python-packages: [ cryptography, jsonschema, pydantic, pydantic-core, maturin ]
# include rustc and cargo to compile pydantic
build-packages: [ git, rustc, cargo ]
charm-requirements: [requirements.txt]
build-snaps: [astral-uv]
override-build: |
uv export --frozen --no-hashes --format=requirements-txt -o requirements.txt
craftctl default
assumes:
- juju >= 3.1
containers:
parca:
resource: parca-image
mounts:
- storage: profiles
location: /var/lib/parca
nginx:
resource: nginx-image
nginx-prometheus-exporter:
resource: nginx-prometheus-exporter-image
resources:
parca-image:
type: oci-image
description: OCI image for parca
# Included for simplicity in integration tests
upstream-source: docker.io/ubuntu/parca:0.23.1-24.04
nginx-image:
type: oci-image
description: OCI image for nginx
upstream-source: ubuntu/nginx:1.24-24.04_beta
nginx-prometheus-exporter-image:
type: oci-image
description: OCI image for nginx-prometheus-exporter
upstream-source: nginx/nginx-prometheus-exporter:1.1.0
storage:
profiles:
type: filesystem
requires:
catalogue:
interface: catalogue
description: Display parca entry in the COS catalogue frontend.
s3:
interface: s3
description: S3 bucket to store the profiles in.
profiling-endpoint:
interface: parca_scrape
description: |
Integration to configure parca to scrape a profiling endpoint from a related charm.
ingress:
interface: traefik_route
limit: 1
description: |
Ingress integration for the Parca server and profiling ingestion endpoints,
so that cross-model workloads can send their profiles to Parca through the ingress.
Uses `traefik_route` to open the right ports on the Traefik host.
external-parca-store-endpoint:
interface: parca_store
description: |
Push profiles from this parca server to a remote parca server.
charm-tracing:
description: |
Enables sending charm traces to a distributed tracing backend such as Tempo.
limit: 1
interface: tracing
workload-tracing:
interface: tracing
limit: 1
description: |
Enables sending workload traces to a distributed tracing backend such as Tempo.
certificates:
interface: tls-certificates
limit: 1
description: |
Certificate and key files for securing Parca's external
communications through TLS.
logging:
interface: loki_push_api
description: |
Enables sending workload logs to a loki-push-api compatible endpoint.
provides:
grafana-dashboard:
interface: grafana_dashboard
description: |
This integration provisions a grafana dashboard to monitor this charm.
grafana-source:
interface: grafana_datasource
description: |
This integration configures this parca server as a datasource on a grafana instance.
metrics-endpoint:
interface: prometheus_scrape
description: |
Endpoint to allow prometheus metrics to be scraped from this parca instance.
self-profiling-endpoint:
interface: parca_scrape
description: |
Endpoint to allow this parca instance profiles to be scraped by a remote parca instance.
parca-store-endpoint:
interface: parca_store
description: |
Endpoint at which profiles can be pushed by, for example, a remote parca server or parca-agent.
peers:
parca-peers:
interface: parca_peers
actions:
list-endpoints:
description: |
Return the ingestion endpoints that the parca server is listening on for grpc and http profiling data.
Will list both direct and ingressed hosts.
config:
options:
enable-persistence:
description: |
Do not store profiles in memory, persist to disk. Location for persistence is '/var/lib/parca'
type: boolean
default: false
memory-storage-limit:
description: |
When storing profiles in memory, configure the in-memory storage limit, specified in MB.
Does nothing if enable-persistence is True.
type: int
default: 4096