import ( "github.com/openshift/origin/pkg/api/graph/namer" ) func main() { // generate a unique name for a DeploymentConfig object dcName := namer.GenerateName("deploymentconfig") // prints something like "deploymentconfig-abc123" fmt.Println(dcName) }
import ( "github.com/openshift/origin/pkg/api/graph/namer" ) func main() { // generate a FQDN for a service object svcFqdn := namer.GenerateFQDN("test-app", "default", "svc") // prints something like "svc.test-app.default.svc.cluster.local" fmt.Println(svcFqdn) }In summary, the `github.com.openshift.origin.pkg.api.graph Namer` package library provides useful functionality for naming objects in an Openshift project or cluster.