github.com/openshift/installer@v1.4.17/pkg/asset/cluster/ovirt/ovirt.go (about)

     1  // Package ovirt extracts ovirt metadata from install configurations.
     2  package ovirt
     3  
     4  import (
     5  	"os"
     6  
     7  	"github.com/openshift/installer/pkg/types"
     8  	"github.com/openshift/installer/pkg/types/ovirt"
     9  )
    10  
    11  // Metadata converts an install configuration to ovirt metadata.
    12  func Metadata(config *types.InstallConfig) *ovirt.Metadata {
    13  	_, ok := os.LookupEnv("OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE")
    14  	m := ovirt.Metadata{
    15  		ClusterID: config.Ovirt.ClusterID,
    16  		// if we have a custom image, don't remove the template,
    17  		// otherwise its a per deployment template, destroy it
    18  		RemoveTemplate: !ok,
    19  	}
    20  	return &m
    21  }