Flux Schema Config

Official Flux CLI plugin documentation.

The flux schema validate command can load default flag values from a YAML configuration file. The file shape is versioned and documented by the JSON Schema in config-v1beta1.json.

Example

apiVersion: schema.plugin.fluxcd.io/v1beta1
kind: Config
validate:
  schemaLocation:
    - default
    - https://raw.githubusercontent.com/datreeio/CRDs-catalog/main
  skipKind:
    - source.toolkit.fluxcd.io/v1/ExternalArtifact
  skipJSONPath:
    - Secret:/sops
  skipFile:
    - '.*'
    - kustomization.yaml
  skipCELRules: false
  skipMissingSchemas: false
  verbose: true
  failFast: false
  concurrent: 8
  insecureSkipTLSVerify: false
  output: text

Usage:

flux schema validate ./manifests --config .fluxschema.yml

When --config is not set, the FLUX_SCHEMA_CONFIG environment variable is used. When neither is set, Flux Schema looks for a config file at the executable path plus .config, for example ~/.fluxcd/plugins/flux-schema.config.

Specification

FieldDescription
apiVersionConfig API version. Currently schema.plugin.fluxcd.io/v1beta1.
kindConfig API kind. Currently Config.
validateDefaults for validation options.

Validation

The validate section configures defaults for the flux schema validate flags.

FieldDescription
schemaLocation[]Schema URLs, file paths, or templates tried in order.
skipMissingSchemasSkip documents for which no schema can be found.
skipKind[]Kind or apiVersion/kind patterns excluded from validation.
skipJSONPath[]JSON Pointers stripped before validation.
skipFile[]Basename glob patterns excluded from validation.
skipCELRulesDisable evaluation of x-kubernetes-validations CEL rules.
verbosePrint a line for every document, including valid and skipped.
failFastExit after the first invalid document.
concurrentNumber of concurrent validation workers.
insecureSkipTLSVerifyDisable TLS certificate verification when downloading schemas.
outputOutput format: text, json, or yaml.

When the output field is set to json or yaml, the result has the Report API shape.