Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clusterRefs mutable #1819

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading