Skip to content
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
6 changes: 0 additions & 6 deletions api/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/platform/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,6 @@ const (
GPUVirtual GPUType = "Virtual"
)

type ContainerRuntimeType = string

const (
Containerd ContainerRuntimeType = "containerd"
Docker ContainerRuntimeType = "docker"
)

// ClusterPhase defines the phase of cluster constructor.
type ClusterPhase string

Expand Down Expand Up @@ -391,8 +384,6 @@ type ClusterFeature struct {
// +optional
EnableCilium bool
// +optional
ContainerRuntime ContainerRuntimeType
// +optional
IPv6DualStack bool
// Upgrade control upgrade process.
// +optional
Expand Down
771 changes: 365 additions & 406 deletions api/platform/v1/generated.pb.go

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions api/platform/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions api/platform/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,6 @@ const (
GPUVirtual GPUType = "Virtual"
)

type ContainerRuntimeType = string

const (
Containerd ContainerRuntimeType = "containerd"
Docker ContainerRuntimeType = "docker"
)

// ClusterPhase defines the phase of cluster constructor.
type ClusterPhase string

Expand Down Expand Up @@ -398,8 +391,6 @@ type ClusterFeature struct {
IPv6DualStack bool `json:"ipv6DualStack,omitempty" protobuf:"bytes,13,opt,name=ipv6DualStack"`
// +optional
EnableCilium bool `json:"enableCilium,omitempty" protobuf:"bytes,14,opt,name=enableCilium"`
// +optional
ContainerRuntime ContainerRuntimeType `json:"containerRuntime,omitempty" protobuf:"bytes,15,opt,name=containerRuntime"`
// Upgrade control upgrade process.
// +optional
Upgrade Upgrade `json:"upgrade,omitempty" protobuf:"bytes,22,opt,name=upgrade"`
Expand Down
2 changes: 0 additions & 2 deletions api/platform/v1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions build/docker/tools/provider-res/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ COPY linux-arm64/conntrack-tools-*.tar.gz res/linux-arm64/
COPY linux-amd64/docker-*.tar.gz res/linux-amd64/
COPY linux-arm64/docker-*.tar.gz res/linux-arm64/

COPY linux-amd64/containerd-*.tar.gz res/linux-amd64/
COPY linux-arm64/containerd-*.tar.gz res/linux-arm64/

COPY linux-amd64/critools-*.tar.gz res/linux-amd64/
COPY linux-arm64/critools-*.tar.gz res/linux-arm64/

COPY linux-amd64/kubernetes-*.tar.gz res/linux-amd64/
COPY linux-arm64/kubernetes-*.tar.gz res/linux-arm64/

Expand Down
2 changes: 1 addition & 1 deletion build/docker/tools/provider-res/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations under the License.

IMAGE = provider-res
VERSION = v1.20.4-2
VERSION = v1.20.4-1
REGISTRY_PREFIX ?= tkestack

COMMON_SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
Expand Down
34 changes: 0 additions & 34 deletions build/docker/tools/provider-res/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,6 @@ function download::docker() {
done
}

function download::containerd() {
if [ "${arch}" == "amd64" ]; then
containerd_arch=amd64
elif [ "${arch}" == "arm64" ]; then
containerd_arch=amd64
else
echo "[ERROR] Fail to get containerd ${arch} on ${platform} platform."
exit 255
fi

for version in ${CONTAINERD_VERSIONS}; do
wget -c "https://github.com/containerd/containerd/releases/download/v${version}/containerd-${version}-linux-${containerd_arch}.tar.gz" \
-O "containerd-${platform}-${version}.tar.gz"
done
}

function download::critools() {
if [ "${arch}" == "amd64" ]; then
critools_arch=amd64
elif [ "${arch}" == "arm64" ]; then
critools_arch=arm
else
echo "[ERROR] Fail to get critools ${arch} on ${platform} platform."
exit 255
fi

for version in ${CRITOOLS_VERSIONS}; do
wget -c "https://github.com/kubernetes-sigs/cri-tools/releases/download/${version}/crictl-${version}-linux-${critools_arch}.tar.gz" \
-O "critools-${platform}-${version}.tar.gz"
done
}

function download::kubernetes() {
for version in ${K8S_VERSIONS}; do
if [[ "${version}" =~ "tke" ]]; then
Expand Down Expand Up @@ -147,8 +115,6 @@ for os in ${OSS}; do

download::cni_plugins
download::docker
download::containerd
download::critools
download::kubernetes
download::nvidia_driver
download::nvidia_container_runtime
Expand Down
2 changes: 1 addition & 1 deletion build/docker/tools/tke-installer/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -o pipefail
REGISTRY_PREFIX=${REGISTRY_PREFIX:-tkestack}
BUILDER=${BUILDER:-default}
VERSION=${VERSION:-$(git describe --dirty --always --tags | sed 's/-/./g')}
PROVIDER_RES_VERSION=v1.20.4-2
PROVIDER_RES_VERSION=v1.20.4-1
K8S_VERSION=${PROVIDER_RES_VERSION%-*}
DOCKER_VERSION=19.03.14
OSS=(linux)
Expand Down
2 changes: 0 additions & 2 deletions cmd/setup-env/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ func main() {
env = append(env, fmt.Sprintf("OSS=%s", strings.Join(spec.OSs, " ")))
env = append(env, fmt.Sprintf("K8S_VERSIONS=%s", strings.Join(spec.K8sVersionsWithV, " ")))
env = append(env, fmt.Sprintf("DOCKER_VERSIONS=%s", strings.Join(spec.DockerVersions, " ")))
env = append(env, fmt.Sprintf("CONTAINERD_VERSIONS=%s", strings.Join(spec.ContainerdVersions, " ")))
env = append(env, fmt.Sprintf("CRITOOLS_VERSIONS=%s", strings.Join(spec.CriToolsVersions, " ")))
env = append(env, fmt.Sprintf("CNI_PLUGINS_VERSIONS=%s", strings.Join(spec.CNIPluginsVersions, " ")))
env = append(env, fmt.Sprintf("NVIDIA_DRIVER_VERSIONS=%s", strings.Join(spec.NvidiaDriverVersions, " ")))
env = append(env, fmt.Sprintf("NVIDIA_CONTAINER_RUNTIME_VERSIONS=%s", strings.Join(spec.NvidiaContainerRuntimeVersions, " ")))
Expand Down
2 changes: 1 addition & 1 deletion cmd/tke-installer/app/installer/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var components = Components{
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"},
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"},

ProviderRes: containerregistry.Image{Name: "provider-res", Tag: "v1.20.4-2"},
ProviderRes: containerregistry.Image{Name: "provider-res", Tag: "v1.20.4-1"},

TKEAuthAPI: containerregistry.Image{Name: "tke-auth-api", Tag: Version},
TKEAuthController: containerregistry.Image{Name: "tke-auth-controller", Tag: Version},
Expand Down
4 changes: 0 additions & 4 deletions cmd/tke-installer/app/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1517,10 +1517,6 @@ func (t *TKE) prepareBaremetalProviderConfig(ctx context.Context) error {
Name: "docker",
File: baremetalconstants.ConfDir + "docker/*",
},
{
Name: "containerd",
File: baremetalconstants.ConfDir + "containerd/*",
},
{
Name: "kubelet",
File: baremetalconstants.ConfDir + "kubelet/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ spec:
mountPath: /app/provider/baremetal/manifests/metrics-server/
- name: cilium-manifests-volume
mountPath: /app/provider/baremetal/manifests/cilium/
- name: containerd-volume
mountPath: /app/provider/baremetal/conf/containerd/
ports:
- containerPort: 9443
readinessProbe:
Expand Down Expand Up @@ -118,9 +116,6 @@ spec:
- name: docker-volume
configMap:
name: docker
- name: containerd-volume
configMap:
name: containerd
- name: kubelet-volume
configMap:
name: kubelet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ spec:
mountPath: /app/provider/baremetal/conf/
- name: docker-volume
mountPath: /app/provider/baremetal/conf/docker/
- name: containerd-volume
mountPath: /app/provider/baremetal/conf/containerd/
- name: kubelet-volume
mountPath: /app/provider/baremetal/conf/kubelet/
- name: kubeadm-volume
Expand Down Expand Up @@ -99,9 +97,6 @@ spec:
- name: docker-volume
configMap:
name: docker
- name: containerd-volume
configMap:
name: containerd
- name: kubelet-volume
configMap:
name: kubelet
Expand Down
58 changes: 2 additions & 56 deletions pkg/platform/provider/baremetal/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ import (
"tkestack.io/tke/pkg/platform/provider/baremetal/images"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/addons/cniplugins"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/authzwebhook"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/containerd"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/critools"
csioperatorimage "tkestack.io/tke/pkg/platform/provider/baremetal/phases/csioperator/images"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/docker"
"tkestack.io/tke/pkg/platform/provider/baremetal/phases/galaxy"
Expand Down Expand Up @@ -504,55 +502,6 @@ func (p *Provider) EnsureNvidiaContainerRuntime(ctx context.Context, c *v1.Clust
return nil
}

func (p *Provider) EnsureContainerRuntime(ctx context.Context, c *v1.Cluster) error {
if c.Cluster.Spec.Features.ContainerRuntime == platformv1.Containerd {
return p.EnsureContainerd(ctx, c)
}
return p.EnsureDocker(ctx, c)
}

func (p *Provider) EnsureCriTools(ctx context.Context, c *v1.Cluster) error {
option := &critools.Option{}
for _, machine := range c.Spec.Machines {
machineSSH, err := machine.SSH()
if err != nil {
return err
}

err = critools.Install(machineSSH, option)
if err != nil {
return errors.Wrap(err, machine.IP)
}
}

return nil
}

func (p *Provider) EnsureContainerd(ctx context.Context, c *v1.Cluster) error {
insecureRegistries := []string{p.config.Registry.Domain}
if p.config.Registry.NeedSetHosts() && c.Spec.TenantID != "" {
insecureRegistries = append(insecureRegistries, c.Spec.TenantID+"."+p.config.Registry.Domain)
}
option := &containerd.Option{
InsecureRegistries: insecureRegistries,
SandboxImage: images.Get().Pause.FullName(),
}
for _, machine := range c.Spec.Machines {
machineSSH, err := machine.SSH()
if err != nil {
return err
}

option.IsGPU = gpu.IsEnable(machine.Labels)
err = containerd.Install(machineSSH, option)
if err != nil {
return errors.Wrap(err, machine.IP)
}
}

return nil
}

func (p *Provider) EnsureDocker(ctx context.Context, c *v1.Cluster) error {
machines := map[bool][]platformv1.ClusterMachine{
true: c.Spec.ScalingMachines,
Expand Down Expand Up @@ -594,7 +543,7 @@ func (p *Provider) EnsureKubernetesImages(ctx context.Context, c *v1.Cluster) er
if err != nil {
return err
}
err = image.PullKubernetesImages(c, machineSSH, option)
err = image.PullKubernetesImages(machineSSH, option)
if err != nil {
return errors.Wrap(err, machine.IP)
}
Expand Down Expand Up @@ -632,10 +581,7 @@ func (p *Provider) EnsureKubeadm(ctx context.Context, c *v1.Cluster) error {
return err
}

option := &kubeadm.Option{
RuntimeType: c.Spec.Features.ContainerRuntime,
}
err = kubeadm.Install(machineSSH, c.Spec.Version, option)
err = kubeadm.Install(machineSSH, c.Spec.Version)
if err != nil {
return errors.Wrap(err, machine.IP)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/platform/provider/baremetal/cluster/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func NewProvider() (*Provider, error) {
// install packages
p.EnsureNvidiaDriver,
p.EnsureNvidiaContainerRuntime,
p.EnsureContainerRuntime,
p.EnsureDocker,
p.EnsureKubernetesImages,
p.EnsureKubelet,
p.EnsureCNIPlugins,
Expand Down
4 changes: 2 additions & 2 deletions pkg/platform/provider/baremetal/cluster/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (p *Provider) EnsureRenewCerts(ctx context.Context, c *v1.Cluster) error {
}

logger.Info("RenewCerts doing")
err = kubeadm.RenewCerts(c, s)
err = kubeadm.RenewCerts(s)
if err != nil {
return errors.Wrap(err, machine.IP)
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func (p *Provider) EnsureAPIServerCert(ctx context.Context, c *v1.Cluster) error
if err != nil {
return errors.Wrap(err, machine.IP)
}
err = kubeadm.RestartContainerByLabel(c, s, kubeadm.ContainerLabelOfControlPlane("kube-apiserver"))
err = kubeadm.RestartContainerByFilter(s, kubeadm.DockerFilterForControlPlane("kube-apiserver"))
if err != nil {
return err
}
Expand Down
32 changes: 0 additions & 32 deletions pkg/platform/provider/baremetal/conf/containerd/config.toml

This file was deleted.

Loading