Documentation
¶
Overview ¶
Package kubeconform provides a client for validating Kubernetes manifests using kubeconform.
Index ¶
- Variables
- type Client
- func (c *Client) ValidateBytes(ctx context.Context, sourceName string, data []byte, opts *ValidationOptions) error
- func (c *Client) ValidateFile(ctx context.Context, filePath string, opts *ValidationOptions) error
- func (c *Client) ValidateManifests(ctx context.Context, reader io.Reader, opts *ValidationOptions) error
- type ValidationOptions
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 (*Client) ValidateBytes ¶ added in v5.78.2
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.