Skip to content

Commit

Permalink
fix: nil pointer in advanced config (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
jansyk13 authored Apr 15, 2024
1 parent e0ca752 commit 2875bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion castai/resource_eviction_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func flattenPodSelector(ps *sdk.CastaiEvictorV1PodSelector) []map[string]any {
if ps.Namespace != nil {
out[FieldPodSelectorNamespace] = *ps.Namespace
}
if ps.LabelSelector.MatchLabels != nil {
if ps.LabelSelector != nil && ps.LabelSelector.MatchLabels != nil {
out[FieldMatchLabels] = ps.LabelSelector.MatchLabels.AdditionalProperties
}
if ps.LabelSelector.MatchExpressions != nil {
Expand Down

0 comments on commit 2875bfe

Please sign in to comment.