Dagger
Search

kubeconform

Validates a directory or a single (multi-document) YAML file, optionally
against CRD schemas (for example the datreeio CRDs-catalog).

Installation

dagger install github.com/hampusctl/daggerverse/kubeconform@1b08831096058e8c3abb47cdde51e51663023d86

Entrypoint

Return Type
Kubeconform !
Arguments
NameTypeDefault ValueDescription
containerContainer -container is an existing container with kubeconform on PATH
repositoryString !"ghcr.io/yannh/kubeconform"repository is the kubeconform image repository
tagString !"v0.8.0-alpine"tag is the kubeconform image tag
extraCaCerts[File ! ] -extraCaCerts are additional CA certificate files to trust
Example
dagger -m github.com/hampusctl/daggerverse/kubeconform@1b08831096058e8c3abb47cdde51e51663023d86 call \
 --repository string --tag string
func (m *MyModule) Example(repository string, tag string) *dagger.Kubeconform  {
	return dag.
			Kubeconform(repository, tag)
}
@function
def example(repository: str, tag: str, ) -> dagger.Kubeconform:
	return (
		dag.kubeconform(repository, tag)
	)
@func()
example(repository: string, tag: string, ): Kubeconform {
	return dag
		.kubeconform(repository, tag)
}

Types

Kubeconform 🔗

Kubeconform validates Kubernetes manifests with kubeconform.

container() 🔗

Return Type
Container !
Example
dagger -m github.com/hampusctl/daggerverse/kubeconform@1b08831096058e8c3abb47cdde51e51663023d86 call \
 --repository string --tag string container
func (m *MyModule) Example(repository string, tag string) *dagger.Container  {
	return dag.
			Kubeconform(repository, tag).
			Container()
}
@function
def example(repository: str, tag: str, ) -> dagger.Container:
	return (
		dag.kubeconform(repository, tag)
		.container()
	)
@func()
example(repository: string, tag: string, ): Container {
	return dag
		.kubeconform(repository, tag)
		.container()
}

validate() 🔗

Validate validates the manifests in a directory (recursively) or in one file and returns kubeconform’s output. It fails when any resource is invalid.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
manifestsDirectory -

manifests is a directory of YAML/JSON manifests (searched recursively)

fileFile -

file is a single, possibly multi-document, manifest file

strictBoolean !true

strict disallows additional properties not in the schema and duplicated keys

ignoreMissingSchemasBoolean !false

ignoreMissingSchemas skips resources whose schema is not found

skip[String ! ] -

skip lists kinds to skip, e.g. [“Secret”] or [“apps/v1/Deployment”]

schemaLocations[String ! ] -

schemaLocations are kubeconform -schema-location values; empty means “default”

kubernetesVersionString -

kubernetesVersion validates against this Kubernetes version (e.g. 1.33.0); default is master

formatString !"text"

format is the output format: json, junit, pretty, tap or text

Example
dagger -m github.com/hampusctl/daggerverse/kubeconform@1b08831096058e8c3abb47cdde51e51663023d86 call \
 --repository string --tag string validate --strict boolean --ignore-missing-schemas boolean --format string
func (m *MyModule) Example(ctx context.Context, repository string, tag string, strict bool, ignoreMissingSchemas bool, format string) string  {
	return dag.
			Kubeconform(repository, tag).
			Validate(ctxstrict, ignoreMissingSchemas, format)
}
@function
async def example(repository: str, tag: str, strict: bool, ignoremissingschemas: bool, format: str) -> str:
	return await (
		dag.kubeconform(repository, tag)
		.validate(strict, ignoremissingschemas, format)
	)
@func()
async example(repository: string, tag: string, strict: boolean, ignoreMissingSchemas: boolean, format: string): Promise<string> {
	return dag
		.kubeconform(repository, tag)
		.validate(strict, ignoreMissingSchemas, format)
}