Closed DomFleischmann closed 3 years ago
Currently if you want to start a container through Pebble you will have to provide the command to start the container in the
command
field.This command seems to be equivalent to the ENTRYPOINT field of a Dockerfile, for example.
Seems to be equivalent but, so far I am having a different result than using pod_specs.
This issue must be filed against juju. Pebble has no idea it's even running inside a container, and there's no way for it to ask its environment about what args or commands it's supposed to run with.
There's an issue related to this feature that makes sense for Pebble, though, in terms of organization of commands and arguments, but that's not about Docker or entrypoints.
Bug filed against Juju: https://bugs.launchpad.net/juju/+bug/1929861
Currently if you want to start a container through Pebble you will have to provide the command to start the container in the
command
field.This command seems to be equivalent to the ENTRYPOINT field of a Dockerfile, for example.
In the case of a container definition in a Pod in Kubernetes the
command
field is optional and will default to the entrypoint if none is stated. Similar default behavior in Pebble would make sense. Additionally anarguments
field to expand the entrypoint would also be very useful, for further configuration.More context on how this is done in Kubernetes: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
Use case of a pod_spec charm where no
command
option is provided, but aargument
option is: https://github.com/charmed-kubernetes/kubernetes-dashboard-operator/blob/main/charms/kubernetes-dashboard/src/charm.py#L79