kubeflow / pytorch-operator

PyTorch on Kubernetes
Apache License 2.0
307 stars 143 forks source link

feat(init_container): Add init container image CLI argument #265

Closed gaocegege closed 4 years ago

gaocegege commented 4 years ago

Fix #261

Signed-off-by: Ce Gao gaoce@caicloud.io

  -init-container-image string
        The image of the injected init container, will overwrite the value in config (default "alpine:3.10")
gaocegege commented 4 years ago

/assign @johnugeorge

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 22.97% when pulling bcc4ccb1bed3301953f5c92135344946bf3e8501 on gaocegege:cli into ec39dce0f98136ed89668c14130347616b463da5 on kubeflow:master.

johnugeorge commented 4 years ago

@gaocegege Can't you override the whole initContainerTemplate? https://github.com/kubeflow/pytorch-operator/blob/master/pkg/common/config/config.go#L23

What is your requirement?

gaocegege commented 4 years ago

@johnugeorge The template yaml should be defined in build time. We need to update the image name in runtime.

johnugeorge commented 4 years ago

Just wondering if mounting ConfigMap on a volume path doesn't work for you?

gaocegege commented 4 years ago

We can but prefer to keep flexibility. I just want to update the image and do not want to maintain a different template.

johnugeorge commented 4 years ago

SGTM /lgtm

johnugeorge commented 4 years ago

/approve

k8s-ci-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnugeorge

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubeflow/pytorch-operator/blob/master/OWNERS)~~ [johnugeorge] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment