Skip to content

Commit

Permalink
fix: runtime panic when storage param is empty (OT-CONTAINER-KIT#887)
Browse files Browse the repository at this point in the history
* fix runtime panic when storage param is empty

Signed-off-by: Teo <[email protected]>

* Update redis-cluster.go

* remove blank

* Update redis-cluster.go

---------

Signed-off-by: Teo <[email protected]>
Co-authored-by: yangw <[email protected]>
Signed-off-by: Matt Robinson <[email protected]>
  • Loading branch information
2 people authored and mattrobinsonsre committed Jul 11, 2024
1 parent a3a244d commit 387a7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k8sutils/redis-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func generateRedisClusterParams(cr *redisv1beta2.RedisCluster, replicas int32, e
Replicas: &replicas,
ClusterMode: true,
ClusterVersion: cr.Spec.ClusterVersion,
NodeConfVolume: cr.Spec.Storage.NodeConfVolume,
NodeSelector: params.NodeSelector,
PodSecurityContext: cr.Spec.PodSecurityContext,
PriorityClassName: cr.Spec.PriorityClassName,
Expand All @@ -64,6 +63,7 @@ func generateRedisClusterParams(cr *redisv1beta2.RedisCluster, replicas int32, e
}
if cr.Spec.Storage != nil {
res.PersistentVolumeClaim = cr.Spec.Storage.VolumeClaimTemplate
res.NodeConfVolume = cr.Spec.Storage.NodeConfVolume
res.NodeConfPersistentVolumeClaim = cr.Spec.Storage.NodeConfVolumeClaimTemplate
}
if externalConfig != nil {
Expand Down

0 comments on commit 387a7a4

Please sign in to comment.