Skip to content

Commit

Permalink
add revive linter and fix the lint error
Browse files Browse the repository at this point in the history
Signed-off-by: duanmengkk <[email protected]>
  • Loading branch information
duanmengkk committed Sep 13, 2024
1 parent 5375a44 commit 60cfa00
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:
jobs:
verify:
name: verify
runs-on: ubuntu-22.04
# runs-on: [self-hosted, ecs]
# runs-on: ubuntu-22.04
runs-on: [self-hosted, ecs]
if: ${{ always() }}
env:
#GOPATH: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/kosmos.io_kubenestconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
type: string
type: array
type: object
useTenantDns:
useTenantDNS:
default: false
type: boolean
type: object
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/kosmos.io_virtualclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ spec:
type: string
type: array
type: object
useTenantDns:
useTenantDNS:
default: false
type: boolean
type: object
Expand Down
2 changes: 1 addition & 1 deletion pkg/generated/openapi/zz_generated.openapi.go

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

12 changes: 5 additions & 7 deletions pkg/kubenest/controlplane/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func DeleteVirtualClusterEtcd(client clientset.Interface, name, namespace string
return nil
}

// nolint:revive
// nolint
func installEtcd(client clientset.Interface, name, namespace string, kubeNestConfiguration *v1alpha1.KubeNestConfiguration, vc *v1alpha1.VirtualCluster) error {
imageRepository, imageVersion := util.GetImageMessage()

Expand All @@ -52,15 +52,13 @@ func installEtcd(client clientset.Interface, name, namespace string, kubeNestCon
namespace,
constants.EtcdListenPeerPort,
)

initialClusters[index] = fmt.Sprintf("%s=%s", memberName, memberPeerURL)
}
vclabel := util.GetVirtualControllerLabel()
IPV6FirstFlag, err := util.IPV6First(constants.APIServerServiceSubnet)
if err != nil {
vcLabel := util.GetVirtualControllerLabel()
IPV6FirstFlag, newErr := util.IPV6First(constants.APIServerServiceSubnet)
if newErr != nil {
return err
}

etcdStatefulSetBytes, err := util.ParseTemplate(etcd.EtcdStatefulSet, struct {
StatefulSetName, Namespace, ImageRepository, Image, EtcdClientService, Version, VirtualControllerLabel string
CertsSecretName, EtcdPeerServiceName string
Expand All @@ -73,7 +71,7 @@ func installEtcd(client clientset.Interface, name, namespace string, kubeNestCon
Namespace: namespace,
ImageRepository: imageRepository,
Version: imageVersion,
VirtualControllerLabel: vclabel,
VirtualControllerLabel: vcLabel,
EtcdClientService: util.GetEtcdClientServerName(name),
CertsSecretName: util.GetEtcdCertName(name),
EtcdPeerServiceName: util.GetEtcdServerName(name),
Expand Down

0 comments on commit 60cfa00

Please sign in to comment.