package v1alpha1

import "k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1"

Index

Types

type ImageReviewApplyConfiguration

type ImageReviewApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	// Spec holds information about the pod being evaluated
	Spec *ImageReviewSpecApplyConfiguration `json:"spec,omitempty"`
	// Status is filled in by the backend and indicates whether the pod should be allowed.
	Status *ImageReviewStatusApplyConfiguration `json:"status,omitempty"`
}

ImageReviewApplyConfiguration represents a declarative configuration of the ImageReview type for use with apply.

ImageReview checks if the set of images in a pod are allowed.

func ExtractImageReview

func ExtractImageReview(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string) (*ImageReviewApplyConfiguration, error)

ExtractImageReview extracts the applied configuration owned by fieldManager from imageReview. If no managedFields are found in imageReview for fieldManager, a ImageReviewApplyConfiguration is returned with only the Name, Namespace (if applicable), APIVersion and Kind populated. It is possible that no managed fields were found for because other field managers have taken ownership of all the fields previously owned by fieldManager, or because the fieldManager never owned fields any fields. imageReview must be a unmodified ImageReview API object that was retrieved from the Kubernetes API. ExtractImageReview provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractImageReviewFrom

func ExtractImageReviewFrom(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string, subresource string) (*ImageReviewApplyConfiguration, error)

ExtractImageReviewFrom extracts the applied configuration owned by fieldManager from imageReview for the specified subresource. Pass an empty string for subresource to extract the main resource. Common subresources include "status", "scale", etc. imageReview must be a unmodified ImageReview API object that was retrieved from the Kubernetes API. ExtractImageReviewFrom provides a way to perform a extract/modify-in-place/apply workflow. Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously applied if another fieldManager has updated or force applied any of the previously applied fields.

func ExtractImageReviewStatus

func ExtractImageReviewStatus(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string) (*ImageReviewApplyConfiguration, error)

ExtractImageReviewStatus extracts the applied configuration owned by fieldManager from imageReview for the status subresource.

func ImageReview

func ImageReview(name string) *ImageReviewApplyConfiguration

ImageReview constructs a declarative configuration of the ImageReview type for use with apply.

func (*ImageReviewApplyConfiguration) GetAPIVersion

func (b *ImageReviewApplyConfiguration) GetAPIVersion() *string

GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.

func (*ImageReviewApplyConfiguration) GetKind

func (b *ImageReviewApplyConfiguration) GetKind() *string

GetKind retrieves the value of the Kind field in the declarative configuration.

func (*ImageReviewApplyConfiguration) GetName

func (b *ImageReviewApplyConfiguration) GetName() *string

GetName retrieves the value of the Name field in the declarative configuration.

func (*ImageReviewApplyConfiguration) GetNamespace

func (b *ImageReviewApplyConfiguration) GetNamespace() *string

GetNamespace retrieves the value of the Namespace field in the declarative configuration.

func (ImageReviewApplyConfiguration) IsApplyConfiguration

func (b ImageReviewApplyConfiguration) IsApplyConfiguration()

func (*ImageReviewApplyConfiguration) WithAPIVersion

WithAPIVersion sets the APIVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the APIVersion field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithAnnotations

WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*ImageReviewApplyConfiguration) WithCreationTimestamp

WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the CreationTimestamp field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithDeletionGracePeriodSeconds

func (b *ImageReviewApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageReviewApplyConfiguration

WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithDeletionTimestamp

WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the DeletionTimestamp field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithFinalizers

WithFinalizers adds the given value to the Finalizers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Finalizers field.

func (*ImageReviewApplyConfiguration) WithGenerateName

WithGenerateName sets the GenerateName field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the GenerateName field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithGeneration

WithGeneration sets the Generation field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Generation field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithKind

WithKind sets the Kind field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Kind field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithLabels

WithLabels puts the entries into the Labels field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Labels field, overwriting an existing map entries in Labels field with the same key.

func (*ImageReviewApplyConfiguration) WithName

WithName sets the Name field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Name field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithNamespace

WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithOwnerReferences

WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the OwnerReferences field.

func (*ImageReviewApplyConfiguration) WithResourceVersion

WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the ResourceVersion field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithSpec

WithSpec sets the Spec field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Spec field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithStatus

WithStatus sets the Status field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Status field is set to the value of the last call.

func (*ImageReviewApplyConfiguration) WithUID

WithUID sets the UID field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the UID field is set to the value of the last call.

type ImageReviewContainerSpecApplyConfiguration

type ImageReviewContainerSpecApplyConfiguration struct {
	// This can be in the form image:tag or image@SHA:012345679abcdef.
	Image *string `json:"image,omitempty"`
}

ImageReviewContainerSpecApplyConfiguration represents a declarative configuration of the ImageReviewContainerSpec type for use with apply.

ImageReviewContainerSpec is a description of a container within the pod creation request.

func ImageReviewContainerSpec

func ImageReviewContainerSpec() *ImageReviewContainerSpecApplyConfiguration

ImageReviewContainerSpecApplyConfiguration constructs a declarative configuration of the ImageReviewContainerSpec type for use with apply.

func (*ImageReviewContainerSpecApplyConfiguration) WithImage

WithImage sets the Image field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Image field is set to the value of the last call.

type ImageReviewSpecApplyConfiguration

type ImageReviewSpecApplyConfiguration struct {
	// Containers is a list of a subset of the information in each container of the Pod being created.
	Containers []ImageReviewContainerSpecApplyConfiguration `json:"containers,omitempty"`
	// Annotations is a list of key-value pairs extracted from the Pod's annotations.
	// It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
	// It is up to each webhook backend to determine how to interpret these annotations, if at all.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Namespace is the namespace the pod is being created in.
	Namespace *string `json:"namespace,omitempty"`
}

ImageReviewSpecApplyConfiguration represents a declarative configuration of the ImageReviewSpec type for use with apply.

ImageReviewSpec is a description of the pod creation request.

func ImageReviewSpec

func ImageReviewSpec() *ImageReviewSpecApplyConfiguration

ImageReviewSpecApplyConfiguration constructs a declarative configuration of the ImageReviewSpec type for use with apply.

func (*ImageReviewSpecApplyConfiguration) WithAnnotations

WithAnnotations puts the entries into the Annotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the Annotations field, overwriting an existing map entries in Annotations field with the same key.

func (*ImageReviewSpecApplyConfiguration) WithContainers

WithContainers adds the given value to the Containers field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, values provided by each call will be appended to the Containers field.

func (*ImageReviewSpecApplyConfiguration) WithNamespace

WithNamespace sets the Namespace field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Namespace field is set to the value of the last call.

type ImageReviewStatusApplyConfiguration

type ImageReviewStatusApplyConfiguration struct {
	// Allowed indicates that all images were allowed to be run.
	Allowed *bool `json:"allowed,omitempty"`
	// Reason should be empty unless Allowed is false in which case it
	// may contain a short description of what is wrong.  Kubernetes
	// may truncate excessively long errors when displaying to the user.
	Reason *string `json:"reason,omitempty"`
	// AuditAnnotations will be added to the attributes object of the
	// admission controller request using 'AddAnnotation'.  The keys should
	// be prefix-less (i.e., the admission controller will add an
	// appropriate prefix).
	AuditAnnotations map[string]string `json:"auditAnnotations,omitempty"`
}

ImageReviewStatusApplyConfiguration represents a declarative configuration of the ImageReviewStatus type for use with apply.

ImageReviewStatus is the result of the review for the pod creation request.

func ImageReviewStatus

func ImageReviewStatus() *ImageReviewStatusApplyConfiguration

ImageReviewStatusApplyConfiguration constructs a declarative configuration of the ImageReviewStatus type for use with apply.

func (*ImageReviewStatusApplyConfiguration) WithAllowed

WithAllowed sets the Allowed field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Allowed field is set to the value of the last call.

func (*ImageReviewStatusApplyConfiguration) WithAuditAnnotations

WithAuditAnnotations puts the entries into the AuditAnnotations field in the declarative configuration and returns the receiver, so that objects can be build by chaining "With" function invocations. If called multiple times, the entries provided by each call will be put on the AuditAnnotations field, overwriting an existing map entries in AuditAnnotations field with the same key.

func (*ImageReviewStatusApplyConfiguration) WithReason

WithReason sets the Reason field in the declarative configuration to the given value and returns the receiver, so that objects can be built by chaining "With" function invocations. If called multiple times, the Reason field is set to the value of the last call.

Source Files

imagereview.go imagereviewcontainerspec.go imagereviewspec.go imagereviewstatus.go

Version
v0.35.0-alpha.1
Published
Oct 8, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
5 minutes ago

Tools for package owners.