datreeSpec top-level property
Completion spec for datree CLI
Implementation
final FigSpec datreeSpec = FigSpec(
name: 'datree',
description: 'Datree can be used on the command line to run policies against Kubernetes manifests YAML files or Helm charts',
subcommands: [
Subcommand(
name: 'completion',
description: 'Generate completion script for bash,zsh,fish,powershell'
),
Subcommand(
name: 'config',
description: 'Internal configuration management for datree config file',
subcommands: [
Subcommand(
name: 'get',
description: 'Get configuration value',
options: [
Option(
name: ['-h', '--help'],
description: 'Get value for specific key from datree config.yaml file. Defaults to \$HOME/.datree/config.yaml'
)
]
),
Subcommand(
name: 'set',
description: 'Set configuration value',
options: [
Option(
name: ['-h', '--help'],
description: 'Apply value for specific key in datree config.yaml file. Defaults to \$HOME/.datree/config.yaml'
)
]
)
],
options: [
Option(
name: ['-h', '--help'],
description: 'Help for config'
)
]
),
Subcommand(
name: 'help',
description: 'Help about any command',
args: [
Arg(
template: 'help'
)
]
),
Subcommand(
name: 'kustomize',
description: 'Generate kustomization files from manifests',
subcommands: [
Subcommand(
name: 'test',
description: 'Test kustomization files',
options: testOptions
)
],
options: [
Option(
name: ['-h', '--help'],
description: 'Help for kustomize'
)
]
),
Subcommand(
name: 'publish',
description: 'Publish policies configuration for given <fileName>. Input should be the path to the Policy-as-Code yaml configuration file. ## Note You need to first enable Policy-as-Code (PaC) on the settings page in the dashboard',
options: [
Option(
name: ['-h', '--help'],
description: 'Help for publish'
)
],
args: [
Arg(
name: 'file path',
template: 'filepaths'
)
]
),
Subcommand(
name: 'test',
description: 'Trigger a policy check, provide a Kubernetes configuration file path or a glob pattern',
args: [
Arg(
name: 'file path',
template: 'filepaths'
)
],
options: testOptions
),
Subcommand(
name: 'version',
description: 'Print the version number'
)
],
options: [
Option(
name: ['--help', '-h'],
description: 'Show help for datree'
)
]
);