Documentation ¶
Index ¶
- Constants
- func APIPortForLocalZone(isLBKAS bool) int32
- func AddHCPRouteLabel(target crclient.Object)
- func AddInternalRouteLabel(target crclient.Object)
- func AdvertiseAddress(hcp *hyperv1.HostedControlPlane) *string
- func AdvertiseAddressWithDefault(hcp *hyperv1.HostedControlPlane, defaultValue string) string
- func AllowedCIDRBlocks(hcp *hyperv1.HostedControlPlane) []hyperv1.CIDRBlock
- func ApplyAWSLoadBalancerSubnetsAnnotation(svc *corev1.Service, hcp *hyperv1.HostedControlPlane)
- func ApplyCloudProviderCreds(podSpec *corev1.PodSpec, cloudProvider string, ...)
- func ApplyClusterIDLabel(ep *prometheusoperatorv1.Endpoint, clusterID string)
- func ApplyClusterIDLabelToPodMonitor(ep *prometheusoperatorv1.PodMetricsEndpoint, clusterID string)
- func ApplyClusterIDLabelToRecordingRule(rule *prometheusoperatorv1.Rule, clusterID string)
- func AvailabilityProber(target string, image string, spec *corev1.PodSpec, o ...AvailabilityProberOpt)
- func BuildContainer(container *corev1.Container, buildFn func(*corev1.Container)) corev1.Container
- func BuildProjectedVolume(volume *corev1.Volume, volumeProjection []corev1.VolumeProjection, ...) corev1.Volume
- func BuildVolume(volume *corev1.Volume, buildFn func(*corev1.Volume)) corev1.Volume
- func ClusterCIDRs(clusterNetwork []hyperv1.ClusterNetworkEntry) []string
- func CollectLBMessageIfNotProvisioned(svc *corev1.Service, messageCollector events.MessageCollector) (string, error)
- func Compress(payload []byte) (*bytes.Buffer, error)
- func CompressAndEncode(payload []byte) (*bytes.Buffer, error)
- func ComputeHash(s string) string
- func ConfigOAuthEnabled(authentication *configv1.AuthenticationSpec) bool
- func ConnectsThroughInternetToControlplane(platform hyperv1.PlatformSpec) bool
- func ConvertImageRegistryOverrideStringToMap(envVar string) map[string][]string
- func ConvertOpenShiftImageRegistryOverridesToCommandLineFlag(registryOverrides map[string][]string) string
- func ConvertRegistryOverridesToCommandLineFlag(registryOverrides map[string]string) string
- func CopyConfigMap(cm, source *corev1.ConfigMap)
- func CreateTokenForServiceAccount(ctx context.Context, serviceAccount *corev1.ServiceAccount, ...) (string, error)
- func DecodeAndDecompress(payload []byte) (*bytes.Buffer, error)
- func DeleteIfNeeded(ctx context.Context, c client.Client, o client.Object) (exists bool, err error)
- func DeploymentAddKubevirtInfraCredentials(deployment *appsv1.Deployment)
- func DeploymentAddOpenShiftTrustedCABundleConfigMap(deployment *appsv1.Deployment)
- func DeploymentAddTrustBundleVolume(trustBundleConfigMap *corev1.LocalObjectReference, ...)
- func DeserializeResource(data string, resource runtime.Object, objectTyper runtime.ObjectTyper) error
- func DoesMgmtClusterAndNodePoolCPUArchMatch(mgmtClusterCPUArch, nodePoolArch string) error
- func EnsureOwnerRef(resource client.Object, ownerRef *metav1.OwnerReference)
- func EnsurePullSecret(serviceAccount *corev1.ServiceAccount, secretName string)
- func FindContainer(name string, containers []corev1.Container) *corev1.Container
- func FirstClusterCIDR(clusterNetwork []hyperv1.ClusterNetworkEntry) string
- func FirstServiceCIDR(serviceNetwork []hyperv1.ServiceNetworkEntry) string
- func FirstUsableIP(cidr string) (string, error)
- func GenerateReconciliationActiveCondition(pausedUntilField *string, objectGeneration int64) metav1.Condition
- func GetAdvertiseAddress(hcp *hyperv1.HostedControlPlane, ipv4DefaultAddress, ipv6DefaultAddress string) string
- func GetMgmtClusterCPUArch(ctx context.Context) (string, error)
- func GetPayloadImage(ctx context.Context, releaseImageProvider releaseinfo.Provider, ...) (string, error)
- func GetPayloadVersion(ctx context.Context, releaseImageProvider releaseinfo.Provider, ...) (*semver.Version, error)
- func GetRegistryOverrides(ctx context.Context, ref reference.DockerImageReference, source string, ...) (*reference.DockerImageReference, bool, error)
- func HCControlPlaneReleaseImage(hcluster *hyperv1.HostedCluster) string
- func HCOAuthEnabled(hc *hyperv1.HostedCluster) bool
- func HCPControlPlaneReleaseImage(hcp *hyperv1.HostedControlPlane) string
- func HCPOAuthEnabled(hcp *hyperv1.HostedControlPlane) bool
- func HashSimple(o interface{}) string
- func HashStruct(data interface{}) (string, error)
- func ImageLabels(metadata *dockerv1client.DockerImageConfig) map[string]string
- func InsecureHTTPClient() *http.Client
- func IsDeploymentReady(ctx context.Context, deployment *appsv1.Deployment) bool
- func IsIPv4(cidr string) (bool, error)
- func IsLBKAS(hcp *hyperv1.HostedControlPlane) bool
- func IsLBKASByHC(hc *hyperv1.HostedCluster) bool
- func IsPrivateHC(hc *hyperv1.HostedCluster) bool
- func IsPrivateHCP(hcp *hyperv1.HostedControlPlane) bool
- func IsPublicHC(hc *hyperv1.HostedCluster) bool
- func IsPublicHCP(hcp *hyperv1.HostedControlPlane) bool
- func IsPublicKASWithDNS(hostedControlPlane *hyperv1.HostedControlPlane) bool
- func IsReconciliationPaused(logr logr.Logger, pausedUntilField *string) (bool, time.Duration)
- func IsRouteKAS(hcp *hyperv1.HostedControlPlane) bool
- func IsStatefulSetReady(statefulSet *appsv1.StatefulSet) bool
- func KASPodPort(hcp *hyperv1.HostedControlPlane) int32
- func KASPodPortFromHostedCluster(hc *hyperv1.HostedCluster) int32
- func MachineCIDRs(machineNetwork []hyperv1.MachineNetworkEntry) []string
- func ParseNamespacedName(name string) types.NamespacedName
- func ParseNodeSelector(str string) map[string]string
- func PredicatesForHostedClusterAnnotationScoping(r client.Reader) predicate.Predicate
- func ProcessPausedUntilField(pausedUntilField *string, now time.Time) (isPaused bool, duration time.Duration, err error)
- func ReconcileExternalRoute(route *routev1.Route, hostname string, defaultIngressDomain string, ...) error
- func ReconcileInternalRoute(route *routev1.Route, hcName string, serviceName string) error
- func ReconcilePodDisruptionBudget(pdb *policyv1.PodDisruptionBudget, availability hyperv1.AvailabilityPolicy)
- func ResolveDNSHostname(ctx context.Context, hostName string) error
- func SerializeResource(resource runtime.Object, objectTyper runtime.ObjectTyper) (string, error)
- func ServiceCIDRs(serviceNetwork []hyperv1.ServiceNetworkEntry) []string
- func ServiceExternalDNSHostname(hcp *hyperv1.HostedControlPlane, serviceType hyperv1.ServiceType) string
- func ServiceExternalDNSHostnameByHC(hc *hyperv1.HostedCluster, serviceType hyperv1.ServiceType) string
- func ServicePublishingStrategyByTypeByHC(hc *hyperv1.HostedCluster, svcType hyperv1.ServiceType) *hyperv1.ServicePublishingStrategy
- func ServicePublishingStrategyByTypeForHCP(hcp *hyperv1.HostedControlPlane, svcType hyperv1.ServiceType) *hyperv1.ServicePublishingStrategy
- func ShortenName(base, suffix string, maxLength int) string
- func ShortenRouteHostnameIfNeeded(name, namespace string, baseDomain string) string
- func StringListContains(list string, s string) bool
- func UseDedicatedDNSForKASByHC(hc *hyperv1.HostedCluster) bool
- func UseDedicatedDNSforKAS(hcp *hyperv1.HostedControlPlane) bool
- type AvailabilityProberOpt
- type AvailabilityProberOpts
- type ContainerVolumeMounts
- type ImageMetadataProvider
- type PodVolumeMounts
- type RegistryClientImageMetadataProvider
Constants ¶
const ( KubeconfigKey = "kubeconfig" AWSCloudProviderName = "aws" )
const ( // CPOImageName is the name under which components can find the CPO image in the release image.. CPOImageName = "controlplane-operator" // CPPKIOImageName is the name under which components can find the CP PKI Operator image in the release image.. CPPKIOImageName = "controlplane-pki-operator" // AvailabilityProberImageName is the name under which components can find the availability prober // image in the release image. AvailabilityProberImageName = "availability-prober" )
const ( // DebugDeploymentsAnnotation contains a comma separated list of deployment names which should always be scaled to 0 // for development. DebugDeploymentsAnnotation = "hypershift.openshift.io/debug-deployments" EnableHostedClustersAnnotationScopingEnv = "ENABLE_HOSTEDCLUSTERS_ANNOTATION_SCOPING" HostedClustersScopeAnnotationEnv = "HOSTEDCLUSTERS_SCOPE_ANNOTATION" HostedClustersScopeAnnotation = "hypershift.openshift.io/scope" HostedClusterAnnotation = "hypershift.openshift.io/cluster" )
const HCPRouteLabel = "hypershift.openshift.io/hosted-control-plane"
const InternalRouteLabel = "hypershift.openshift.io/internal-route"
Variables ¶
This section is empty.
Functions ¶
func APIPortForLocalZone ¶ added in v0.1.40
APIPortForLocalZone returns the port used by processes within a private hosted cluster to communicate with the KAS via the api.<hc-name>.hypershift.local host.
func AddHCPRouteLabel ¶
func AddInternalRouteLabel ¶
func AdvertiseAddress ¶
func AdvertiseAddress(hcp *hyperv1.HostedControlPlane) *string
func AdvertiseAddressWithDefault ¶
func AdvertiseAddressWithDefault(hcp *hyperv1.HostedControlPlane, defaultValue string) string
func AllowedCIDRBlocks ¶
func AllowedCIDRBlocks(hcp *hyperv1.HostedControlPlane) []hyperv1.CIDRBlock
func ApplyAWSLoadBalancerSubnetsAnnotation ¶ added in v0.1.23
func ApplyAWSLoadBalancerSubnetsAnnotation(svc *corev1.Service, hcp *hyperv1.HostedControlPlane)
func ApplyCloudProviderCreds ¶
func ApplyClusterIDLabel ¶
func ApplyClusterIDLabel(ep *prometheusoperatorv1.Endpoint, clusterID string)
func ApplyClusterIDLabelToPodMonitor ¶
func ApplyClusterIDLabelToPodMonitor(ep *prometheusoperatorv1.PodMetricsEndpoint, clusterID string)
func ApplyClusterIDLabelToRecordingRule ¶
func ApplyClusterIDLabelToRecordingRule(rule *prometheusoperatorv1.Rule, clusterID string)
func AvailabilityProber ¶
func AvailabilityProber(target string, image string, spec *corev1.PodSpec, o ...AvailabilityProberOpt)
func BuildContainer ¶
func BuildProjectedVolume ¶ added in v0.1.34
func BuildProjectedVolume(volume *corev1.Volume, volumeProjection []corev1.VolumeProjection, buildFn func(*corev1.Volume, []corev1.VolumeProjection)) corev1.Volume
func BuildVolume ¶
func ClusterCIDRs ¶
func ClusterCIDRs(clusterNetwork []hyperv1.ClusterNetworkEntry) []string
func CompressAndEncode ¶
CompressAndEncode compresses and base-64 encodes a given byte array. Ideal for loading an arbitrary byte array into a ConfigMap or Secret.
func ComputeHash ¶
func ConfigOAuthEnabled ¶ added in v0.1.16
func ConfigOAuthEnabled(authentication *configv1.AuthenticationSpec) bool
func ConnectsThroughInternetToControlplane ¶
func ConnectsThroughInternetToControlplane(platform hyperv1.PlatformSpec) bool
HasPrivateAPIServerConnectivity determines if workloads running inside the guest cluster can access the apiserver without using the Internet.
func ConvertImageRegistryOverrideStringToMap ¶ added in v0.1.10
ConvertImageRegistryOverrideStringToMap translates the environment variable containing registry source to mirror mappings back to a map[string]string structure that can be ingested by the registry image content policies release provider
func ConvertOpenShiftImageRegistryOverridesToCommandLineFlag ¶ added in v0.1.10
func ConvertOpenShiftImageRegistryOverridesToCommandLineFlag(registryOverrides map[string][]string) string
ConvertOpenShiftImageRegistryOverridesToCommandLineFlag converts a map of image registry sources and their mirrors into a string
func ConvertRegistryOverridesToCommandLineFlag ¶ added in v0.1.10
ConvertRegistryOverridesToCommandLineFlag converts a map of registry sources and their mirrors into a string
func CopyConfigMap ¶
CopyConfigMap copies the .Data field of configMap `source` into configmap `cm`
func CreateTokenForServiceAccount ¶ added in v0.1.2
func CreateTokenForServiceAccount(ctx context.Context, serviceAccount *corev1.ServiceAccount, client *kubernetes.Clientset) (string, error)
func DecodeAndDecompress ¶
DecodeAndDecompress decompresses and base-64 decodes a given byte array. Ideal for consuming a gzipped / base64-encoded byte array from a ConfigMap or Secret.
func DeleteIfNeeded ¶
func DeploymentAddKubevirtInfraCredentials ¶ added in v0.1.10
func DeploymentAddKubevirtInfraCredentials(deployment *appsv1.Deployment)
func DeploymentAddOpenShiftTrustedCABundleConfigMap ¶ added in v0.1.13
func DeploymentAddOpenShiftTrustedCABundleConfigMap(deployment *appsv1.Deployment)
func DeploymentAddTrustBundleVolume ¶
func DeploymentAddTrustBundleVolume(trustBundleConfigMap *corev1.LocalObjectReference, deployment *appsv1.Deployment)
func DeserializeResource ¶
func DoesMgmtClusterAndNodePoolCPUArchMatch ¶ added in v0.1.23
func EnsureOwnerRef ¶
func EnsureOwnerRef(resource client.Object, ownerRef *metav1.OwnerReference)
func EnsurePullSecret ¶
func EnsurePullSecret(serviceAccount *corev1.ServiceAccount, secretName string)
func FindContainer ¶
func FirstClusterCIDR ¶
func FirstClusterCIDR(clusterNetwork []hyperv1.ClusterNetworkEntry) string
func FirstServiceCIDR ¶
func FirstServiceCIDR(serviceNetwork []hyperv1.ServiceNetworkEntry) string
func FirstUsableIP ¶ added in v0.1.10
FirstUsableIP returns the first usable IP in both, IPv4 and IPv6 stacks.
func GenerateReconciliationActiveCondition ¶
func GenerateReconciliationActiveCondition(pausedUntilField *string, objectGeneration int64) metav1.Condition
GenerateReconciliationActiveCondition will generate the resource condition that reflects the state of reconciliation on the resource.
func GetAdvertiseAddress ¶ added in v0.1.10
func GetAdvertiseAddress(hcp *hyperv1.HostedControlPlane, ipv4DefaultAddress, ipv6DefaultAddress string) string
func GetMgmtClusterCPUArch ¶ added in v0.1.23
func GetPayloadImage ¶
func GetPayloadImage(ctx context.Context, releaseImageProvider releaseinfo.Provider, hc *hyperv1.HostedCluster, component string, pullSecret []byte) (string, error)
func GetPayloadVersion ¶
func GetPayloadVersion(ctx context.Context, releaseImageProvider releaseinfo.Provider, hc *hyperv1.HostedCluster, pullSecret []byte) (*semver.Version, error)
func GetRegistryOverrides ¶ added in v0.1.10
func GetRegistryOverrides(ctx context.Context, ref reference.DockerImageReference, source string, mirror string) (*reference.DockerImageReference, bool, error)
func HCControlPlaneReleaseImage ¶ added in v0.1.10
func HCControlPlaneReleaseImage(hcluster *hyperv1.HostedCluster) string
func HCOAuthEnabled ¶ added in v0.1.16
func HCOAuthEnabled(hc *hyperv1.HostedCluster) bool
func HCPControlPlaneReleaseImage ¶ added in v0.1.10
func HCPControlPlaneReleaseImage(hcp *hyperv1.HostedControlPlane) string
func HCPOAuthEnabled ¶ added in v0.1.16
func HCPOAuthEnabled(hcp *hyperv1.HostedControlPlane) bool
func HashSimple ¶ added in v0.1.23
func HashSimple(o interface{}) string
HashSimple takes a value, typically a string, and returns a 32-bit FNV-1a hashed version of the value as a string
func HashStruct ¶
HashStruct takes a struct and returns a 32-bit FNV-1a hashed version of the struct as a string The struct is first marshalled to JSON before hashing
func ImageLabels ¶
func ImageLabels(metadata *dockerv1client.DockerImageConfig) map[string]string
ImageLabels returns labels on a given image metadata
func InsecureHTTPClient ¶ added in v0.1.10
InsecureHTTPClient return a http.Client which skips server certificate verification
func IsDeploymentReady ¶
func IsDeploymentReady(ctx context.Context, deployment *appsv1.Deployment) bool
func IsIPv4 ¶ added in v0.1.10
IsIPv4 function parse the CIDR and get the IPNet struct if the IPNet.IP cannot be converted to 4bytes format, the function returns nil, if it's an IPv6 it will return nil.
func IsLBKAS ¶ added in v0.1.40
func IsLBKAS(hcp *hyperv1.HostedControlPlane) bool
func IsLBKASByHC ¶ added in v0.1.40
func IsLBKASByHC(hc *hyperv1.HostedCluster) bool
func IsPrivateHC ¶
func IsPrivateHC(hc *hyperv1.HostedCluster) bool
func IsPrivateHCP ¶
func IsPrivateHCP(hcp *hyperv1.HostedControlPlane) bool
func IsPublicHC ¶ added in v0.1.10
func IsPublicHC(hc *hyperv1.HostedCluster) bool
func IsPublicHCP ¶
func IsPublicHCP(hcp *hyperv1.HostedControlPlane) bool
func IsPublicKASWithDNS ¶
func IsPublicKASWithDNS(hostedControlPlane *hyperv1.HostedControlPlane) bool
func IsReconciliationPaused ¶
IsReconciliationPaused checks the pauseUntil field to see if reconciliation on the resource should be paused and for how long.
func IsRouteKAS ¶
func IsRouteKAS(hcp *hyperv1.HostedControlPlane) bool
func IsStatefulSetReady ¶ added in v0.1.9
func IsStatefulSetReady(statefulSet *appsv1.StatefulSet) bool
func KASPodPort ¶ added in v0.1.16
func KASPodPort(hcp *hyperv1.HostedControlPlane) int32
KASPodPort will retrieve the port the kube-apiserver binds on locally in the pod. This comes from hcp.Spec.Networking.APIServer.Port if set and != 443 or defaults to 6443.
func KASPodPortFromHostedCluster ¶ added in v0.1.16
func KASPodPortFromHostedCluster(hc *hyperv1.HostedCluster) int32
KASPodPortFromHostedCluster will retrieve the port the kube-apiserver binds on locally in the pod. This comes from hcp.Spec.Networking.APIServer.Port if set and != 443 or defaults to 6443.
func MachineCIDRs ¶
func MachineCIDRs(machineNetwork []hyperv1.MachineNetworkEntry) []string
func ParseNamespacedName ¶
func ParseNamespacedName(name string) types.NamespacedName
ParseNamespacedName expects a string with the format "namespace/name" and returns the proper types.NamespacedName. This is useful when watching a CR annotated with the format above to requeue the CR described in the annotation.
func ParseNodeSelector ¶ added in v0.1.22
ParseNodeSelector parses a comma separated string of key=value pairs into a map
func PredicatesForHostedClusterAnnotationScoping ¶ added in v0.1.24
PredicatesForHostedClusterAnnotationScoping returns predicate filters for all event types that will ignore incoming event requests for resources in which the parent hostedcluster does not match the "scope" annotation specified in the HOSTEDCLUSTERS_SCOPE_ANNOTATION env var. If not defined or empty, the default behavior is to accept all events for hostedclusters that do not have the annotation. The ENABLE_HOSTEDCLUSTERS_ANNOTATION_SCOPING env var must also be set to "true" to enable the scoping feature.
func ProcessPausedUntilField ¶
func ProcessPausedUntilField(pausedUntilField *string, now time.Time) (isPaused bool, duration time.Duration, err error)
ProcessPausedUntilField checks the pauseUntil field to see if reconciliation on the resource should be paused. Input can either be a date in RFC3339 format, or a Boolean. It returns a Boolean isPaused, a duration and an error. If the input is a date, a duration!=0 is returned so consumers can choose to requeueAfter it.
func ReconcileExternalRoute ¶
func ReconcileInternalRoute ¶
func ReconcilePodDisruptionBudget ¶ added in v0.1.23
func ReconcilePodDisruptionBudget(pdb *policyv1.PodDisruptionBudget, availability hyperv1.AvailabilityPolicy)
func ResolveDNSHostname ¶
ResolveDNSHostname receives a hostname string and tries to resolve it. Returns error if the host can't be resolved.
func SerializeResource ¶
func ServiceCIDRs ¶
func ServiceCIDRs(serviceNetwork []hyperv1.ServiceNetworkEntry) []string
func ServiceExternalDNSHostname ¶
func ServiceExternalDNSHostname(hcp *hyperv1.HostedControlPlane, serviceType hyperv1.ServiceType) string
func ServiceExternalDNSHostnameByHC ¶ added in v0.1.10
func ServiceExternalDNSHostnameByHC(hc *hyperv1.HostedCluster, serviceType hyperv1.ServiceType) string
func ServicePublishingStrategyByTypeByHC ¶
func ServicePublishingStrategyByTypeByHC(hc *hyperv1.HostedCluster, svcType hyperv1.ServiceType) *hyperv1.ServicePublishingStrategy
func ServicePublishingStrategyByTypeForHCP ¶
func ServicePublishingStrategyByTypeForHCP(hcp *hyperv1.HostedControlPlane, svcType hyperv1.ServiceType) *hyperv1.ServicePublishingStrategy
func ShortenName ¶ added in v0.1.40
ShortenName returns a name given a base ("deployment-5") and a suffix ("deploy") It will first attempt to join them with a dash. If the resulting name is longer than maxLength: if the suffix is too long, it will truncate the base name and add an 8-character hash of the [base]-[suffix] string. If the suffix is not too long, it will truncate the base, add the hash of the base and return [base]-hash-[suffix] Source: openshift/origin v3.9.0 pkg/api/apihelpers/namer.go
func ShortenRouteHostnameIfNeeded ¶
ShortenRouteHostnameIfNeeded will return a shortened hostname if the route hostname will exceed the allowed DNS name size. If the hostname is not too long, an empty string is returned so that the default can be used.
func StringListContains ¶
Contains checks if a comma-delimited string contains a specific string.
func UseDedicatedDNSForKASByHC ¶
func UseDedicatedDNSForKASByHC(hc *hyperv1.HostedCluster) bool
func UseDedicatedDNSforKAS ¶
func UseDedicatedDNSforKAS(hcp *hyperv1.HostedControlPlane) bool
Types ¶
type AvailabilityProberOpt ¶
type AvailabilityProberOpt func(*AvailabilityProberOpts)
type AvailabilityProberOpts ¶
type AvailabilityProberOpts struct { KubeconfigVolumeName string RequiredAPIs []schema.GroupVersionKind WaitForInfrastructureResource bool WaitForLabeledPodsGone string }
type ContainerVolumeMounts ¶
type ImageMetadataProvider ¶
type ImageMetadataProvider interface {
ImageMetadata(ctx context.Context, imageRef string, pullSecret []byte) (*dockerv1client.DockerImageConfig, error)
}
type PodVolumeMounts ¶
type PodVolumeMounts map[string]ContainerVolumeMounts
func (PodVolumeMounts) ContainerMounts ¶
func (m PodVolumeMounts) ContainerMounts(container string) []corev1.VolumeMount
func (PodVolumeMounts) Path ¶
func (m PodVolumeMounts) Path(container, volume string) string
type RegistryClientImageMetadataProvider ¶
type RegistryClientImageMetadataProvider struct {
OpenShiftImageRegistryOverrides map[string][]string
}
func (*RegistryClientImageMetadataProvider) ImageMetadata ¶
func (r *RegistryClientImageMetadataProvider) ImageMetadata(ctx context.Context, imageRef string, pullSecret []byte) (*dockerv1client.DockerImageConfig, error)
ImageMetadata returns metadata for a given image using the given pull secret to authenticate. This lookup uses a cache based on the image digest. If the reference of the image contains a digest (which is the mainline case for images in a release payload), the digest is parsed from the image reference and then used to lookup image metadata in the cache. When the image reference does not contain a digest, a lookup is made to the registry to fetch the digest of the image that the tag refers to. This is because the actual image that the tag is referring to could have changed. Once a digest is obtained, the cache is checked so that no further fetching occurs. Only if both cache lookups fail, the image metadata is fetched and stored in the cache.