resolve

package
v0.1.15-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 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, skipPrefixes []string) 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` - `spec.jobTemplate.spec.template.spec.containers` - `spec.jobTemplate.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
	SkipPrefixes *[]string
}

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