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

feat: Single Kernel Charm architecture and first handlers #3

Open
wants to merge 216 commits into
base: 6/edge
Choose a base branch
from

Conversation

Gu1nness
Copy link
Collaborator

@Gu1nness Gu1nness commented Nov 28, 2024

🏷 Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update
  • Tooling and CI changes
  • Dependencies upgrade or change

📝 Description

  • Layout the repository structure (config, core, events, managers, state, utils, workload, lib)
  • lib stores the charmhub libraries (better solution to find ?)
  • Bring a (not-sufficient) first round of unit tests
  • Already implemented : peer-relation, client relation, s3 relation, TLS relation
  • Managers contains : config (handle configuration of each service), mongo for mongod related code, tls for TLS related code, backups for backup and S3 related code, mongodb_operator for mongodb operations and lifecycle
  • Workload : One workload per service, with its configuration
  • State : State of each relation + Peer relation + Model information
  • utils : mongodb utils (user, connection, commands) + helpers
  • config for all charm related constants
  • core : abstract classes, secrets, charm config
  • events: lifecycle for charm agnostic lifecycle events, backups for S3 related events, database for client related events, password_actions for get/set password, primary for get-primary, tls for TLS events.
  • templates: the jinja template for logrotate (and if more templates to come)
  • exceptions.py : All exceptions
  • status: Very basic status manager, to be upgraded.

📑 Motivation and Context

This PR implements a huge amount of tickets and features, too long to be described here.
It bring the overall proposed structure, a lot of tooling, some basic integrations, some basic testing.

🧪 How Has This Been Tested?

  • Not everything is fully tested yet.
  • Tests are done with unit tests against a test charm stored in tests/unit/mongodb_test_charm
  • Very basic manual testing of deployment

✅ Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants