Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed May 14, 2024
1 parent c61475a commit a05634d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion api/v1/aerospikecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,8 @@ type AerospikeInstanceSummary struct { //nolint:govet // for readability
type AerospikePodStatus struct { //nolint:govet // for readability
// Image is the Aerospike image this pod is running.
Image string `json:"image"`
// InitImage is the init image this pod's init container is running.
// InitImage is the Aerospike init image this pod's init container is running.
// +optional
InitImage string `json:"initImage,omitempty"`
// PodIP in the K8s network.
PodIP string `json:"podIP"`
Expand Down
5 changes: 2 additions & 3 deletions api/v1/aerospikecluster_validating_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func (c *AerospikeCluster) ValidateUpdate(oldObj runtime.Object) (admission.Warn
return nil, err
}

// Validate MaxUnavailable for PodDisruptionBudget
if err := c.validateEnableDynamicConfigUpdate(); err != nil {
return nil, err
}
Expand Down Expand Up @@ -2321,14 +2320,14 @@ func (c *AerospikeCluster) validateEnableDynamicConfigUpdate() error {
return err
}

val, err := lib.CompareVersions(minInitVersion, minInitVersion4DynamicConf)
val, err := lib.CompareVersions(minInitVersion, minInitVersionForDynamicConf)
if err != nil {
return fmt.Errorf("failed to check image version: %v", err)
}

if val < 0 {
return fmt.Errorf("cannot enable enableDynamicConfigUpdate flag, init container are running version less than %s",
minInitVersion4DynamicConf)
minInitVersionForDynamicConf)
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions api/v1/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const (
)

const (
baseVersion = "4.9.0.3"
baseInitVersion = "2.0.0"
minInitVersion4DynamicConf = "2.2.0"
baseVersion = "4.9.0.3"
baseInitVersion = "1.0.0"
minInitVersionForDynamicConf = "2.2.0"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/asdb.aerospike.com_aerospikeclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14292,8 +14292,8 @@ spec:
description: Image is the Aerospike image this pod is running.
type: string
initImage:
description: InitImage is the init image this pod's init container
is running.
description: InitImage is the Aerospike init image this pod's
init container is running.
type: string
initializedVolumes:
description: InitializedVolumes is the list of volume names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14292,8 +14292,8 @@ spec:
description: Image is the Aerospike image this pod is running.
type: string
initImage:
description: InitImage is the init image this pod's init container
is running.
description: InitImage is the Aerospike init image this pod's
init container is running.
type: string
initializedVolumes:
description: InitializedVolumes is the list of volume names
Expand Down

0 comments on commit a05634d

Please sign in to comment.