Skip to content

baremetal bootstrap needs to use coredns and keepalived from the release image #2038

Closed

Description

@markmc

From openshift-metal3/kni-installer#61

The installer must be able to run in a way that only pulls official OpenShift release image. Right now we're deploying two custom images:

  1. quay.io/openshift-metal3/coredns-mdns:latest
  2. quay.io/celebdor/keepalived:latest

These are run from the coredns.sh and keepalived.sh bootstrap node scripts

Activity

  1. markmc commented on Jul 18, 2019

    @markmc
    ContributorAuthor

    /label platform/baremetal

  2. markmc commented on Jul 18, 2019

    @markmc
    ContributorAuthor

    The installer itself does not query the release image for any image pull specs, so we can't rely on the installer templating to insert the correct images before constructing the ignition configs which include these scripts and the corresponding systemd units

    Instead, we need to have bootkube.sh to make the correct pull specs available to these scripts (via an rc file?) before systemd starts the services

  3. added
    platform/baremetal
    on Jul 18, 2019
  4. hardys commented on Jul 18, 2019

    @hardys

    Note there has been discussion ref openshift-metal3/kni-installer#155 about moving from the systemd units to static-pods, how would we reference the necessary images in that case?

  5. markmc commented on Jul 18, 2019

    @markmc
    ContributorAuthor

    Note there has been discussion ref openshift-metal3/kni-installer#155 about moving from the systemd units to static-pods, how would we reference the necessary images in that case?

    Great point - let's get some basics straight. The pull specs for these containers must come from the release image via the following paths:

    1. This sort of image substitution happens (i.e. query the pull spec of a container from the release image) first when you run oc adm release new, it does this substitution on everything from the /manifests directory all containers with the io.openshift.release.operator=true label and puts those files in the /release-manifests directory of the release image
    2. Then in bootkube - the installer templates bootkube.sh with the release image pull spec, and bootkube uses the image command from the release image (really the c-v-o binary) to query the pull spec for a container and then it passes that down to everything else
    3. The only other place is also in bootkube where it uses the render command from the release image to substitute the release image itself into c-v-o's own manifests in the /manifests directory of the release image

    We're not taking these static pod manifests from the release image - although the manifests from m-c-o for all other nodes will be in the release image! - so that means we have to consider bootkube. The c-v-o manifest rendering route doesn't make sense, so that leaves (2)

    Currently openshift-metal3/kni-installer#155 uses ignition to define the static pods, so I guess they get run as soon as kubelet comes up and bootkube.sh is only run after kubelet comes up. So I think this implies that we will need to instead have bootkube.sh define the static pods by templating the manifests with the pull specs from the release image and dropping them into /etc/kubernetes/manifests

    Perhaps there is some potential for m-c-o bootstrap (which is called from bootkube.sh, and renders the m-c-o bootstrap pod manifest) to be the right thing to render these static pod manifests ... that's not totally clear to me

  6. runcom commented on Jul 18, 2019

    @runcom
    Member

    Perhaps there is some potential for m-c-o bootstrap (which is called from bootkube.sh, and renders the m-c-o bootstrap pod manifest) to be the right thing to render these static pod manifests ... that's not totally clear to me

    how does this rendering relates specifically to the MCO? otherwise, I think any of your operator could have a render mechanism similar to the MCO ones that lays down manifests that you own - right now, everything we render in kube-land is owned by us and our operator (with a notable exception of the setup-etcd-environment).

    EDIT:

    re-read this now:

    We're not taking these static pod manifests from the release image - although the manifests from m-c-o for all other nodes will be in the release image! - so that means we have to consider bootkube. The c-v-o manifest rendering route doesn't make sense, so that leaves (2)

  7. celebdor commented on Jul 18, 2019

    @celebdor
    Contributor

    It's about getting (almost) the same we have on MCO in the bootstrap node.

  8. markmc commented on Jul 18, 2019

    @markmc
    ContributorAuthor

    Discussion on slack indicates that @celebdor is now investigating whether to use m-c-o bootstrap to render the keepalived and coredns static pods (and associated config files) on the bootstrap node (for the baremetal platform only)

    bootkube.sh would query the release image for those containers and pass them to m-c-o bootstrap

    m-c-o bootstrap would also use the VIP information from Infra.Status.PlatformStatus.BareMetal

    The approach makes sense because m-c-o is already setting up these static pods on other nodes, and m-c-o also renders one static pod on the bootstrap node

  9. hardys commented on Aug 22, 2019

    @hardys

    @markmc just tidying up platform/baremetal issues, this was closed via #2119 I believe?

  10. markmc commented on Aug 22, 2019

    @markmc
    ContributorAuthor

    And #2075 - good point

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform/baremetal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions