onechart
                                
                                 onechart copied to clipboard
                                
                                    onechart copied to clipboard
                            
                            
                            
                        Init container support
Usecase: there are a lot of images which are almost perfect, but I'd like to modify the entrypoint.
Instead of maintaining a docker image:
- create a deployment with an initContainer and an empty volume
- the init container could create a custom entrypoint.sh on the volume
- map the volume in the main container (let's say: /scripts)
- you can refer the custom entrypoint in the main container
The init container could be used for example:
- git clone a repo to the volume
- git clone a static website repo (hugo,jekyll) build the html
- serve it with nginx
Alternatively instead of creating the entrypoint.sh in an initscript, you could write the script as a configmap (or maybe as a sealed secret if its sensitive)
So practically this would mean OneChart would get an initContainer field, and a place to put commands?
An example from https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ shows a similar syntax.
initContainers:
  - name: init-myservice
    image: busybox:1.28
    command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"]
  - name: init-mydb
    image: busybox:1.28
    command: ['sh', '-c', "unt
How about OneChart gets an initContainers field and everything underneath is just passed through to the deployment?
That could be quite flexible.
@lalyos would this be a solution to your proposal?
@lalyos check this out https://github.com/gimlet-io/onechart/pull/63