validator

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixManifestNames

func FixManifestNames(manifests []v1.Manifest)

FixManifestNames はname未設定のmanifestに対してtypeとpathから名前を自動付与する。 既存の名前との重複を回避するためにサフィックスを付与する。 includesを持つmanifestは展開時にinclude先のmanifest群へ置換されるため、 名前付与の対象外とする。

func ValidateDependsOn added in v0.2.0

func ValidateDependsOn(manifests []v1.Manifest) error

ValidateDependsOn は include 展開後の全 manifest に対して dependsOn の整合性を検証する。 検証項目:

  • dependsOn の参照先が存在する manifest 名であること
  • 自分自身を dependsOn に含めていないこと
  • 循環依存が存在しないこと

同名 manifest の重複については ValidateManifestNames 側で検出済みのため、ここでは 重複名のチェックは行わず後勝ちで索引を構築する。

func ValidateEnvironment added in v0.4.0

func ValidateEnvironment(name string, env *v1.EnvironmentSpec) error

ValidateEnvironment は spec.environments.<name> の 1 エントリをバリデーションします。 環境名が空でないこと、context_matches が有効な正規表現であること、 context_match_mode が 'or' / 'and' のいずれかであることを検証します。

func ValidateGenesisSecretSpec added in v0.4.1

func ValidateGenesisSecretSpec(spec *v1.GenesisSecretSpec) error

ValidateGenesisSecretSpec は GenesisSecretSpec をバリデーションします。 組み込みの 1Password provider(provider 未指定 or "default-op")を使う場合、 secrets[].uri が `op://<host>/<vault>/<item>` 形式であることを検証します。

func ValidateHelmFileVar

func ValidateHelmFileVar(helmVar *v1.HelmFileVar, varName string) error

ValidateHelmFileVar は HelmFileVar をバリデーションします

func ValidateManifest

func ValidateManifest(manifest *v1.Manifest, basePath string) error

ValidateManifest は Manifest をバリデーションします

func ValidateManifestGenesisSecret added in v0.4.1

func ValidateManifestGenesisSecret(manifest *v1.Manifest, basePath string) error

ValidateManifestGenesisSecret は genesissecret manifest が指す spec ファイルを読み、 内容をバリデーションします。ファイルが存在しない・読めない・パースできない場合は ここではエラーにしません(適用時に別途エラーとして報告されるため)。

func ValidateManifestHelmfile

func ValidateManifestHelmfile(helmfile *v1.ManifestHelmfile) error

ValidateManifestHelmfile は ManifestHelmfile をバリデーションします

func ValidateManifestNames

func ValidateManifestNames(manifests []v1.Manifest) error

ValidateManifestNames はinclude展開後の全manifest間でnameのバリデーションを行う。 - Nameが必須 - 使用可能文字: 小文字英数と '-' (DNS-1123 相当、先頭末尾は英数) - 最大長 240 文字 - ユニーク制約 - 予約語 _metadata の禁止

func ValidateManifestORAS

func ValidateManifestORAS(oras *v1.ManifestORAS) error

ValidateManifestORAS は ManifestORAS をバリデーションします

func ValidateManifestWithIncludes

func ValidateManifestWithIncludes(manifest *v1.Manifest, basePath string) error

ValidateManifestWithIncludes は includes を含む Manifest のバリデーションを行います

func ValidateOnePasswordVaultSelector

func ValidateOnePasswordVaultSelector(op *v1.OnePasswordVaultSelector, varName string) error

ValidateOnePasswordVaultSelector は OnePasswordVaultSelector をバリデーションします

func ValidateProviders added in v0.2.0

func ValidateProviders(providers []v1.ProviderConfig) error

ValidateProviders は tazuna.yaml の spec.providers[] をバリデーションします。 重複名・予約名 ("default-op") の使用・type と config フィールドの不整合を検出します。

func ValidateStaticVar

func ValidateStaticVar(helmVar *v1.HelmFileVar, varName string) error

ValidateStaticVar は static 系のフィールドのバリデーションを行います

func ValidateTazuna

func ValidateTazuna(tazuna *v1.Tazuna) error

ValidateTazuna は Tazuna 構造体全体をバリデーションします

func ValidateTazunaSpec

func ValidateTazunaSpec(spec *v1.TazunaSpec, basePath string) error

ValidateTazunaSpec は TazunaSpec をバリデーションします

func ValidateTazunaTypeMeta added in v0.1.3

func ValidateTazunaTypeMeta(tazuna *v1.Tazuna) error

ValidateTazunaTypeMeta は Tazuna の apiVersion / kind を検証します。 後方互換のため未設定 (空文字) は許容しますが、値が設定されている場合は v1.TazunaAPIVersion / v1.TazunaKind と完全一致している必要があります。

func ValidateTazunaWithBasePath

func ValidateTazunaWithBasePath(tazuna *v1.Tazuna, basePath string) error

ValidateTazunaWithBasePath は Tazuna 構造体全体をバリデーションします(ベースパス付き)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL