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

charm logging lib #392

Merged
merged 39 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2ac9679
charm logging POC
PietroPasotti Apr 29, 2024
63019fd
test for logging
PietroPasotti May 1, 2024
b0d8fff
progress
PietroPasotti May 2, 2024
283a6e1
tls working
PietroPasotti May 2, 2024
883da53
grafana source works with internal url
PietroPasotti May 2, 2024
233fab4
fmt
PietroPasotti May 2, 2024
7e1b768
static fix
PietroPasotti May 2, 2024
585d475
fmt
PietroPasotti May 2, 2024
f25e367
fixed itest
PietroPasotti May 2, 2024
0108e0a
rolled back grafana datasource fix
PietroPasotti May 2, 2024
d9bb7da
pr comments
PietroPasotti May 21, 2024
c89e89b
tested self-logging
PietroPasotti May 28, 2024
c1b2415
merge from main
PietroPasotti May 28, 2024
af0e4c2
tls logging
PietroPasotti May 28, 2024
7dfcfaf
cacert attr name
PietroPasotti May 28, 2024
61babd6
enabled scenarios
PietroPasotti May 28, 2024
704fbcc
lint
PietroPasotti May 28, 2024
17c5dd8
older python support
PietroPasotti May 28, 2024
5955d8a
pr comments
PietroPasotti May 29, 2024
d1be299
guard container connectivity in logging_endpoints call
PietroPasotti May 29, 2024
de62106
lint
PietroPasotti May 29, 2024
62ad62b
test fix attempt
PietroPasotti May 30, 2024
2d1cf51
don't raise on error
PietroPasotti May 30, 2024
dace1da
Merge branch 'main' into charm-logging
PietroPasotti May 31, 2024
85fe05c
pulled lokihandler out
PietroPasotti May 31, 2024
3e44901
removed comment
PietroPasotti May 31, 2024
7607afd
lint
PietroPasotti May 31, 2024
c9f037f
Merge branch 'charm-logging' of github.com:canonical/loki-k8s-operato…
PietroPasotti May 31, 2024
7cdb35e
pr comments
PietroPasotti Jun 7, 2024
4c88456
Merge branch 'main' into charm-logging
PietroPasotti Jun 7, 2024
dcbdd67
fetch-lib
PietroPasotti Jun 7, 2024
18789c2
Merge branch 'charm-logging' of github.com:canonical/loki-k8s-operato…
PietroPasotti Jun 7, 2024
517ab72
env cleanup if charm-logging-enable envvar was unset
PietroPasotti Jun 7, 2024
83e9e36
pr comments
PietroPasotti Jun 7, 2024
70cf96f
lint
PietroPasotti Jun 7, 2024
a8ca269
raise early instead of proceeding with logging off
PietroPasotti Jun 14, 2024
906a1a7
Merge remote-tracking branch 'origin/main' into charm-logging
PietroPasotti Jun 17, 2024
b7d3fa5
last review comments
PietroPasotti Jun 18, 2024
f61bd9e
Merge branch 'main' into charm-logging
PietroPasotti Jun 18, 2024
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
470 changes: 470 additions & 0 deletions lib/charms/loki_k8s/v0/charm_logging.py

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions lib/charms/loki_k8s/v1/loki_push_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def _alert_rules_error(self, event):

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 9
LIBPATCH = 10

PYDEPS = ["cosl"]

Expand All @@ -535,17 +535,20 @@ def _alert_rules_error(self, event):
# update all sha256 sums in PROMTAIL_BINARIES. To support a new architecture
# you only need to add a new key value pair for the architecture in PROMTAIL_BINARIES.
PROMTAIL_VERSION = "v2.9.7"
PROMTAIL_ARM_BINARY = {
"filename": "promtail-static-arm64",
"zipsha": "c083fdb45e5c794103f974eeb426489b4142438d9e10d0ae272b2aff886e249b",
"binsha": "4cd055c477a301c0bdfdbcea514e6e93f6df5d57425ce10ffc77f3e16fec1ddf",
}

PROMTAIL_BINARIES = {
"amd64": {
"filename": "promtail-static-amd64",
"zipsha": "6873cbdabf23062aeefed6de5f00ff382710332af3ab90a48c253ea17e08f465",
"binsha": "28da9b99f81296fe297831f3bc9d92aea43b4a92826b8ff04ba433b8cb92fb50",
},
"arm64": {
"filename": "promtail-static-arm64",
"zipsha": "c083fdb45e5c794103f974eeb426489b4142438d9e10d0ae272b2aff886e249b",
"binsha": "4cd055c477a301c0bdfdbcea514e6e93f6df5d57425ce10ffc77f3e16fec1ddf",
},
"arm64": PROMTAIL_ARM_BINARY,
"aarch64": PROMTAIL_ARM_BINARY,
}

# Paths in `charm` container
Expand Down
Loading