diff --git a/api/v1alpha1/kustomization_types.go b/api/v1alpha1/kustomization_types.go index 454c0e6..97a31fa 100644 --- a/api/v1alpha1/kustomization_types.go +++ b/api/v1alpha1/kustomization_types.go @@ -74,6 +74,14 @@ type KustomizationSpec struct { // +optional Suspend bool `json:"suspend,omitempty"` + // TargetNamespace sets or overrides the namespace in the + // kustomization.yaml file. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:Optional + // +optional + TargetNamespace string `json:"targetNamespace,omitempty"` + // Timeout for validation, apply and health checking operations. // Defaults to 'Interval' duration. // +optional diff --git a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml index d454846..98c5c36 100644 --- a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml +++ b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml @@ -164,6 +164,11 @@ spec: kustomize executions, it does not apply to already started executions. Defaults to false. type: boolean + targetNamespace: + description: TargetNamespace sets or overrides the kustomization namespace. + maxLength: 63 + minLength: 1 + type: string timeout: description: Timeout for validation, apply and health checking operations. Defaults to 'Interval' duration. diff --git a/docs/api/kustomize.md b/docs/api/kustomize.md index 6147f59..02108ef 100644 --- a/docs/api/kustomize.md +++ b/docs/api/kustomize.md @@ -189,6 +189,18 @@ it does not apply to already started executions. Defaults to false.

+targetNamespace
+ +string + + + +(Optional) +

TargetNamespace sets or overrides the kustomization namespace.

+ + + + timeout
@@ -638,6 +650,18 @@ it does not apply to already started executions. Defaults to false.

+targetNamespace
+ +string + + + +(Optional) +

TargetNamespace sets or overrides the kustomization namespace.

+ + + + timeout
diff --git a/docs/spec/v1alpha1/kustomization.md b/docs/spec/v1alpha1/kustomization.md index 1151d5c..35be0af 100644 --- a/docs/spec/v1alpha1/kustomization.md +++ b/docs/spec/v1alpha1/kustomization.md @@ -51,6 +51,11 @@ type KustomizationSpec struct { // +optional Suspend bool `json:"suspend,omitempty"` + // TargetNamespace sets or overrides the namespace in the + // kustomization.yaml file. + // +optional + TargetNamespace string `json:"targetNamespace,omitempty"` + // Timeout for validation, apply and health checking operations. // Defaults to 'Interval' duration. // +optional