Skip to content

Commit

Permalink
Fix index
Browse files Browse the repository at this point in the history
  • Loading branch information
jknipper committed Feb 20, 2024
1 parent 89868af commit be93bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/ground/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ func (sr *SeedReconciler) EnrichHelmValuesForSeed(client project.ProjectClient,
values["customCNI"] = kluster.Spec.CustomCNI
values["seedKubeadm"] = kluster.Spec.SeedKubeadm
idx := strings.LastIndex(kluster.Spec.Name, "-")
values["shortName"] = kluster.Spec.Name[:idx]
if idx != -1 {
values["shortName"] = kluster.Spec.Name[:idx]
}
values["tlsCaCert"] = secret.TLSCACertificate
return nil
}
Expand Down

0 comments on commit be93bd5

Please sign in to comment.