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

First TLS instrumentation #20

Merged
merged 29 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0a88983
first TLS instrumentation
Abuelodelanada Dec 8, 2023
849adcf
linting
Abuelodelanada Dec 8, 2023
0cdcbd0
let's use mimir default values
Abuelodelanada Dec 8, 2023
a2856ab
let's start with a simpler version
Abuelodelanada Dec 8, 2023
9f2d100
let's start with a simpler version
Abuelodelanada Dec 8, 2023
0af4dec
first instrumentation of TLS for nginx
Abuelodelanada Dec 12, 2023
64555d1
change client_auth_type value
Abuelodelanada Dec 12, 2023
6f0276a
add integration test
Abuelodelanada Dec 14, 2023
be384ca
Update tox.ini
Abuelodelanada Dec 14, 2023
482fd0c
address Leon's comments
Abuelodelanada Dec 14, 2023
563d632
server_name added
Abuelodelanada Dec 15, 2023
eae1a55
Dylan's suggestions addressed
Abuelodelanada Dec 15, 2023
c91f9b6
Merge branch 'main' into tls
Abuelodelanada Jan 5, 2024
924d51b
remove _build_tls_config
Abuelodelanada Jan 5, 2024
667593e
update loki_push_api
Abuelodelanada Jan 8, 2024
013ef3b
putting everything in order after the merge
Abuelodelanada Jan 8, 2024
3aa49b5
Merge branch 'main' into tls
Abuelodelanada Jan 8, 2024
0bbf84b
Merge branch 'main' into tls
Abuelodelanada Jan 11, 2024
9e92697
fix error in merge
Abuelodelanada Jan 11, 2024
6c701b6
change certhandler v0 with v1
Abuelodelanada Jan 11, 2024
4c3caff
fix integration tests
Abuelodelanada Jan 13, 2024
005f7ce
linting
Abuelodelanada Jan 13, 2024
9079331
Merge branch 'main' into tls
Abuelodelanada Jan 15, 2024
9d7e306
publish and grant certs
Abuelodelanada Jan 16, 2024
9eb38ea
update cert_handler
Abuelodelanada Jan 17, 2024
81f3ce4
change parameter name
Abuelodelanada Jan 17, 2024
9b43aa2
move methos from mimir_cluster to charm
Abuelodelanada Jan 17, 2024
666b14b
charm's code tidy up
Abuelodelanada Jan 17, 2024
8fc2489
add missing event handler
Abuelodelanada Jan 17, 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
3 changes: 3 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ parts:
charm-binary-python-packages:
- pydantic>2.0

# For v2.tls_certificates
- cryptography
- jsonschema
13 changes: 11 additions & 2 deletions lib/charms/mimir_coordinator_k8s/v0/mimir_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
DEFAULT_ENDPOINT_NAME = "mimir-cluster"

LIBAPI = 0
LIBPATCH = 2
LIBPATCH = 3

BUILTIN_JUJU_KEYS = {"ingress-address", "private-address", "egress-subnets"}

MIMIR_CONFIG_FILE = "/etc/mimir/mimir-config.yaml"
MIMIR_CERT_FILE = "/etc/mimir/server.cert"
MIMIR_KEY_FILE = "/etc/mimir/private.key"
MIMIR_CLIENT_CA_FILE = "/etc/mimir/ca.cert"

class MimirClusterError(Exception):
"""Base class for exceptions raised by this module."""
Expand Down Expand Up @@ -273,7 +277,7 @@ def gather_addresses(self) -> Set[str]:
addresses_by_role = self.gather_addresses_by_role()
for role, address_set in addresses_by_role.items():
data.update(address_set)

return data


Expand Down Expand Up @@ -417,3 +421,8 @@ def get_mimir_config(self) -> Dict[str, Any]:
log.error(f"invalid databag contents: {e}")
return {}
return data

def get_cert_secret_ids(self) -> Optional[str]:
"""Fetch certificates secrets ids for the mimir config."""
if self.relation and self.relation.app:
return self.relation.data[self.relation.app].get("secrets", None)
Loading
Loading