-
Notifications
You must be signed in to change notification settings - Fork 16
feat: support GCS repository for snapshot operations #766
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
Conversation
6ed68d5 to
3e6aec3
Compare
3e6aec3 to
6d9e941
Compare
skourta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @gatici! I left some comments
tests/unit/resources/config/opensearch-security/internal_users.yml
Outdated
Show resolved
Hide resolved
|
|
||
| logger.info("Setting up configuration for gcs-integrator charm...") | ||
| await ops_test.model.applications[GCS_INTEGRATOR].set_config(full_cfg) | ||
| await ops_test.model.wait_for_idle(apps=[GCS_INTEGRATOR], timeout=TIMEOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use wait_until
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wait_until expects an app status and if we do not provide, it is counted as active. Here we do not want to check the app status as this is a generic helper. We only want to check if juju finishes all work and model reaches a stable state. The status checks are done in the test cases.
akram09
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gatici !
Signed-off-by: gatici <[email protected]> # Conflicts: # lib/charms/opensearch/v0/opensearch_snapshots.py
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
…ap_daemon home Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
2aae80c to
e7cbcb4
Compare
e7cbcb4 to
9951068
Compare
Signed-off-by: gatici <[email protected]>
Mehdi-Bendriss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Gulsum, great work! We're already seeing the result of the refactor :)
|
|
||
| def write_gcs_service_account_json( | ||
| secret_key: str, | ||
| dst: str = "/var/snap/opensearch/common/home/snap_daemon/service_account.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this and next function as a broad helpers, as we're ultimately just writing/deleting a text file (which is also not k8s compatible), feel free to use opensearch.write_file as those will ultimately be moved to the Workload class
Signed-off-by: gatici <[email protected]>
Signed-off-by: gatici <[email protected]>
Mehdi-Bendriss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Gulsum! I do have one question
skourta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the hard work @gatici!
Signed-off-by: gatici <[email protected]>
Description of issue or feature:
This PR allows Opensearch to use with Google Cloud storage to store snapshots or restore them.
With this change, operators can use a gcs-integrator relation to:
in the same way they already do with S3 and Azure.
Solution:
GCS Integration
How was this change tested?
Checklist