diff --git a/VERSION b/VERSION index 8f1f375db..60453e690 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.0.0-rc4 \ No newline at end of file +v1.0.0 \ No newline at end of file diff --git a/charts/spiderpool/Chart.yaml b/charts/spiderpool/Chart.yaml index 4b178ead5..aef94e39d 100644 --- a/charts/spiderpool/Chart.yaml +++ b/charts/spiderpool/Chart.yaml @@ -5,11 +5,11 @@ icon: https://raw.githubusercontent.com/spidernet-io/spiderpool/main/docs/images # application or library type: application # no need to modify this version , CI will auto update it with /VERSION -version: 1.0.0-rc4 +version: 1.0.0 # This field is informational, and has no impact on chart version calculations . # Leaving it unquoted can lead to parsing issues in some cases # no need to modify this version , CI will auto update it with /VERSION -appVersion: "1.0.0-rc4" +appVersion: "1.0.0" kubeVersion: ">= 1.16.0-0" description: underlay CNI solution for kubernetes sources: diff --git a/pkg/coordinatormanager/coordinator_informer.go b/pkg/coordinatormanager/coordinator_informer.go index 2de3b294d..f90a38aa5 100644 --- a/pkg/coordinatormanager/coordinator_informer.go +++ b/pkg/coordinatormanager/coordinator_informer.go @@ -506,7 +506,6 @@ func (cc *CoordinatorController) updatePodAndServerCIDR(ctx context.Context, log return coordCopy } - k8sPodCIDR, k8sServiceCIDR = utils.ExtractK8sCIDRFromKCMPod(&podList.Items[0]) logger.Sugar().Infof("kube-controller-manager k8sPodCIDR %v, k8sServiceCIDR %v", k8sPodCIDR, k8sServiceCIDR) } diff --git a/pkg/coordinatormanager/coordinator_informer_test.go b/pkg/coordinatormanager/coordinator_informer_test.go deleted file mode 100644 index 5dac9062a..000000000 --- a/pkg/coordinatormanager/coordinator_informer_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Authors of spidernet-io -// SPDX-License-Identifier: Apache-2.0 - -package coordinatormanager - -import ( - "encoding/json" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - corev1 "k8s.io/api/core/v1" -) - -var _ = Describe("Coordinator Manager", Label("coordinatorinformer", "informer_test"), Serial, func() { - DescribeTable("should extract CIDRs correctly", - func(testName, cmStr string, expectedPodCIDR, expectedServiceCIDR []string, expectError bool) { - var cm corev1.ConfigMap - err := json.Unmarshal([]byte(cmStr), &cm) - Expect(err).NotTo(HaveOccurred(), "Failed to unmarshal configMap: %v\n", err) - - podCIDR, serviceCIDR, err := ExtractK8sCIDRFromKubeadmConfigMap(&cm) - - if expectError { - Expect(err).To(HaveOccurred(), "Expected an error but got none") - } else { - Expect(err).NotTo(HaveOccurred(), "Did not expect an error but got one: %v", err) - } - - Expect(podCIDR).To(Equal(expectedPodCIDR), "Pod CIDR does not match") - Expect(serviceCIDR).To(Equal(expectedServiceCIDR), "Service CIDR does not match") - }, - Entry("ClusterConfiguration", - "ClusterConfiguration", - clusterConfigurationJson, - []string{"192.168.165.0/24"}, - []string{"245.100.128.0/18"}, - false, - ), - Entry("No ClusterConfiguration", - "No ClusterConfiguration", - noClusterConfigurationJson, - nil, - nil, - true, - ), - Entry("No CIDR", - "No CIDR", - noCIDRJson, - nil, - nil, - false, - ), - ) - -}) diff --git a/pkg/coordinatormanager/coordinatormanager_suite_test.go b/pkg/coordinatormanager/coordinatormanager_suite_test.go deleted file mode 100644 index ff9687ab2..000000000 --- a/pkg/coordinatormanager/coordinatormanager_suite_test.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Authors of spidernet-io -// SPDX-License-Identifier: Apache-2.0 - -package coordinatormanager - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var ( - clusterConfigurationJson string - noClusterConfigurationJson string - noCIDRJson string -) - -func TestCoordinatorManager(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CoordinatorManager Suite") -} - -var _ = BeforeSuite(func() { - clusterConfigurationJson = ` - { - "apiVersion": "v1", - "data": { - "ClusterConfiguration": "networking:\n dnsDomain: cluster.local\n podSubnet: 192.168.165.0/24\n serviceSubnet: 245.100.128.0/18" - }, - "kind": "ConfigMap", - "metadata": { - "name": "kubeadm-config", - "namespace": "kube-system" - } - }` - noClusterConfigurationJson = ` - { - "apiVersion": "v1", - "data": { - "ClusterStatus": "apiEndpoints:\n anolios79:\n advertiseAddress: 192.168.165.128\n bindPort: 6443\napiVersion: kubeadm.k8s.io/v1beta2\nkind: ClusterStatus\n" - }, - "kind": "ConfigMap", - "metadata": { - "name": "kubeadm-config", - "namespace": "kube-system" - } - }` - noCIDRJson = ` - { - "apiVersion": "v1", - "data": { - "ClusterConfiguration": "clusterName: spider\ncontrolPlaneEndpoint: spider-control-plane:6443\ncontrollerManager:\n" - }, - "kind": "ConfigMap", - "metadata": { - "name": "kubeadm-config", - "namespace": "kube-system" - } - }` -})