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
1 change: 1 addition & 0 deletions api/openapi/zz_generated.openapi.go

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

2 changes: 1 addition & 1 deletion api/platform/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ type ClusterFeature struct {
EnableMetricsServer bool
// +optional
EnableCilium bool
// +optional

ContainerRuntime ContainerRuntimeType
// +optional
IPv6DualStack bool
Expand Down
6 changes: 6 additions & 0 deletions api/platform/v1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,9 @@ func SetDefaults_LBCFStatus(obj *LBCFStatus) {
obj.Phase = AddonPhaseInitializing
}
}

func SetDefaults_ClusterFeature(obj *ClusterFeature) {
if obj.ContainerRuntime == "" {
obj.ContainerRuntime = Docker
}
}
1 change: 0 additions & 1 deletion api/platform/v1/generated.proto

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

4 changes: 2 additions & 2 deletions api/platform/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ 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"`

ContainerRuntime ContainerRuntimeType `json:"containerRuntime" protobuf:"bytes,15,opt,name=containerRuntime"`
// Upgrade control upgrade process.
// +optional
Upgrade Upgrade `json:"upgrade,omitempty" protobuf:"bytes,22,opt,name=upgrade"`
Expand Down
1 change: 1 addition & 0 deletions api/platform/v1/zz_generated.defaults.go

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

4 changes: 4 additions & 0 deletions cmd/tke-installer/app/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,10 @@ func (t *TKE) createGlobalCluster(ctx context.Context) error {
}
t.completeWithProvider()

if len(t.Cluster.Spec.Features.ContainerRuntime) == 0 {
t.Cluster.Spec.Features.ContainerRuntime = platformv1.Containerd
}

if t.Cluster.Spec.ClusterCredentialRef == nil {
credential := &platformv1.ClusterCredential{
ObjectMeta: metav1.ObjectMeta{
Expand Down
1 change: 1 addition & 0 deletions test/tke/tke.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (testTke *TestTKE) ClusterTemplate(nodes ...cloudprovider.Instance) *platfo
Features: platformv1.ClusterFeature{
HA: &platformv1.HA{},
EnableMasterSchedule: true,
ContainerRuntime: platformv1.Containerd,
},
Version: env.K8sVersion(),
ClusterCIDR: "10.244.0.0/16",
Expand Down