-
Notifications
You must be signed in to change notification settings - Fork 315
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
Upgrade controller-runtime and controller-gen #464
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,8 @@ type ProxyDefaultsSpec struct { | |
// Config is an arbitrary map of configuration values used by Connect proxies. | ||
// Any values that your proxy allows can be configured globally here. | ||
// Supports JSON config values. See https://www.consul.io/docs/connect/proxies/envoy#configuration-formatting | ||
// +kubebuilder:validation:Type=object | ||
// +kubebuilder:validation:Schemaless | ||
Comment on lines
+57
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is due to kubernetes-sigs/controller-tools#528 (review) getting merged and now released in latest controller-tools version. It now supports |
||
Config json.RawMessage `json:"config,omitempty"` | ||
// MeshGateway controls the default mesh gateway configuration for this service. | ||
MeshGateway MeshGatewayConfig `json:"meshGateway,omitempty"` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import ( | |
logrtest "github.com/go-logr/logr/testing" | ||
"github.com/hashicorp/consul-k8s/api/common" | ||
"github.com/stretchr/testify/require" | ||
"k8s.io/api/admission/v1beta1" | ||
admissionv1 "k8s.io/api/admission/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client/fake" | ||
|
@@ -85,7 +85,7 @@ func TestValidateProxyDefault(t *testing.T) { | |
require.NoError(t, err) | ||
s := runtime.NewScheme() | ||
s.AddKnownTypes(GroupVersion, &ProxyDefaults{}, &ProxyDefaultsList{}) | ||
client := fake.NewFakeClientWithScheme(s, c.existingResources...) | ||
client := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(c.existingResources...).Build() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh god... the builder pattern There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bahaha!! indeed!! |
||
decoder, err := admission.NewDecoder(s) | ||
require.NoError(t, err) | ||
|
||
|
@@ -96,10 +96,10 @@ func TestValidateProxyDefault(t *testing.T) { | |
decoder: decoder, | ||
} | ||
response := validator.Handle(ctx, admission.Request{ | ||
AdmissionRequest: v1beta1.AdmissionRequest{ | ||
AdmissionRequest: admissionv1.AdmissionRequest{ | ||
Name: c.newResource.KubernetesName(), | ||
Namespace: otherNS, | ||
Operation: v1beta1.Create, | ||
Operation: admissionv1.Create, | ||
Object: runtime.RawExtension{ | ||
Raw: marshalledRequestObject, | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in this file are side-effects of updating to Operator SDK 1.15
It changes the version from
3-alpha
to3
are requires additional fields per CRD