imageregistry

package
v1.0.0-2021-10-26-20-1... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme

func AddToScheme(s *runtime.Scheme) error

Types

type Client

type Client interface {
	Cluster(clusterName string) Client
	Registry() (string, error)
	PullSecret() (*corev1.Secret, error)
	ImageOverride(imageName string) (string, error)
}

func NewDefaultClient

func NewDefaultClient(client client.Client) Client

func NewDynamicClient

func NewDynamicClient(kubeConfig *rest.Config) (Client, error)

type DefaultClient

type DefaultClient struct {
	// contains filtered or unexported fields
}

func (*DefaultClient) Cluster

func (c *DefaultClient) Cluster(clusterName string) Client

func (*DefaultClient) ImageOverride

func (c *DefaultClient) ImageOverride(imageName string) (newImageName string, err error)

ImageOverride returns the overridden image. return the input image name if there is no custom registry.

func (*DefaultClient) PullSecret

func (c *DefaultClient) PullSecret() (*corev1.Secret, error)

PullSecret returns the pullSecret. return nil if there is no imageRegistry of the cluster.

func (*DefaultClient) Registry

func (c *DefaultClient) Registry() (registry string, err error)

Registry returns the custom registry address. registry is empty if there is no imageRegistry of the cluster.

type DynamicClient

type DynamicClient struct {
	// contains filtered or unexported fields
}

func (*DynamicClient) Cluster

func (c *DynamicClient) Cluster(clusterName string) Client

func (*DynamicClient) ImageOverride

func (c *DynamicClient) ImageOverride(image string) (string, error)

ImageOverride returns the overridden image. return the input image name if there is no custom registry.

func (*DynamicClient) PullSecret

func (c *DynamicClient) PullSecret() (*corev1.Secret, error)

PullSecret returns the pullSecret. return nil if there is no imageRegistry of the cluster.

func (*DynamicClient) Registry

func (c *DynamicClient) Registry() (string, error)

Registry returns the custom registry address. registry is empty if there is no imageRegistry of the cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL