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

base path setting on stackconfigpolicy snapshot repository #6692

Closed
thbkrkr opened this issue Apr 17, 2023 · 4 comments · Fixed by #6689
Closed

base path setting on stackconfigpolicy snapshot repository #6692

thbkrkr opened this issue Apr 17, 2023 · 4 comments · Fixed by #6689
Labels
>bug Something isn't working

Comments

@thbkrkr
Copy link
Contributor

thbkrkr commented Apr 17, 2023

For cloud repositories (azure, gcs, s3), ECK sets base_path to snapshots/<namespace>-<esName> and it's not possible to override it. This is problematic for example to configure a read-only repository where a user wants full control of the base_path.

settings["base_path"] = fmt.Sprintf("snapshots/%s", suffix)

I missed the original intent that was to only add <namespace>-<esName> to the user provided base_path like it's done for location for fs repository and path for hdfs repository. But this is also a problem if the need is to fully control the base_path.

I could see 3 cases, but I'm not sure we need to deal with the third one, which makes everything more complex because we need to be able to distinguish it from the second one.

user provided base_path configured base_path
1) no base_path snapshots/ns1-es1
2) full base_path some/thing some/thing
3) partial base_path some/thing some/thing/ns1-es1
@pebrc
Copy link
Collaborator

pebrc commented Apr 18, 2023

What would be the use case for the 3 case?

@thbkrkr
Copy link
Contributor Author

thbkrkr commented Apr 18, 2023

A use-case where you want something else than snapshots as the location to write the snapshots in the bucket.

Imagine you have two environments but you are restricted to one bucket (ok, it's bizarre, but) and you want to configure a different base_path per env so you can have the same name for the clusters: snapshots-qa/ns1-es1 & snapshots-prod/ns1-es1.

Use-case 2 makes sense only for read-only repositories. For write/read repositories, you need 1 or 3.

@pebrc
Copy link
Collaborator

pebrc commented Apr 18, 2023

I think it is a reasonable restriction to say if you want to share the bucket that you have to live with the naming scheme we propose?

@thbkrkr
Copy link
Contributor Author

thbkrkr commented Apr 18, 2023

I think so too and this is the option I finally opted into #6689.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants