kubeconform
Validates a directory or a single (multi-document) YAML file, optionallyagainst CRD schemas (for example the datreeio CRDs-catalog).
Installation
dagger install github.com/hampusctl/daggerverse/kubeconform@1b08831096058e8c3abb47cdde51e51663023d86Entrypoint
Return Type
Kubeconform !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | container is an existing container with kubeconform on PATH |
| repository | String ! | "ghcr.io/yannh/kubeconform" | repository is the kubeconform image repository |
| tag | String ! | "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 stringfunc (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 containerfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| manifests | Directory | - | manifests is a directory of YAML/JSON manifests (searched recursively) |
| file | File | - | file is a single, possibly multi-document, manifest file |
| strict | Boolean ! | true | strict disallows additional properties not in the schema and duplicated keys |
| ignoreMissingSchemas | Boolean ! | 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” |
| kubernetesVersion | String | - | kubernetesVersion validates against this Kubernetes version (e.g. 1.33.0); default is master |
| format | String ! | "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 stringfunc (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)
}