Repository navigation
feat(workload): port K8s sidecar services and TLS trust-store seams (10/14) - #364
Draft
marceloneppel wants to merge 1 commit into
Draft
marceloneppel wants to merge 1 commit into
marceloneppel wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Part of the final charm->library migration: the K8s charm still owns the sidecar ServiceDict builders and the container TLS trust-store handling. Final state: no logic charm-side.
Solution
K8sWorkload.push_file: the container push with the charm permissions (make_dirs/0o400/user/group). Port of_push_file_to_workload.K8sWorkload.sync_tls_trust_store(ca, certs_path): the can_connect guard + the CA push +update-ca-certificates. The/tmppeer CA bundle write stays charm-class-side (k8s-5) — the libTLSManager.get_peer_ca_bundleprovides the content.K8sWorkload.generate_ldap_service: the faithful ServiceDict env (DATABASE_PORT string literal, ACCESS_GROUP_IDENTITY from utils.postgresql), parameterized.K8sWorkload.generate_metrics_service: the/usr/bin/prometheus-postgres-exportercharm form + the monitoring-secret startup gate.tests/unit/test_k8s_workload_seams.py(5 cases, container mocked at the workload level).Checklist