@@ -21,7 +21,6 @@ import (
2121 crctls "github.com/crc-org/crc/v2/pkg/crc/tls"
2222 "github.com/crc-org/crc/v2/pkg/crc/validation"
2323 crcstrings "github.com/crc-org/crc/v2/pkg/strings"
24- "github.com/pborman/uuid"
2524)
2625
2726// #nosec G101
@@ -285,32 +284,6 @@ func RemoveOldRenderedMachineConfig(ocConfig oc.Config) error {
285284 return nil
286285}
287286
288- func EnsureClusterIDIsNotEmpty (ctx context.Context , ocConfig oc.Config ) error {
289- if err := WaitForOpenshiftResource (ctx , ocConfig , "clusterversion" ); err != nil {
290- return err
291- }
292-
293- stdout , stderr , err := ocConfig .RunOcCommand ("get" , "clusterversion" , "version" , "-o" , `jsonpath="{['spec']['clusterID']}"` )
294- if err != nil {
295- return fmt .Errorf ("Failed to get clusterversion %v: %s" , err , stderr )
296- }
297- if strings .TrimSpace (stdout ) != "" {
298- return nil
299- }
300-
301- logging .Info ("Updating cluster ID..." )
302- clusterID := uuid .New ()
303- cmdArgs := []string {"patch" , "clusterversion" , "version" , "-p" ,
304- fmt .Sprintf (`'{"spec":{"clusterID":"%s"}}'` , clusterID ), "--type" , "merge" }
305-
306- _ , stderr , err = ocConfig .RunOcCommand (cmdArgs ... )
307- if err != nil {
308- return fmt .Errorf ("Failed to update cluster ID %v: %s" , err , stderr )
309- }
310-
311- return nil
312- }
313-
314287func AddProxyConfigToCluster (ctx context.Context , sshRunner * ssh.Runner , ocConfig oc.Config , proxy * httpproxy.ProxyConfig ) error {
315288 type trustedCA struct {
316289 Name string `json:"name"`
0 commit comments