github.com/openshift/installer@v1.4.17/pkg/types/gcp/clouduid.go (about) 1 package gcp 2 3 import ( 4 "crypto/md5" 5 "fmt" 6 ) 7 8 // CloudControllerUID generates a UID used by the GCP cloud controller provider 9 // to generate certain load balancing resources 10 func CloudControllerUID(infraID string) string { 11 hash := md5.Sum([]byte(infraID)) 12 return fmt.Sprintf("%x", hash)[:16] 13 }