Skip to content

Commit

Permalink
feat: set DSCI application namespace to be immutable (#1222)
Browse files Browse the repository at this point in the history
- we do not support other values for now, this is to prevent user change to different value and cause old and new both running

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
  • Loading branch information
zdtsw authored Sep 13, 2024
1 parent dd3df21 commit ff7d131
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/dscinitialization/v1/dscinitialization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
type DSCInitializationSpec struct {
// Namespace for applications to be installed, non-configurable, default to "opendatahub"
// +kubebuilder:default:=opendatahub
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ApplicationsNamespace is immutable"
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
ApplicationsNamespace string `json:"applicationsNamespace"`
// Enable monitoring on specified namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ spec:
description: Namespace for applications to be installed, non-configurable,
default to "opendatahub"
type: string
x-kubernetes-validations:
- message: ApplicationsNamespace is immutable
rule: self == oldSelf
devFlags:
description: |-
Internal development useful field to test customizations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ spec:
description: Namespace for applications to be installed, non-configurable,
default to "opendatahub"
type: string
x-kubernetes-validations:
- message: ApplicationsNamespace is immutable
rule: self == oldSelf
devFlags:
description: |-
Internal development useful field to test customizations.
Expand Down

0 comments on commit ff7d131

Please sign in to comment.