Skip to content

Fold MCO images into one #739

Closed
Closed

Description

@runcom

Since MCO and MCC are strictly related, it would be appropriate to fold all our images into just one to avoid falling into bugs and error whenever the build system isn't properly setup and could lead to different images being built from different commits.

This requires changes at least to:

  • installer's bootkube
  • mco itself

To expand on the above, this should be done in 2 steps to avoid any breakage (and we need to think about backwards compatibility as well):

Activity

  1. runcom commented on May 31, 2019

    @runcom
    MemberAuthor

    I've expanded the points above to something clearer now

  2. runcom commented on Jun 12, 2019

    @runcom
    MemberAuthor
  3. cgwalters commented on Jun 12, 2019

    @cgwalters
    Member

    A preparatory step for this is probably to go to a single binary (hypermco) too right? Otherwise we're wasting a lot of space. But I guess it's not required.

    I was thinking of this more like:

    • Change e.g. Dockerfile.machine-config-operator to put all the binaries inside there
    • Change our manifests to launch that image, overriding the command (i.e. ENTRYPOINT) for everything except the operator

    Now we have a single image running in the cluster by default; no other PRs to installer required right?
    But we are building 3 unnecessary images, so the remaining work would be similar to your outline. I suspect we'd also need patches to the release controller and ART's configuration to delete builds?

  4. runcom commented on Jun 12, 2019

    @runcom
    MemberAuthor

    I suspect we'd also need patches to the release controller and ART's configuration to delete builds?

    yep, that's gonna be a required thing anyway.

    I was thinking of this more like:

    • Change e.g. Dockerfile.machine-config-operator to put all the binaries inside there
    • Drop the default ENTRYPOINT, change our manifests to launch that image

    The thing is bootkube needs to have plumbing for that MCO image as well (we're currently just passing the MCC/MCD/MCS image names to the render routine, now we'll need another one, the MCO one since that's currently just substituted by oc adm release new)

  5. cgwalters commented on Jun 12, 2019

    @cgwalters
    Member

    If we don't change the ENTRYPOINT then the behavior of the MCO image in bootkube.sh shouldn't require changes right? I edited my suggestion above.

  6. runcom commented on Jun 12, 2019

    @runcom
    MemberAuthor

    If we don't change the ENTRYPOINT then the behavior of the MCO image in bootkube.sh shouldn't require changes right? I edited my suggestion above.

    yes, maybe I'm wrong, but the image names must be plumbed anyway through i.e. https://github.com/openshift/installer/blob/master/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template#L199 to be rendered in the manifest for the other subcomponents - that's why I thought we needed changes in bootkube also because right now the MCO image isn't known by the operator

  7. runcom commented on Jun 12, 2019

    @runcom
    MemberAuthor

    Something like this:

    diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
    index ecb30c8f0..4364e2950 100755
    --- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
    +++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
    @@ -199,6 +199,7 @@ then
                            --machine-config-server-image=${MACHINE_CONFIG_SERVER_IMAGE} \
                            --machine-config-daemon-image=${MACHINE_CONFIG_DAEMON_IMAGE} \
                            --machine-config-oscontent-image=${MACHINE_CONFIG_OSCONTENT} \
    +                       --machine-config-operator=${MACHINE_CONFIG_OPERATOR_IMAGE} \
                            --infra-image=${MACHINE_CONFIG_INFRA_IMAGE} \
                            --cloud-config-file=/assets/manifests/cloud-provider-config.yaml
    

    so that we can render the subcomponents manifests with that (single) image

    maybe I'm overlooking something obvious tho

  8. cgwalters commented on Jun 12, 2019

    @cgwalters
    Member

    so that we can render the subcomponents manifests with that (single) image

    Oh sorry I see! Right. Yes. Though I think we could also use the downward API to inspect our own pod's container image or so?

  9. runcom commented on Jun 12, 2019

    @runcom
    MemberAuthor

    Though I think we could also use the downward API to inspect our own pod's container image or so?

    we could also yeah - I thought about going the proper way through bootkube as this is not something we'll block the next release on so we might as well just do it through bootkube

  10. 50 remaining items

  11. runcom commented on Jul 12, 2019

    @runcom
    MemberAuthor

    @runcom once this is all finished - doesn't this work close #421

    yep 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions