container

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyMatch added in v0.10.14

func AnyMatch(toMatch []reference.Named, selectors []RefSelector) bool

func FamiliarString added in v0.10.19

func FamiliarString(ref reference.Reference) string

func MustParseNamed

func MustParseNamed(s string) reference.Named

func MustParseNamedTagged

func MustParseNamedTagged(s string) reference.NamedTagged

func MustWithTag added in v0.11.4

func MustWithTag(name reference.Named, tag string) reference.NamedTagged

func NewIDSet added in v0.10.0

func NewIDSet(ids ...ID) map[ID]bool

func ParseNamed added in v0.7.7

func ParseNamed(s string) (reference.Named, error)

func ParseNamedMulti added in v0.10.14

func ParseNamedMulti(strs []string) ([]reference.Named, error)

func ParseNamedTagged

func ParseNamedTagged(s string) (reference.NamedTagged, error)

func ShortStrs added in v0.9.7

func ShortStrs(ids []ID) string

Types

type ID

type ID string

func (ID) Empty

func (id ID) Empty() bool

func (ID) ShortStr

func (id ID) ShortStr() string

func (ID) String

func (id ID) String() string

type MatchType added in v0.7.8

type MatchType int

type Name

type Name string

func (Name) String

func (n Name) String() string

type RefSelector added in v0.7.7

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

func MustParseSelector added in v0.7.7

func MustParseSelector(s string) RefSelector

func MustParseTaggedSelector added in v0.7.7

func MustParseTaggedSelector(s string) RefSelector

func NameSelector added in v0.7.8

func NameSelector(ref reference.Named) RefSelector

func NewRefSelector added in v0.7.7

func NewRefSelector(ref reference.Named) RefSelector

func (RefSelector) AsNamedOnly added in v0.7.7

func (s RefSelector) AsNamedOnly() reference.Named

AsNamedOnly returns the Ref as a Named, REMOVING THE TAG if one exists

func (RefSelector) Empty added in v0.7.7

func (s RefSelector) Empty() bool

func (RefSelector) Matches added in v0.7.7

func (s RefSelector) Matches(toMatch reference.Named) bool

func (RefSelector) MatchesAny added in v0.13.3

func (s RefSelector) MatchesAny(toMatch []reference.Named) bool

func (RefSelector) RefFamiliarName added in v0.7.10

func (s RefSelector) RefFamiliarName() string

func (RefSelector) RefFamiliarString added in v0.7.11

func (s RefSelector) RefFamiliarString() string

func (RefSelector) RefName added in v0.7.8

func (s RefSelector) RefName() string

func (RefSelector) RefsEqual added in v0.7.8

func (s RefSelector) RefsEqual(other RefSelector) bool

func (RefSelector) String added in v0.7.7

func (s RefSelector) String() string

func (RefSelector) WithExactMatch added in v0.7.8

func (s RefSelector) WithExactMatch() RefSelector

func (RefSelector) WithNameMatch added in v0.7.10

func (s RefSelector) WithNameMatch() RefSelector

type RefSet added in v0.11.4

type RefSet struct {
	// Ref as specified in Tiltfile; used to match a DockerBuild with
	// corresponding k8s YAML. May contain tags, etc. (Also used as
	// user-facing name for this image.)
	ConfigurationRef RefSelector
	// contains filtered or unexported fields
}

RefSet describes the references for a given image:

  1. ConfigurationRef: ref as specified in the Tiltfile
  2. LocalRef(): ref as used outside of the cluster (for Docker etc.)
  3. ClusterRef(): ref as used inside the cluster (in k8s YAML etc.). Often equivalent to LocalRef, but in some cases they diverge: e.g. when using a local registry with KIND, the image localhost:1234/my-image (localRef) is referenced in the YAML as http://registry/my-image (clusterRef).

func MustSimpleRefSet added in v0.11.4

func MustSimpleRefSet(ref RefSelector) RefSet

func NewRefSet added in v0.11.4

func NewRefSet(confRef RefSelector, reg Registry) (RefSet, error)

func (RefSet) ClusterRef added in v0.11.4

func (rs RefSet) ClusterRef() reference.Named

ClusterRef returns the ref by which this image is referenced in the cluster. In most cases the image's ref from the cluster is the same as its ref locally; currently, we only allow these refs to diverge if the user provides a default registry with different urls for Host and hostFromCluster. If registry.hostFromCluster is not set, we return localRef.

func (RefSet) LocalRef added in v0.11.4

func (rs RefSet) LocalRef() reference.Named

LocalRef returns the ref by which this image is referenced from outside the cluster (e.g. by `docker build`, `docker push`, etc.)

func (RefSet) MustWithRegistry added in v0.11.4

func (rs RefSet) MustWithRegistry(reg Registry) RefSet

func (RefSet) TagRefs added in v0.11.4

func (rs RefSet) TagRefs(tag string) (TaggedRefs, error)

TagRefs tags both of the references used for build/deploy with the given tag.

func (RefSet) Validate added in v0.12.0

func (rs RefSet) Validate() error

func (RefSet) WithoutRegistry added in v0.12.1

func (rs RefSet) WithoutRegistry() RefSet

type Registry added in v0.8.9

type Registry struct {
	// The Host of a container registry where we can push images. e.g.:
	//   - localhost:32000
	//   - gcr.io/windmill-public-containers
	Host string
	// contains filtered or unexported fields
}

func MustNewRegistry added in v0.11.4

func MustNewRegistry(host string) Registry

func MustNewRegistryWithHostFromCluster added in v0.11.4

func MustNewRegistryWithHostFromCluster(host, fromCluster string) Registry

func NewRegistry added in v0.11.4

func NewRegistry(host string) (Registry, error)

func NewRegistryWithHostFromCluster added in v0.11.4

func NewRegistryWithHostFromCluster(host, fromCluster string) (Registry, error)

func (Registry) Empty added in v0.11.4

func (r Registry) Empty() bool

func (Registry) HostFromCluster added in v0.11.4

func (r Registry) HostFromCluster() string

HostFromCluster returns the registry to be used from within the k8s cluster (e.g. in k8s YAML). Returns hostFromCluster, if specified; otherwise the Host.

func (Registry) ReplaceRegistryForClusterRef added in v0.11.4

func (r Registry) ReplaceRegistryForClusterRef(rs RefSelector) (reference.Named, error)

func (Registry) ReplaceRegistryForLocalRef added in v0.11.4

func (r Registry) ReplaceRegistryForLocalRef(rs RefSelector) (reference.Named, error)

func (Registry) Validate added in v0.11.4

func (r Registry) Validate() error

type Runtime added in v0.7.6

type Runtime string

A good way to manually test different container runtimes is with minikube. https://github.com/kubernetes/minikube/blob/master/docs/alternative_runtimes.md

const (
	RuntimeDocker      Runtime = "docker"
	RuntimeContainerd  Runtime = "containerd"
	RuntimeCrio        Runtime = "cri-o"
	RuntimeUnknown     Runtime = "unknown"
	RuntimeReadFailure Runtime = "read-failure"
)

func RuntimeFromVersionString added in v0.7.6

func RuntimeFromVersionString(s string) Runtime

type TaggedRefs added in v0.11.4

type TaggedRefs struct {
	LocalRef   reference.NamedTagged // Image name + tag as referenced from outside cluster
	ClusterRef reference.NamedTagged // Image name + tag as referenced from within cluster
}

Refs yielded by an image build

Jump to

Keyboard shortcuts

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