Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox env for noble #174

Merged
merged 5 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions charmcraft-22.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.

name: grafana-agent
type: charm
subordinate: true

description: A subordinate charm for Grafana Agent and an essential part of the COS Lite bundle.
summary: |
This Charmed Operator handles deployment, scaling, configuration, and Day 2 operations specific to Grafana Agent.

links:
documentation: https://discourse.charmhub.io/t/grafana-agent-docs-index/13452
website: https://charmhub.io/grafana-agent
source: https://github.com/canonical/grafana-agent-operator
issues: https://github.com/canonical/grafana-agent-operator/issues

bases:
- build-on:
- name: "ubuntu"
channel: "22.04"
architectures: ["arm64"]
run-on:
- name: "ubuntu"
channel: "22.04"
architectures: ["arm64"]
- build-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["arm64"]
run-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["arm64"]
- build-on:
- name: "ubuntu"
channel: "22.04"
architectures: ["amd64"]
run-on:
- name: "ubuntu"
channel: "22.04"
architectures: ["amd64"]
- build-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["amd64"]
run-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["amd64"]

parts:
charm:
build-packages:
- git

# The following are needed for tls-certificates-interface
- build-essential
- python3-dev
- libffi-dev
- libssl-dev
- pkg-config
- rustc
- cargo
cos-tool:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
curl -L -O https://github.com/canonical/cos-tool/releases/latest/download/cos-tool-${CRAFT_ARCH_BUILD_FOR}
chmod +x cos-tool-*

requires:
certificates:
interface: tls-certificates
limit: 1
description: |
Certificate for the grafana agent server (API endpoint is served on :12345 by default)
to use to authenticate to clients, and the CA certificate of the signing CA.
We currently assume that the same CA signs all scrape targets (e.g. principal units).
juju-info:
description: |
`juju-info` provides basic compatibility with all charms.
If all you want is /var/log logs and node_exporter metrics,
this relation will be enough.
interface: juju-info
scope: container
cos-agent:
description: |
`cos-agent` is a dedicated relation for the grafana agent machine
charm. It will allow you to set up custom scrape jobs, fetch files
from arbitrary locations, send alert rules, dashboards, etc.
interface: cos_agent
scope: container

send-remote-write:
interface: prometheus_remote_write
logging-consumer:
interface: loki_push_api
grafana-cloud-config:
interface: grafana_cloud_config
limit: 1
receive-ca-cert:
interface: certificate_transfer
description: |
Obtain TLS information (certificate, ca, chain) from another charm.
tracing:
interface: tracing
limit: 1

provides:
grafana-dashboards-provider:
interface: grafana_dashboard

peers:
peers:
interface: grafana_agent_replica

config:
options:
tls_insecure_skip_verify:
description: |
Flag to skip the verification for insecure TLS.
If "true", self-signed certs can be seamlessly used; this setting
will be applied to all of the Agent configurations (Prometheus,
Loki).
type: boolean
default: false
global_scrape_timeout:
description: >
How long to wait before timing out a scrape from a target.
Supported units: y, w, d, h, m, s.
type: string
default: "10s"
global_scrape_interval:
description: >
How frequently should instances be scraped.
Supported units: y, w, d, h, m, s.
type: string
default: "1m"
always_enable_zipkin:
description: >
Force-enable the receiver for the 'zipkin' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_grpc:
description: >
Force-enable the receiver for the 'otlp_grpc' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_http:
description: >
Force-enable the receiver for the 'otlp_http' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_jaeger_grpc:
description: >
Force-enable the receiver for the 'jaeger_grpc' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_jaeger_thrift_http:
description: >
Force-enable the receiver for the 'jaeger_thrift_http' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
142 changes: 142 additions & 0 deletions charmcraft-24.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.

name: grafana-agent
type: charm
subordinate: true

description: A subordinate charm for Grafana Agent and an essential part of the COS Lite bundle.
summary: |
This Charmed Operator handles deployment, scaling, configuration, and Day 2 operations specific to Grafana Agent.

links:
documentation: https://discourse.charmhub.io/t/grafana-agent-docs-index/13452
website: https://charmhub.io/grafana-agent
source: https://github.com/canonical/grafana-agent-operator
issues: https://github.com/canonical/grafana-agent-operator/issues

base: [email protected]
platforms:
amd64:
arm64:

parts:
charm:
build-packages:
- git

# The following are needed for tls-certificates-interface
- build-essential
- python3-dev
- libffi-dev
- libssl-dev
- pkg-config
- rustc
- cargo
cos-tool:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
curl -L -O https://github.com/canonical/cos-tool/releases/latest/download/cos-tool-${CRAFT_ARCH_BUILD_FOR}
chmod +x cos-tool-*

requires:
certificates:
interface: tls-certificates
limit: 1
description: |
Certificate for the grafana agent server (API endpoint is served on :12345 by default)
to use to authenticate to clients, and the CA certificate of the signing CA.
We currently assume that the same CA signs all scrape targets (e.g. principal units).
juju-info:
description: |
`juju-info` provides basic compatibility with all charms.
If all you want is /var/log logs and node_exporter metrics,
this relation will be enough.
interface: juju-info
scope: container
cos-agent:
description: |
`cos-agent` is a dedicated relation for the grafana agent machine
charm. It will allow you to set up custom scrape jobs, fetch files
from arbitrary locations, send alert rules, dashboards, etc.
interface: cos_agent
scope: container

send-remote-write:
interface: prometheus_remote_write
logging-consumer:
interface: loki_push_api
grafana-cloud-config:
interface: grafana_cloud_config
limit: 1
receive-ca-cert:
interface: certificate_transfer
description: |
Obtain TLS information (certificate, ca, chain) from another charm.
tracing:
interface: tracing
limit: 1

provides:
grafana-dashboards-provider:
interface: grafana_dashboard

peers:
peers:
interface: grafana_agent_replica

config:
options:
tls_insecure_skip_verify:
description: |
Flag to skip the verification for insecure TLS.
If "true", self-signed certs can be seamlessly used; this setting
will be applied to all of the Agent configurations (Prometheus,
Loki).
type: boolean
default: false
global_scrape_timeout:
description: >
How long to wait before timing out a scrape from a target.
Supported units: y, w, d, h, m, s.
type: string
default: "10s"
global_scrape_interval:
description: >
How frequently should instances be scraped.
Supported units: y, w, d, h, m, s.
type: string
default: "1m"
always_enable_zipkin:
description: >
Force-enable the receiver for the 'zipkin' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_grpc:
description: >
Force-enable the receiver for the 'otlp_grpc' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_otlp_http:
description: >
Force-enable the receiver for the 'otlp_http' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_jaeger_grpc:
description: >
Force-enable the receiver for the 'jaeger_grpc' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
always_enable_jaeger_thrift_http:
description: >
Force-enable the receiver for the 'jaeger_thrift_http' protocol in Grafana Agent,
even if there is no integration currently requesting it.
type: boolean
default: false
58 changes: 0 additions & 58 deletions charmcraft.yaml

This file was deleted.

1 change: 1 addition & 0 deletions charmcraft.yaml
Loading
Loading