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

feat(kk): ks v3.3.1 add support for k8s v1.24 #1704

Merged
merged 2 commits into from
Jan 17, 2023
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
21 changes: 21 additions & 0 deletions cmd/kk/pkg/version/kubesphere/ks_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,31 @@ var KsV331 = &KsInstaller{
"v1.21",
"v1.22",
"v1.23",
"v1.24",
},
UpgradeSupportVersions: []string{
V330.String(),
V320.String(),
V321.String(),
},
}

var KsV332 = &KsInstaller{
Version: V332.String(),
CRDTemplate: templates.KsInstaller,
ClusterConfigurationTemplate: templates.V332,
K8sSupportVersions: []string{
"v1.19",
"v1.20",
"v1.21",
"v1.22",
"v1.23",
"v1.24",
},
UpgradeSupportVersions: []string{
V331.String(),
V330.String(),
V320.String(),
V321.String(),
},
}
202 changes: 202 additions & 0 deletions cmd/kk/pkg/version/kubesphere/templates/cc_v332.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
/*
Copyright 2022 The KubeSphere Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package templates

import (
"text/template"

"github.com/lithammer/dedent"
)

var V332 = template.Must(template.New("v3.3.2").Parse(
dedent.Dedent(`
---
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
name: ks-installer
namespace: kubesphere-system
labels:
version: {{ .Tag }}
spec:
persistence:
storageClass: ""
authentication:
jwtSecret: ""
zone: ""
local_registry: ""
namespace_override: ""
# dev_tag: ""
etcd:
monitoring: false
endpointIps: localhost
port: 2379
tlsEnable: true
common:
core:
console:
enableMultiLogin: true
port: 30880
type: NodePort
# apiserver:
# resources: {}
# controllerManager:
# resources: {}
redis:
enabled: false
volumeSize: 2Gi
openldap:
enabled: false
volumeSize: 2Gi
minio:
volumeSize: 20Gi
monitoring:
# type: external
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
GPUMonitoring:
enabled: false
gpu:
kinds:
- resourceName: "nvidia.com/gpu"
resourceType: "GPU"
default: true
es:
# master:
# volumeSize: 4Gi
# replicas: 1
# resources: {}
# data:
# volumeSize: 20Gi
# replicas: 1
# resources: {}
logMaxAge: 7
elkPrefix: logstash
basicAuth:
enabled: false
username: ""
password: ""
externalElasticsearchHost: ""
externalElasticsearchPort: ""
alerting:
enabled: false
# thanosruler:
# replicas: 1
# resources: {}
auditing:
enabled: false
# operator:
# resources: {}
# webhook:
# resources: {}
devops:
enabled: false
# resources: {}
jenkinsMemoryLim: 8Gi
jenkinsMemoryReq: 4Gi
jenkinsVolumeSize: 8Gi
events:
enabled: false
# operator:
# resources: {}
# exporter:
# resources: {}
# ruler:
# enabled: true
# replicas: 2
# resources: {}
logging:
enabled: false
logsidecar:
enabled: true
replicas: 2
# resources: {}
metrics_server:
enabled: false
monitoring:
storageClass: ""
node_exporter:
port: 9100
# resources: {}
# kube_rbac_proxy:
# resources: {}
# kube_state_metrics:
# resources: {}
# prometheus:
# replicas: 1
# volumeSize: 20Gi
# resources: {}
# operator:
# resources: {}
# alertmanager:
# replicas: 1
# resources: {}
# notification_manager:
# resources: {}
# operator:
# resources: {}
# proxy:
# resources: {}
gpu:
nvidia_dcgm_exporter:
enabled: false
# resources: {}
multicluster:
clusterRole: none
network:
networkpolicy:
enabled: false
ippool:
type: none
topology:
type: none
openpitrix:
store:
enabled: false
servicemesh:
enabled: false
istio:
components:
ingressGateways:
- name: istio-ingressgateway
enabled: false
cni:
enabled: false
edgeruntime:
enabled: false
kubeedge:
enabled: false
cloudCore:
cloudHub:
advertiseAddress:
- ""
service:
cloudhubNodePort: "30000"
cloudhubQuicNodePort: "30001"
cloudhubHttpsNodePort: "30002"
cloudstreamNodePort: "30003"
tunnelNodePort: "30004"
# resources: {}
# hostNetWork: false
iptables-manager:
enabled: true
mode: "external"
# resources: {}
# edgeService:
# resources: {}
terminal:
timeout: 600
`)))
6 changes: 6 additions & 0 deletions cmd/kk/pkg/version/kubesphere/version_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
V321
V330
V331
V332
)

var VersionList = []Version{
Expand All @@ -45,6 +46,7 @@ var VersionList = []Version{
V321,
V330,
V331,
V332,
}

var VersionMap = map[string]*KsInstaller{
Expand All @@ -56,6 +58,7 @@ var VersionMap = map[string]*KsInstaller{
V321.String(): KsV321,
V330.String(): KsV330,
V331.String(): KsV331,
V332.String(): KsV332,
}

var CNSource = map[string]bool{
Expand All @@ -65,6 +68,7 @@ var CNSource = map[string]bool{
V321.String(): true,
V330.String(): true,
V331.String(): true,
V332.String(): true,
}

func (v Version) String() string {
Expand All @@ -85,6 +89,8 @@ func (v Version) String() string {
return "v3.3.0"
case V331:
return "v3.3.1"
case V332:
return "v3.3.2"
default:
return "invalid option"
}
Expand Down