Help us shape the future of Go! Take the 2026 Go Developer Survey

kubeconform

package
v7.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package kubeconform provides a client for validating Kubernetes manifests using kubeconform.

Index

Constants

This section is empty.

Variables

View Source
var ErrValidationFailed = errors.New("validation failed")

ErrValidationFailed indicates that validation failed.

Functions

This section is empty.

Types

type Client

type Client struct{}

Client provides kubeconform validation functionality.

func NewClient

func NewClient() *Client

NewClient creates a new kubeconform client.

func (*Client) ValidateBytes

func (c *Client) ValidateBytes(
	ctx context.Context,
	sourceName string,
	data []byte,
	opts *ValidationOptions,
) error

ValidateBytes validates Kubernetes manifests from raw bytes while preserving the source name.

func (*Client) ValidateFile

func (c *Client) ValidateFile(ctx context.Context, filePath string, opts *ValidationOptions) error

ValidateFile validates a single Kubernetes manifest file.

func (*Client) ValidateManifests

func (c *Client) ValidateManifests(
	ctx context.Context,
	reader io.Reader,
	opts *ValidationOptions,
) error

ValidateManifests validates Kubernetes manifests from a reader (e.g., kustomize build output).

type ValidationOptions

type ValidationOptions struct {
	// SkipKinds is a list of Kubernetes kinds to skip during validation (e.g., "Secret").
	SkipKinds []string
	// Strict enables strict validation mode.
	Strict bool
	// IgnoreMissingSchemas ignores resources with missing schemas.
	IgnoreMissingSchemas bool
}

ValidationOptions configures validation behavior.

Jump to

Keyboard shortcuts

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