Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup operating systems #62

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IMAGE_TAG = \
$(shell echo $$(git rev-parse HEAD && if [[ -n $$(git status --porcelain) ]]; then echo '-dirty'; fi)|tr -d ' ')
IMAGE_NAME ?= $(REGISTRY)/$(REGISTRY_NAMESPACE)/machine-controller:$(IMAGE_TAG)

OS = amzn2 centos ubuntu rhel flatcar rockylinux
OS = ubuntu flatcar
USERDATA_BIN = $(patsubst %, machine-controller-userdata-%, $(OS))

BASE64_ENC = \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
### What Works

- Creation of worker nodes on AWS and Openstack
- Using Ubuntu, Flatcar, CentOS 7 or Rocky Linux 8 distributions ([not all distributions work on all providers](/docs/operating-system.md))
- Using Ubuntu and Flatcar distributions ([not all distributions work on all providers](/docs/operating-system.md))

### Supported Kubernetes Versions

Expand Down
1 change: 0 additions & 1 deletion cmd/provision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This command offers all required functionality to provision an host to join a Ku
The following operating systems are supported

- Ubuntu 18.04
- CentOS 7
- Flatcar

## Requirements
Expand Down
58 changes: 0 additions & 58 deletions cmd/userdata/amzn2/main.go

This file was deleted.

58 changes: 0 additions & 58 deletions cmd/userdata/centos/main.go

This file was deleted.

58 changes: 0 additions & 58 deletions cmd/userdata/rhel/main.go

This file was deleted.

58 changes: 0 additions & 58 deletions cmd/userdata/rockylinux/main.go

This file was deleted.

2 changes: 1 addition & 1 deletion docs/howto-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Provider implementations are located in individual packages in `github.com/kuber
When retrieving the individual configuration from the provider specification a type for unmarshalling is needed. Here first the provider configuration is read and based on it the individual values of the configuration are retrieved. Typically the access data (token, ID/key combination, document with all information) alternatively can be passed via an environment variable. According
methods of the used `providerconfig.ConfigVarResolver` do support this.

For creation of new machines the support of the possible information has to be checked. The machine controller supports _CentOS_, _Flatcar_ and _Ubuntu_. In case one or more aren't supported by the cloud infrastructure the error `providerconfig.ErrOSNotSupported` has to be returned.
For creation of new machines the support of the possible information has to be checked. The machine controller supports _Flatcar_ and _Ubuntu_. In case one or more aren't supported by the cloud infrastructure the error `providerconfig.ErrOSNotSupported` has to be returned.

## Integrate provider into the Machine Controller

Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ There is a script to upload all supported image to OpenStack.
By default all images will be named `machine-controller-${OS_NAME}`.
The image names can be overwritten using environment variables:
```bash
UBUNTU_IMAGE_NAME="ubuntu" CENTOS_IMAGE_NAME="centos" ./hack/setup-openstack-images.sh
UBUNTU_IMAGE_NAME="ubuntu" ./hack/setup-openstack-images.sh
```
16 changes: 4 additions & 12 deletions docs/operating-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@

### Cloud provider

| | Ubuntu | CentOS | Flatcar | RHEL | Amazon Linux 2 | Rocky Linux |
|---|---|---|---|---|---|---|
| AWS | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Openstack | ✓ | ✓ | ✓ | ✓ | x | ✓ |
| | Ubuntu | Flatcar |
|---|---|---|
| AWS | ✓ | ✓ |
| Openstack | ✓ | ✓ |

## Configuring a operating system

The operating system to use can be set via `machine.spec.providerConfig.operatingSystem`.
Allowed values:

- `amzn2`
- `centos`
- `flatcar`
- `rhel`
- `rockylinux`
- `ubuntu`

OS specific settings can be set via `machine.spec.providerConfig.operatingSystemSpec`.
Expand All @@ -30,8 +26,4 @@ Machine controller may work with other OS versions that are not listed in the ta

| | Versions |
|---|---|
| AmazonLinux2 | 2.x |
| CentOS | 7.4.x, 7.6.x, 7.7.x |
| RHEL | 8.x |
| Rocky Linux | 8.5 |
| Ubuntu | 20.04 LTS, 22.04 LTS |
16 changes: 0 additions & 16 deletions docs/rhel-custom-image.md

This file was deleted.

7 changes: 0 additions & 7 deletions examples/aws-machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,5 @@ spec:
operatingSystemSpec:
disableAutoUpdate: true
distUpgradeOnBoot: false
# 'rhelSubscriptionManagerUser' is only used for rhel os and can be set via env var `RHEL_SUBSCRIPTION_MANAGER_USER`
rhelSubscriptionManagerUser: "<< RHEL_SUBSCRIPTION_MANAGER_USER >>"
# 'rhelSubscriptionManagerPassword' is only used for rhel os and can be set via env var `RHEL_SUBSCRIPTION_MANAGER_PASSWORD`
rhelSubscriptionManagerPassword: "<< RHEL_SUBSCRIPTION_MANAGER_PASSWORD >>"
# 'rhsmOfflineToken' if it was provided red hat systems subscriptions will be removed upon machines deletions, and if wasn't
# provided the rhsm will be disabled and any created subscription won't be removed automatically
rhsmOfflineToken: "<< REDHAT_SUBSCRIPTIONS_OFFLINE_TOKEN >>"
versions:
kubelet: 1.28.5
9 changes: 1 addition & 8 deletions examples/openstack-machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,10 @@ spec:
# the list of metadata you would like to attach to the instance
tags:
tagKey: tagValue
# Can be 'ubuntu' or 'centos'
# Can be 'ubuntu'
operatingSystem: "ubuntu"
operatingSystemSpec:
distUpgradeOnBoot: true
disableAutoUpdate: true
# 'rhelSubscriptionManagerUser' is only used for rhel os and can be set via env var `RHEL_SUBSCRIPTION_MANAGER_USER`
rhelSubscriptionManagerUser: "<< RHEL_SUBSCRIPTION_MANAGER_USER >>"
# 'rhelSubscriptionManagerPassword' is only used for rhel os and can be set via env var `RHEL_SUBSCRIPTION_MANAGER_PASSWORD`
rhelSubscriptionManagerPassword: "<< RHEL_SUBSCRIPTION_MANAGER_PASSWORD >>"
# 'rhsmOfflineToken' if it was provided red hat systems subscriptions will be removed upon machines deletions, and if wasn't
# provided the rhsm will be disabled and any created subscription won't be removed automatically
rhsmOfflineToken: "<< REDHAT_SUBSCRIPTIONS_OFFLINE_TOKEN >>"
versions:
kubelet: 1.28.5
8 changes: 0 additions & 8 deletions examples/operating-system-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,7 @@ spec:
description: "OSType represent the operating system name e.g: ubuntu"
enum:
- flatcar
- rhel
- centos
- ubuntu
- amzn2
- rockylinux
type: string
osVersion:
description: OSVersion the version of the operating system
Expand Down Expand Up @@ -667,11 +663,7 @@ spec:
description: "OSType represent the operating system name e.g: ubuntu"
enum:
- flatcar
- rhel
- centos
- ubuntu
- amzn2
- rockylinux
type: string
osVersion:
description: OSVersion the version of the operating system
Expand Down
2 changes: 1 addition & 1 deletion hack/build-kubevirt-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BUILD_NUM=2

cd $(dirname $0)/kubevirt_dockerfiles

for flavor in ubuntu centos; do
for flavor in ubuntu; do
docker build \
-t quay.io/kubermatic/machine-controller-kubevirt:$flavor-$BUILD_NUM \
-f dockerfile.$flavor .
Expand Down
Loading
Loading