Skip to content

Commit

Permalink
Make clusterRefs mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnBlackwell committed Jan 29, 2025
1 parent 6dff0d3 commit 712a1a1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
x-kubernetes-validations:
- message: Cluster is immutable
rule: self == oldSelf
configuration:
additionalProperties:
type: string
Expand Down
4 changes: 2 additions & 2 deletions go/controller/api/v1alpha1/servicedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package v1alpha1
import (
"encoding/json"

console "github.com/pluralsh/console/go/client"
"github.com/samber/lo"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"

console "github.com/pluralsh/console/go/client"
)

func init() {
Expand Down Expand Up @@ -159,7 +160,6 @@ type ServiceSpec struct {
// +kubebuilder:validation:Optional
RepositoryRef *corev1.ObjectReference `json:"repositoryRef"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Cluster is immutable"
ClusterRef corev1.ObjectReference `json:"clusterRef"`
// ConfigurationRef is a secret reference which should contain service configuration.
// +kubebuilder:validation:Optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
x-kubernetes-validations:
- message: Cluster is immutable
rule: self == oldSelf
configuration:
additionalProperties:
type: string
Expand Down
2 changes: 1 addition & 1 deletion go/controller/internal/test/mocks/ConsoleClient_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
x-kubernetes-validations:
- message: Cluster is immutable
rule: self == oldSelf
configuration:
additionalProperties:
type: string
Expand Down

0 comments on commit 712a1a1

Please sign in to comment.