Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
check nil spec
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Oct 2, 2024
1 parent 7a8ca03 commit 4aa64ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kontrol-service/topology/toplogy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func ClusterTopology(clusterTopology *resolved.ClusterTopology, flowsClusterTopo
label := key
versions := lo.Map(services, func(service *resolved.Service, _ int) apiTypes.NodeVersion {
var imageTag *string
containers := service.WorkloadSpec.GetTemplateSpec().Containers
if containers != nil && len(containers) > 0 {
imageTag = &containers[0].Image
podSpec := service.WorkloadSpec.GetTemplateSpec()
if podSpec != nil && len(podSpec.Containers) > 0 {
imageTag = &podSpec.Containers[0].Image
}
isBaseline := service.Version == clusterTopology.Namespace
return apiTypes.NodeVersion{
Expand Down

0 comments on commit 4aa64ce

Please sign in to comment.