Remove dependency on undocumented binaries in crate docker image
- Dominant language
- Python
- Stars
- 27
- Forks
- 9
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 13
Description
## Problem
Currently the operator uses various tools like `hostname` or `curl`:
https://github.com/crate/crate-operator/blob/ae141f2e56f2e4d2464a953642f3761c2fa020ee/crate/operator/create.py#L505-L523
These are not documented or tested to be available in [docker-crate](https://github.com/crate/docker-crate/).
Furthermore, the logic depends on `bin/crate` allowing shell expansion - which is also not officially supported but rather working by accident.
## Options
1. Operator stops using these commands and shell expansion.
2. The commands get official support with tests and documentation. Same for the shell expansion.
As for 1)
- One way to do that could be to inject a wrapper script into the container - that could even be a python script because that's available for crash.
- We could look into what the commands are used for and see if/where it is appropriate to add first class support in CrateDB. E.g. have hostname inferred from the system-hostname. Or via some env variable. Detect that it is running in a container and infer container name. Things like that.
Contributor guide
Research direction
Start in operator/create.py at lines 505-523 and trace how hostname, curl, and shell expansion are used. Check the docker-crate image assumptions mentioned in the issue. Done means either those dependencies are removed from the operator or their support is explicitly established with the needed tests and documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100