Skip to content

Commit

Permalink
Fixed go-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekdwivedi3060 committed Nov 30, 2023
1 parent 0df5d0e commit ab029be
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 33 deletions.
5 changes: 0 additions & 5 deletions api/v1/aerospikecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,6 @@ type AerospikeClusterStatusSpec struct { //nolint:govet // for readability
SeedsFinderServices SeedsFinderServices `json:"seedsFinderServices,omitempty"`
// RosterNodeBlockList is a list of blocked nodeIDs from roster in a strong-consistency setup
RosterNodeBlockList []string `json:"rosterNodeBlockList,omitempty"`
// IgnorePodList is a list of pods that the operator will ignore while assessing cluster stability.
// Pods specified in this list are not considered part of the cluster. This is particularly useful when
// there are failed pods and the operator needs to perform certain operations on the cluster. Note that
// running pods included in this list will not be ignored.
IgnorePodList []string `json:"ignorePodList,omitempty"`
}

// AerospikeClusterStatus defines the observed state of AerospikeCluster
Expand Down
5 changes: 0 additions & 5 deletions api/v1/zz_generated.deepcopy.go

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

10 changes: 0 additions & 10 deletions config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8900,16 +8900,6 @@ spec:
- customInterface
type: string
type: object
ignorePodList:
description: IgnorePodList is a list of pods that the operator will
ignore while assessing cluster stability. Pods specified in this
list are not considered part of the cluster. This is particularly
useful when there are failed pods and the operator needs to perform
certain operations on the cluster. Note that running pods included
in this list will not be ignored.
items:
type: string
type: array
image:
description: Aerospike server image
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8900,16 +8900,6 @@ spec:
- customInterface
type: string
type: object
ignorePodList:
description: IgnorePodList is a list of pods that the operator will
ignore while assessing cluster stability. Pods specified in this
list are not considered part of the cluster. This is particularly
useful when there are failed pods and the operator needs to perform
certain operations on the cluster. Note that running pods included
in this list will not be ignored.
items:
type: string
type: array
image:
description: Aerospike server image
type: string
Expand Down
9 changes: 6 additions & 3 deletions test/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"

asdbv1 "github.com/aerospike/aerospike-kubernetes-operator/api/v1"
)
Expand Down Expand Up @@ -155,7 +156,8 @@ func clusterWithIgnorePodList(ctx goctx.Context) {
By("Set IgnorePodList and scale down 1 pod")
aeroCluster, err = getCluster(k8sClient, ctx, clusterNamespacedName)
Expect(err).ToNot(HaveOccurred())
aeroCluster.Spec.IgnorePodList = []string{ignorePodName}
val := intstr.FromInt(1)
aeroCluster.Spec.RackConfig.MaxIgnorableFailedPods = &val
aeroCluster.Spec.Size--
err = updateCluster(k8sClient, ctx, aeroCluster)
Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -193,7 +195,7 @@ func clusterWithIgnorePodList(ctx goctx.Context) {
"Remove pod from IgnorePodList and verify pod %s is in running state", ignorePodName))
aeroCluster, err = getCluster(k8sClient, ctx, clusterNamespacedName)
Expect(err).ToNot(HaveOccurred())
aeroCluster.Spec.IgnorePodList = []string{}
aeroCluster.Spec.RackConfig.MaxIgnorableFailedPods = nil
err = updateCluster(k8sClient, ctx, aeroCluster)
Expect(err).ToNot(HaveOccurred())

Expand Down Expand Up @@ -254,7 +256,8 @@ func clusterWithIgnorePodList(ctx goctx.Context) {
By("Delete rack with id 2")
aeroCluster, err = getCluster(k8sClient, ctx, clusterNamespacedName)
Expect(err).ToNot(HaveOccurred())
aeroCluster.Spec.IgnorePodList = []string{ignorePodName}
val := intstr.FromInt(1)
aeroCluster.Spec.RackConfig.MaxIgnorableFailedPods = &val
aeroCluster.Spec.RackConfig = asdbv1.RackConfig{Racks: getDummyRackConf(1)}
err = updateCluster(k8sClient, ctx, aeroCluster)
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit ab029be

Please sign in to comment.