resolve

package
v0.1.3-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package resolve looks up image references in resources and resolves tags to digests using the `crane` package from `go-containerregistry`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageTags

func ImageTags(ctx context.Context, log logr.Logger, config *rest.Config, n *yaml.RNode) error

ImageTags looks up the digest and adds it to the image field for containers and initContainers in pods and pod template specs.

It looks for image fields with tags in these sequence nodes: - `spec.containers` - `spec.initContainers` - `spec.template.spec.containers` - `spec.template.spec.initContainers`

The `config` input parameter can be null. In this case, the function will not attempt to retrieve imagePullSecrets from the cluster.

Types

type ImageTagFilter

type ImageTagFilter struct {
	Log      logr.Logger
	Keychain authn.Keychain
}

ImageTagFilter resolves image tags to digests

func (*ImageTagFilter) Filter

func (f *ImageTagFilter) Filter(n *yaml.RNode) (*yaml.RNode, error)

Filter to resolve image tags to digests for a list of containers

Jump to

Keyboard shortcuts

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