Giter Club home page Giter Club logo

gardener-extension-os-coreos's Introduction

REUSE status CI Build status Go Report Card

Project Gardener implements the automated management and operation of Kubernetes clusters as a service. Its main principle is to leverage Kubernetes concepts for all of its tasks.

Recently, most of the vendor specific logic has been developed in-tree. However, the project has grown to a size where it is very hard to extend, maintain, and test. With GEP-1 we have proposed how the architecture can be changed in a way to support external controllers that contain their very own vendor specifics. This way, we can keep Gardener core clean and independent.

This controller operates on the OperatingSystemConfig resource in the extensions.gardener.cloud/v1alpha1 API group. It supports CoreOS Container Linux and Flatcar Container Linux ("a friendly fork of CoreOS Container Linux").

The controller manages those objects that are requesting CoreOS Container Linux configuration (.spec.type=coreos) or Flatcar Container Linux configuration (.spec.type=flatcar):

---
apiVersion: extensions.gardener.cloud/v1alpha1
kind: OperatingSystemConfig
metadata:
  name: pool-01-original
  namespace: default
spec:
  type: coreos
  units:
    ...
  files:
    ...

Please find a concrete example in the example folder.

After reconciliation the resulting data will be stored in a secret within the same namespace (as the config itself might contain confidential data). The name of the secret will be written into the resource's .status field:

...
status:
  ...
  cloudConfig:
    secretRef:
      name: osc-result-pool-01-original
      namespace: default
  command: /usr/bin/coreos-cloudinit -from-file=<path>
  units:
  - docker-monitor.service
  - kubelet-monitor.service
  - kubelet.service

The secret has one data key cloud_config that stores the generation.

An example for a ControllerRegistration resource that can be used to register this controller to Gardener can be found here.

Please find more information regarding the extensibility concepts and a detailed proposal here.


How to start using or developing this extension controller locally

You can run the controller locally on your machine by executing make start. Please make sure to have the kubeconfig to the cluster you want to connect to ready in the ./dev/kubeconfig file.

Static code checks and tests can be executed by running make verify. We are using Go modules for Golang package dependency management and Ginkgo/Gomega for testing.

Feedback and Support

Feedback and contributions are always welcome. Please report bugs or suggestions as GitHub issues or join our Slack channel #gardener (please invite yourself to the Kubernetes workspace here).

Learn more!

Please find further resources about out project here:

gardener-extension-os-coreos's People

Contributors

acumino avatar aleksandarsavchev avatar ary1992 avatar beckermax avatar brumhard avatar ccwienk avatar ci-shared-oss-pipeline-0 avatar dependabot[bot] avatar dergeberl avatar dimityrmirchev avatar gardener-robot-ci-1 avatar gardener-robot-ci-2 avatar gardener-robot-ci-3 avatar ialidzhikov avatar jordanjordanov avatar kostov6 avatar lukasgr90 avatar michaeleischer avatar mrbatschner avatar oliver-goetz avatar plkokanov avatar raphaelvogel avatar rfranzke avatar shafeeqes avatar stoyanr avatar timebertt avatar timuthy avatar voelzmo avatar vpnachev avatar zkdev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gardener-extension-os-coreos's Issues

Add an option for Flatcar Linux with OperatingSystemConfig

Following up a discussion at KubeCon Barcelona:

Gardener now defines a resource of kind "OperatingSystemConfig" and it could be used to choose the alternative Flatcar Linux.

As far as I understand, the file controllers/provider-aws/charts/provider-aws/values.yaml defines the AWS AMIs for "coreos". We could add an entry for "flatcar" here with its 4 channels: stable, beta, alpha, edge

This was motivated by Inspektor Gadget that currently works on the edge channel of Flatcar Linux.

This would also require to pass a new parameter on the Kubelet command line (--cgroup-driver=systemd) or KubeletConfiguration (cgroupDriver: systemd). But I am not sure where to specify that in the gardener extensions. Any pointers?

/cc @vasu1124

Add support for newer versions of Flatcar using cgroup v2 and systemd cgroup driver

How to categorize this issue?

/area os
/kind enhancement
/priority 3

What would you like to be added:
Add support for newer versions of Flatcar using cgroup v2 and systemd cgroup driver

  1. Kubernetes <=v1.18 does not support cgroup v2, needs to be decided if this extension will support older k8s versions with newer Flatcar versions. The good thing is that k8s 1.18 is out of maintenance since long time and it is highly unlikely to be used.
  2. cgroup v2 is not working with cgroupfs driver which is explicitly set in the kubelet config. This extension needs to change it to systemd

More details what needs to be changed can be found in this nice blog from Kinvolk.

Why is this needed:
To enable support for newer flatcar versions with this extension.

Add repo/CI access for codeowners from STACKIT

How to categorize this issue?

/area os open-source
/kind enhancement

What would you like to be added:

As part of #96, @dergeberl and @timebertt are added as codeowners of this repository.

To the Gardener CI/CD team:
Can you ensure to grant us the following permissions, please?

  • maintain permissions in this repository
  • permission to trigger release pipelines for this repository

Why is this needed:

This will allow us to merge PRs, add other maintainers, and solve problems like this and this.

Containerd logrotate broken on certain Flatcar versions

How to categorize this issue?

/area os
/kind bug

What happened:

The containerd-logrotate service fails with:

Dec 14 11:40:00 shoot--fcloud--mad-prod-shared-wrk-sw1c-n2dc8-z1-77b7c-spxkx systemd[678791]: containerd-logrotate.service: Failed at step EXEC spawning /usr/sbin/logrotate: No such file or directory

The logrotate binary indeed isn't in /usr/sbin, but in /usr/bin.

What you expected to happen:

The containerd configuration specifies the correct location of the logrotate binary and thus runs successfully.

How to reproduce it (as minimally and precisely as possible):

Spin up the environment below. Probably equal Gardener (including this extension) versions and the Flatcar version are sufficient.

Anything else we need to know?:

Environment:

  • Gardener version (if relevant): 1.59.2
  • Extension version: 1.15.0
  • Kubernetes version (use kubectl version): 1.24.8
  • Cloud provider or hardware configuration: Google Cloud
  • Others: Flatcar version 3227.2.4

Rename Extension to "os-flatcar"

How to categorize this issue?

/area os
/kind enhancement

What would you like to be added: I'd like to rename the extension to flatcar

Why is this needed: To ensure people find that gardener supports flatcar linux. Just by searching for it, one might not find it, as you'd have to search for "coreos"

could we fork & rename the repo maybe?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.