Skip to content

Commit

Permalink
Drop support for SLES
Browse files Browse the repository at this point in the history
Signed-off-by: Waleed Malik <[email protected]>
  • Loading branch information
ahmedwaleedmalik committed Jan 9, 2023
1 parent 067a36e commit 05444f2
Show file tree
Hide file tree
Showing 35 changed files with 20 additions and 6,295 deletions.
31 changes: 0 additions & 31 deletions .prow/provider-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,37 +204,6 @@ presubmits:
limits:
memory: 7Gi

- name: pull-machine-controller-e2e-aws-sles
always_run: false
decorate: true
clone_uri: "ssh://[email protected]/kubermatic/machine-controller.git"
labels:
preset-aws: "true"
preset-hetzner: "true"
preset-e2e-ssh: "true"
preset-goproxy: "true"
preset-kind-volume-mounts: "true"
preset-docker-mirror: "true"
preset-kubeconfig-ci: "true"
spec:
containers:
- image: quay.io/kubermatic/build:go-1.19-node-18-kind-0.17-5
command:
- "./hack/ci/run-e2e-tests.sh"
args:
- "TestAWSSLESProvisioningE2E"
env:
- name: CLOUD_PROVIDER
value: aws
securityContext:
privileged: true
resources:
requests:
memory: 7Gi
cpu: 2
limits:
memory: 7Gi

- name: pull-machine-controller-e2e-aws-flatcar-coreos-cloud-init
always_run: false
decorate: true
Expand Down
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 sles rhel flatcar rockylinux
OS = amzn2 centos ubuntu rhel flatcar rockylinux
USERDATA_BIN = $(patsubst %, machine-controller-userdata-%, $(OS))

BASE64_ENC = \
Expand Down
46 changes: 0 additions & 46 deletions cmd/userdata/sles/main.go

This file was deleted.

28 changes: 13 additions & 15 deletions docs/operating-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

### Cloud provider

| | Ubuntu | CentOS | Flatcar | RHEL | SLES | Amazon Linux 2 | Rocky Linux |
|---|---|---|---|---|---|---|---|
| AWS ||||||||
| Azure ||||| x | x | |
| Digitalocean ||| x | x | x | x | |
| Equinix Metal |||| x | x | x | |
| Google Cloud Platform || x | x | x | x | x | x |
| Hetzner ||| x | x | x | x | |
| KubeVirt ||||| x | x | |
| Nutanix ||| x | x | x | x | x |
| Openstack ||||| x | x | |
| VMware Cloud Director || x | x | x | x | x | x |
| VSphere ||||| x | x | |
| | Ubuntu | CentOS | Flatcar | RHEL | Amazon Linux 2 | Rocky Linux |
|---|---|---|---|---|---|---|
| AWS |||||||
| Azure ||||| x ||
| Digitalocean ||| x | x | x ||
| Equinix Metal |||| x | x ||
| Google Cloud Platform || x | x | x | x | x |
| Hetzner ||| x | x | x ||
| KubeVirt ||||| x ||
| Nutanix ||| x | x | x | x |
| Openstack ||||| x ||
| VMware Cloud Director || x | x | x | x | x |
| VSphere ||||| x ||

## Configuring a operating system

Expand All @@ -28,7 +28,6 @@ Allowed values:
- `flatcar`
- `rhel`
- `rockylinux`
- `sles`
- `ubuntu`

OS specific settings can be set via `machine.spec.providerConfig.operatingSystemSpec`.
Expand All @@ -44,5 +43,4 @@ Machine controller may work with other OS versions that are not listed in the ta
| CentOS | 7.4.x, 7.6.x, 7.7.x |
| RHEL | 8.x |
| Rocky Linux | 8.5 |
| SLES | SLES 15 SP3 |
| Ubuntu | 20.04 LTS, 22.04 LTS |
1 change: 0 additions & 1 deletion examples/aws-machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ spec:
assignPublicIP: false
tags:
"KubernetesCluster": "6qsm86c2d"
# Can be 'ubuntu', 'centos', `rhel` or 'sles'
operatingSystem: "ubuntu"
operatingSystemSpec:
disableAutoUpdate: true
Expand Down
1 change: 0 additions & 1 deletion examples/azure-machinedeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ spec:
# that protects your applications and data from datacenter failures.
zones:
- "1"
# Can be 'ubuntu','flatcar' or 'rhel'
operatingSystem: "flatcar"
operatingSystemSpec:
distUpgradeOnBoot: false
Expand Down
16 changes: 0 additions & 16 deletions pkg/cloudprovider/provider/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,6 @@ var (
owner: "099720109477",
},
},
providerconfigtypes.OperatingSystemSLES: {
awstypes.CPUArchitectureX86_64: {
// Be as precise as possible - otherwise we might get a nightly dev build
description: "SUSE Linux Enterprise Server 15 SP3 (HVM, 64-bit, SSD-Backed)",
// The AWS marketplace ID from SLES
owner: "013907871322",
},
awstypes.CPUArchitectureARM64: {
// Be as precise as possible - otherwise we might get a nightly dev build
description: "SUSE Linux Enterprise Server 15 SP3 (HVM, 64-bit, SSD-Backed)",
// The AWS marketplace ID from SLES
owner: "013907871322",
},
},
providerconfigtypes.OperatingSystemRHEL: {
awstypes.CPUArchitectureX86_64: {
// Be as precise as possible - otherwise we might get a nightly dev build
Expand Down Expand Up @@ -351,8 +337,6 @@ func getDefaultRootDevicePath(os providerconfigtypes.OperatingSystem) (string, e
return rootDevicePathSDA, nil
case providerconfigtypes.OperatingSystemRockyLinux:
return rootDevicePathSDA, nil
case providerconfigtypes.OperatingSystemSLES:
return rootDevicePathXVDA, nil
case providerconfigtypes.OperatingSystemRHEL:
return rootDevicePathSDA, nil
case providerconfigtypes.OperatingSystemFlatcar:
Expand Down
5 changes: 1 addition & 4 deletions pkg/cloudprovider/provider/openstack/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (p *provider) AddDefaults(spec clusterv1alpha1.MachineSpec) (clusterv1alpha
}

func (p *provider) Validate(_ context.Context, spec clusterv1alpha1.MachineSpec) error {
c, pc, _, err := p.getConfig(spec.ProviderSpec)
c, _, _, err := p.getConfig(spec.ProviderSpec)
if err != nil {
return fmt.Errorf("failed to parse config: %w", err)
}
Expand Down Expand Up @@ -537,9 +537,6 @@ func (p *provider) Validate(_ context.Context, spec clusterv1alpha1.MachineSpec)
if _, err := getAvailabilityZone(computeClient, c); err != nil {
return fmt.Errorf("failed to get availability zone %q: %w", c.AvailabilityZone, err)
}
if pc.OperatingSystem == providerconfigtypes.OperatingSystemSLES {
return fmt.Errorf("invalid/not supported operating system specified %q: %w", pc.OperatingSystem, providerconfigtypes.ErrOSNotSupported)
}
// Optional fields.
if len(c.SecurityGroups) != 0 {
for _, s := range c.SecurityGroups {
Expand Down
6 changes: 1 addition & 5 deletions pkg/cloudprovider/provider/vsphere/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,11 @@ func (p *provider) getConfig(provSpec clusterv1alpha1.ProviderSpec) (*Config, *p
}

func (p *provider) Validate(ctx context.Context, spec clusterv1alpha1.MachineSpec) error {
config, pc, _, err := p.getConfig(spec.ProviderSpec)
config, _, _, err := p.getConfig(spec.ProviderSpec)
if err != nil {
return fmt.Errorf("failed to get config: %w", err)
}

if pc.OperatingSystem == providerconfigtypes.OperatingSystemSLES {
return fmt.Errorf("invalid/not supported operating system specified %q: %w", pc.OperatingSystem, providerconfigtypes.ErrOSNotSupported)
}

session, err := NewSession(ctx, config)
if err != nil {
return fmt.Errorf("failed to create vCenter session: %w", err)
Expand Down
2 changes: 0 additions & 2 deletions pkg/containerruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ func (eng *Containerd) ScriptFor(os types.OperatingSystem) (string, error) {
case types.OperatingSystemFlatcar:
err := containedFlatcarTemplate.Execute(&buf, args)
return buf.String(), err
case types.OperatingSystemSLES:
return "", nil
}

return "", fmt.Errorf("unknown OS: %s", os)
Expand Down
2 changes: 0 additions & 2 deletions pkg/containerruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ func (eng *Docker) ScriptFor(os types.OperatingSystem) (string, error) {
case types.OperatingSystemFlatcar:
err := dockerFlatcarTemplate.Execute(&buf, args)
return buf.String(), err
case types.OperatingSystemSLES:
return "", nil
}

return "", fmt.Errorf("unknown OS: %s", os)
Expand Down
3 changes: 0 additions & 3 deletions pkg/providerconfig/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/kubermatic/machine-controller/pkg/userdata/flatcar"
"github.com/kubermatic/machine-controller/pkg/userdata/rhel"
"github.com/kubermatic/machine-controller/pkg/userdata/rockylinux"
"github.com/kubermatic/machine-controller/pkg/userdata/sles"
"github.com/kubermatic/machine-controller/pkg/userdata/ubuntu"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -195,8 +194,6 @@ func DefaultOperatingSystemSpec(
return flatcar.DefaultConfigForCloud(operatingSystemSpec, cloudProvider, externalBootstrapEnabled), nil
case providerconfigtypes.OperatingSystemRHEL:
return rhel.DefaultConfig(operatingSystemSpec), nil
case providerconfigtypes.OperatingSystemSLES:
return sles.DefaultConfig(operatingSystemSpec), nil
case providerconfigtypes.OperatingSystemUbuntu:
return ubuntu.DefaultConfig(operatingSystemSpec), nil
case providerconfigtypes.OperatingSystemRockyLinux:
Expand Down
2 changes: 0 additions & 2 deletions pkg/providerconfig/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const (
OperatingSystemUbuntu OperatingSystem = "ubuntu"
OperatingSystemCentOS OperatingSystem = "centos"
OperatingSystemAmazonLinux2 OperatingSystem = "amzn2"
OperatingSystemSLES OperatingSystem = "sles"
OperatingSystemRHEL OperatingSystem = "rhel"
OperatingSystemFlatcar OperatingSystem = "flatcar"
OperatingSystemRockyLinux OperatingSystem = "rockylinux"
Expand Down Expand Up @@ -76,7 +75,6 @@ var (
OperatingSystemUbuntu,
OperatingSystemCentOS,
OperatingSystemAmazonLinux2,
OperatingSystemSLES,
OperatingSystemRHEL,
OperatingSystemFlatcar,
OperatingSystemRockyLinux,
Expand Down
1 change: 0 additions & 1 deletion pkg/userdata/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
providerconfigtypes.OperatingSystemCentOS,
providerconfigtypes.OperatingSystemFlatcar,
providerconfigtypes.OperatingSystemRHEL,
providerconfigtypes.OperatingSystemSLES,
providerconfigtypes.OperatingSystemUbuntu,
providerconfigtypes.OperatingSystemRockyLinux,
}
Expand Down
Loading

0 comments on commit 05444f2

Please sign in to comment.