Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Fix self-hosted kubelet on bare metal platform #436

Merged
merged 11 commits into from
May 29, 2020

Commits on May 29, 2020

  1. test/components/kubernetes: enable kubelet tests on bare metal

    To be able to test fix for #376 in the CI and to make sure we don't make
    a regression there.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    924bc84 View commit details
    Browse the repository at this point in the history
  2. Makefile: build and lint baremetal tests

    Now we have some baremetal e2e tests, so they should be built and linted
    as part of the CI process.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    8325901 View commit details
    Browse the repository at this point in the history
  3. baremetal: remove unneeded whitespace from worker Ignition template

    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    b8babdb View commit details
    Browse the repository at this point in the history
  4. baremetal: enable generating kubelet config file on nodes

    This commit adds 'configure-kubelet-cgroup-driver' script to bare-metal
    nodes, which is then executed before kubelet systemd unit starts to
    generate kubelet configuration file with automatically detected cgroup
    driver to be used by kublelet.
    
    This allows to use FCL Edge channel on bare metal nodes, as Edge channel
    has different default cgroup driver than kubelet.
    
    Generating mentioned configuration file also fixes crashing self-hosted
    kubelet on bare metal platform, as it expects the file to be present on
    host filesystem.
    
    This feature is already implemented in the same way on other platforms.
    
    Closes #376.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    7b746e8 View commit details
    Browse the repository at this point in the history
  5. baremetal: add ability to add extra labels to the worker nodes

    This is required for self-hosted kubelet tests to pass as well.
    
    Part of #376.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    c383130 View commit details
    Browse the repository at this point in the history
  6. ci/baremetal: add worker node labels required by kubelet tests

    Part of #376.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    19de4a9 View commit details
    Browse the repository at this point in the history
  7. test/components/kubernetes: disable kubelet disruptive label test

    This commit disables self-hosted kubelet tests for picking up correct
    node labels, as it is flaky because of runc bug in current release of
    Flatcar stable, which makes kubelet pod to never terminate when the pod
    is scheduled for removal.
    
    Once the fix of runc reaches Flatcar stable, this test should be
    re-enabled.
    
    See also #110
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    f94216f View commit details
    Browse the repository at this point in the history
  8. pkg/platform/baremetal: add test for createTerraformConfigFile

    So the template syntax is checked by unit tests.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    be50c26 View commit details
    Browse the repository at this point in the history
  9. baremetal: use templatefile instead of template_file data source

    This commit changes the template method we use in baremetal Terraform
    code responsible for generating workers Ignition configs from
    template_file data source coming from 3rd party Terraform provider
    to built-in 'templatefile' function, which is available from
    Terraform 0.12, as it provides the exact same functionality, but
    do not require downloading 3rd party provider.
    
    Also 'template' provider recommends using this function:
    https://www.terraform.io/docs/providers/template/d/file.html.
    
    This also allows passing parameters to the template in complex types
    (like lists) and call functions like 'join' inside the template, which
    better separates data from how they are rendered.
    
    Part of #196
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    feb6a35 View commit details
    Browse the repository at this point in the history
  10. bare-metal: print logs for bootkube if it fails

    Part of #440.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    e852117 View commit details
    Browse the repository at this point in the history
  11. test/components/kubernetes: add tests that nodes has configured labels

    Now that we don't run disruptive test for self-hosted kubelet, we should
    have a test, that the labels configured by the user for the worker pool
    are actually applied on the node objects.
    
    Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
    invidian committed May 29, 2020
    Configuration menu
    Copy the full SHA
    6a2c4a8 View commit details
    Browse the repository at this point in the history