6565)
6666
6767var (
68- minAddClusterSupportedVersion = semver .MustParse ("0.0.283" )
68+ minAddClusterSupportedVersion = semver .MustParse ("0.0.283" )
6969 minAddClusterLabelsSupportedVersion = semver .MustParse ("0.0.462" )
7070
7171 serviceAccountGVK = resid.Gvk {
@@ -384,7 +384,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
384384 return nil , "" , fmt .Errorf ("failed encoding annotations: %w" , err )
385385 }
386386
387- k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources = append (k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources , fmt .Sprintf ("annotations=" + annotationsStr ))
387+ k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources = append (k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources , fmt .Sprintf ("annotations=" + annotationsStr ))
388388 }
389389
390390 if len (opts .labels ) > 0 {
@@ -393,7 +393,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
393393 return nil , "" , fmt .Errorf ("failed encoding labels: %w" , err )
394394 }
395395
396- k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources = append (k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources , fmt .Sprintf ("labels=" + labelsStr ))
396+ k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources = append (k .ConfigMapGenerator [0 ].KvPairSources .LiteralSources , fmt .Sprintf ("labels=" + labelsStr ))
397397 }
398398
399399 if opts .tag != "" {
@@ -410,17 +410,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
410410
411411 manifests , err := kustutil .BuildKustomization (k )
412412 if err != nil {
413- // go to fallback add-cluster manifests
414- // remove this once all manifests has been moved official-csdp repo.
415- // once we are sure no one will be looking for those manifests in cli-v2 we can remove this.
416- fallbackResourceUrl := fmt .Sprintf ("%s?ref=v%s" , store .FallbackAddClusterDefURL , version )
417- k .Resources [0 ] = fallbackResourceUrl
418- log .G ().Warnf ("Failed to get \" add-cluster\" manifests from %s, using fallback of %s" , resourceUrl , fallbackResourceUrl )
419-
420- manifests , err = kustutil .BuildKustomization (k )
421- if err != nil {
422- return nil , "" , fmt .Errorf ("failed to build kustomization: %w" , err )
423- }
413+ return nil , "" , fmt .Errorf ("failed to build kustomization: %w" , err )
424414 }
425415
426416 return manifests , nameSuffix , nil
0 commit comments