From f59348f874b4384d5d8b42957f88dff4733e2cf3 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Mon, 17 Mar 2025 19:44:33 +0300 Subject: [PATCH 1/4] Add retry to the test port forwarder --- Makefile | 3 +- api/v1/zz_generated.deepcopy.go | 9 +++++- go.mod | 2 -- test/certification/certify_management_test.go | 4 +-- test/certification/certify_metrics_test.go | 4 +-- .../certification/certify_persistence_test.go | 2 +- test/e2e/helper/port_forward.go | 28 +++++++++++++++---- test/e2e/helper/rest_helpers.go | 4 +-- test/e2e/local/helidon_test.go | 2 +- test/e2e/local/management_test.go | 2 +- test/e2e/local/metrics_test.go | 2 +- test/e2e/local/spring_test.go | 2 +- test/e2e/local/status_ha_test.go | 4 +-- test/e2e/prometheus/prometheus_test.go | 2 +- test/e2e/remote/persistence_test.go | 2 +- test/e2e/remote/suspend_test.go | 4 +-- test/e2e/remote/zone_test.go | 4 +-- 17 files changed, 51 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index b4dca62ae..7f0ef66af 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,7 @@ TEST_APPLICATION_IMAGE_SPRING_CNBP := $(OPERATOR_IMAGE_REGISTRY)/operator-test TEST_APPLICATION_IMAGE_SPRING_2 := $(OPERATOR_IMAGE_REGISTRY)/operator-test-spring-2:1.0.0 TEST_APPLICATION_IMAGE_SPRING_FAT_2 := $(OPERATOR_IMAGE_REGISTRY)/operator-test-spring-fat-2:1.0.0 TEST_APPLICATION_IMAGE_SPRING_CNBP_2 := $(OPERATOR_IMAGE_REGISTRY)/operator-test-spring-cnbp-2:1.0.0 -SKIP_SPRING_CNBP := false +SKIP_SPRING_CNBP ?= false # ---------------------------------------------------------------------------------------------------------------------- # Operator Lifecycle Manager properties @@ -2526,6 +2526,7 @@ push-test-images: $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_HELIDON_2) $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_HELIDON_3) $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_SPRING) + $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_SPRING_2) $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_SPRING_FAT) $(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_SPRING_FAT_2) ifneq (true,$(SKIP_SPRING_CNBP)) diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index f136f37f7..172077f71 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -1,10 +1,12 @@ //go:build !ignore_autogenerated +/* + * Copyright (c) 2020, 2 /* * Copyright (c) 2020, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. - */ +//go:build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. @@ -1981,6 +1983,11 @@ func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec) { *out = new(corev1.SecretKeySelector) (*in).DeepCopyInto(*out) } + if in.Authorization != nil { + in, out := &in.Authorization, &out.Authorization + *out = new(monitoringv1.SafeAuthorization) + (*in).DeepCopyInto(*out) + } if in.HonorTimestamps != nil { in, out := &in.HonorTimestamps, &out.HonorTimestamps *out = new(bool) diff --git a/go.mod b/go.mod index 3e8b85c9f..06648b391 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ go 1.24.0 toolchain go1.24.1 -godebug default=go1.24 - require ( github.com/distribution/reference v0.6.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 diff --git a/test/certification/certify_management_test.go b/test/certification/certify_management_test.go index 26618fdf3..688cfece5 100644 --- a/test/certification/certify_management_test.go +++ b/test/certification/certify_management_test.go @@ -58,7 +58,7 @@ func TestCertifyManagementDefaultPort(t *testing.T) { // the default number of replicas is 3 so the first pod should be able to be used // Get only the first pod and add port forwarding var pod = pods[1] - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() @@ -130,7 +130,7 @@ func TestCertifyManagementNonStandardPort(t *testing.T) { // the default number of replicas is 3 so the first pod should be able to be used // Get only the first pod and add port forwarding var pod = pods[1] - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() diff --git a/test/certification/certify_metrics_test.go b/test/certification/certify_metrics_test.go index afb9b7b38..5d7babb71 100644 --- a/test/certification/certify_metrics_test.go +++ b/test/certification/certify_metrics_test.go @@ -58,7 +58,7 @@ func TestCertifyMetricsDefaultPort(t *testing.T) { // the default number of replicas is 3 so the first pod should be able to be used // Get only the first pod and add port forwarding var pod = pods[1] - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() @@ -130,7 +130,7 @@ func TestCertifyMetricsNonStandardPort(t *testing.T) { // the default number of replicas is 3 so the first pod should be able to be used // Get only the first pod and add port forwarding var pod = pods[1] - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() diff --git a/test/certification/certify_persistence_test.go b/test/certification/certify_persistence_test.go index 2db46c24b..8cc9b2044 100644 --- a/test/certification/certify_persistence_test.go +++ b/test/certification/certify_persistence_test.go @@ -243,7 +243,7 @@ func ensurePods(g *GomegaWithT, yamlFile, ns string) (v1.Coherence, []corev1.Pod } func processSnapshotRequest(pod corev1.Pod, actionType snapshotActionType, snapshotName string) error { - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) if err != nil { return err } diff --git a/test/e2e/helper/port_forward.go b/test/e2e/helper/port_forward.go index 914f8691a..79a845672 100644 --- a/test/e2e/helper/port_forward.go +++ b/test/e2e/helper/port_forward.go @@ -8,19 +8,18 @@ package helper import ( "bytes" + "errors" "fmt" + corev1 "k8s.io/api/core/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/portforward" + "k8s.io/client-go/transport/spdy" "net" "net/http" "net/url" "strconv" "strings" "sync" - - "errors" - corev1 "k8s.io/api/core/v1" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/portforward" - "k8s.io/client-go/transport/spdy" ) // PortForwarder forwards ports from the local machine to a K8s Pod. @@ -91,6 +90,23 @@ func PortForwarderForPod(pod *corev1.Pod) (*PortForwarder, map[string]int32, err return &PortForwarder{Namespace: pod.Namespace, PodName: pod.Name, Ports: ports}, localPorts, nil } +// StartPortForwarderForPodWithBackoff forwards all ports in a Pod to local ports. +// This method returns a running PortForwarder, a map of port name to local port +// and any error that may have occurred. +func StartPortForwarderForPodWithBackoff(pod *corev1.Pod) (*PortForwarder, map[string]int32, error) { + var pf *PortForwarder + var m map[string]int32 + var err error + + for i := 0; i < 10; i++ { + pf, m, err = StartPortForwarderForPod(pod) + if err == nil { + break + } + } + return pf, m, err +} + // StartPortForwarderForPod forwards all ports in a Pod to local ports. // This method returns a running PortForwarder, a map of port name to local port // and any error that may have occurred. diff --git a/test/e2e/helper/rest_helpers.go b/test/e2e/helper/rest_helpers.go index 7085cceed..d8f0e79f6 100644 --- a/test/e2e/helper/rest_helpers.go +++ b/test/e2e/helper/rest_helpers.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ @@ -68,7 +68,7 @@ func httpRequest(ctx TestContext, namespace, deploymentName, endpoint, method st // Make a http request to a Pod. func httpRequestToPod(endpoint, method string, pod *v1.Pod) error { - forwarder, ports, err := StartPortForwarderForPod(pod) + forwarder, ports, err := StartPortForwarderForPodWithBackoff(pod) if err != nil { return err } diff --git a/test/e2e/local/helidon_test.go b/test/e2e/local/helidon_test.go index eca244df3..f5b178c74 100644 --- a/test/e2e/local/helidon_test.go +++ b/test/e2e/local/helidon_test.go @@ -38,7 +38,7 @@ func TestHelidonTwoCdiCluster(t *testing.T) { func AssertHelidonEndpoint(t *testing.T, pods []corev1.Pod) { g := NewGomegaWithT(t) - pf, ports, err := helper.StartPortForwarderForPod(&pods[0]) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pods[0]) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() time.Sleep(10 * time.Second) diff --git a/test/e2e/local/management_test.go b/test/e2e/local/management_test.go index cba4c5779..62c2f04b4 100644 --- a/test/e2e/local/management_test.go +++ b/test/e2e/local/management_test.go @@ -198,7 +198,7 @@ func requestManagementWithoutSSL(pod corev1.Pod, retry bool) error { // make a management over rest request. func assertManagementRequest(pod corev1.Pod, client *http.Client, protocol string, retry bool) error { - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) if err != nil { return err } diff --git a/test/e2e/local/metrics_test.go b/test/e2e/local/metrics_test.go index 86c47aa7b..5f6886ce5 100644 --- a/test/e2e/local/metrics_test.go +++ b/test/e2e/local/metrics_test.go @@ -188,7 +188,7 @@ func requestMetricsWithoutSSL(pod corev1.Pod, retry bool) error { // make a metrics request. func assertMetricsRequest(pod corev1.Pod, client *http.Client, protocol string, retry bool) error { - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) if err != nil { return err } diff --git a/test/e2e/local/spring_test.go b/test/e2e/local/spring_test.go index b9ef8492f..485cd191b 100644 --- a/test/e2e/local/spring_test.go +++ b/test/e2e/local/spring_test.go @@ -64,7 +64,7 @@ func TestStartSpringTwoBuildpacksCluster(t *testing.T) { func AssertSpringEndpoint(t *testing.T, pods []corev1.Pod) { g := NewGomegaWithT(t) - pf, ports, err := helper.StartPortForwarderForPod(&pods[0]) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pods[0]) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() diff --git a/test/e2e/local/status_ha_test.go b/test/e2e/local/status_ha_test.go index eec3e94ee..cf9562dad 100644 --- a/test/e2e/local/status_ha_test.go +++ b/test/e2e/local/status_ha_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ @@ -70,7 +70,7 @@ func assertStatusHA(t *testing.T, tc StatusHATestCase) { pods, err := helper.ListCoherencePodsForDeployment(testContext, ns, tc.Deployment.Name) g.Expect(err).NotTo(HaveOccurred()) - pf, ports, err := helper.StartPortForwarderForPod(&pods[0]) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pods[0]) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() diff --git a/test/e2e/prometheus/prometheus_test.go b/test/e2e/prometheus/prometheus_test.go index 96039ff08..a7a3176d9 100644 --- a/test/e2e/prometheus/prometheus_test.go +++ b/test/e2e/prometheus/prometheus_test.go @@ -203,7 +203,7 @@ func PrometheusQuery(t *testing.T, pod corev1.Pod, query string, result interfac func PrometheusAPIRequest(pod corev1.Pod, path string) (*PrometheusAPIResult, error) { // Start the port forwarder for the Pod - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) if err != nil { return nil, err } diff --git a/test/e2e/remote/persistence_test.go b/test/e2e/remote/persistence_test.go index a2b40545c..4c351d449 100644 --- a/test/e2e/remote/persistence_test.go +++ b/test/e2e/remote/persistence_test.go @@ -190,7 +190,7 @@ func processSnapshotRequestBlind(pod corev1.Pod, actionType snapshotActionType) } func processSnapshotRequest(pod corev1.Pod, actionType snapshotActionType) error { - pf, ports, err := helper.StartPortForwarderForPod(&pod) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pod) if err != nil { return err } diff --git a/test/e2e/remote/suspend_test.go b/test/e2e/remote/suspend_test.go index af6fcc51b..bd56e6c7b 100644 --- a/test/e2e/remote/suspend_test.go +++ b/test/e2e/remote/suspend_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ @@ -324,7 +324,7 @@ func ManagementOverRestRequest(c *cohv1.Coherence, path string) (map[string]inte return nil, fmt.Errorf("could not find any Pods for Coherence deployment %s", c.Name) } - pf, ports, err := helper.StartPortForwarderForPod(&pods[0]) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pods[0]) if err != nil { return nil, err } diff --git a/test/e2e/remote/zone_test.go b/test/e2e/remote/zone_test.go index e342eb74e..5f99f6cc7 100644 --- a/test/e2e/remote/zone_test.go +++ b/test/e2e/remote/zone_test.go @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ @@ -128,7 +128,7 @@ func assertLabel(t *testing.T, name string, fileName string, labels, prefixLabel helper.DumpPodLog(testContext, &pods[0], t.Name()) // Port forward to the first Pod - pf, ports, err := helper.StartPortForwarderForPod(&pods[0]) + pf, ports, err := helper.StartPortForwarderForPodWithBackoff(&pods[0]) g.Expect(err).NotTo(HaveOccurred()) defer pf.Close() From 4c64338bac8cf25d1e4c816f46984ca46967cf1d Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Mon, 17 Mar 2025 19:51:50 +0300 Subject: [PATCH 2/4] Exclude generated go file from Git --- .gitignore | 1 + api/v1/zz_generated.deepcopy.go | 2185 ----------------------------- docs/about/04_coherence_spec.adoc | 9 +- 3 files changed, 7 insertions(+), 2188 deletions(-) delete mode 100644 api/v1/zz_generated.deepcopy.go diff --git a/.gitignore b/.gitignore index 9cc536157..f98e09801 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ test/**/test-report.xml /hack/sdk/* # Generated file created by the build +api/**/zz_*.go bundle.Dockerfile /__debug_bin hack/istio*/ diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go deleted file mode 100644 index 172077f71..000000000 --- a/api/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,2185 +0,0 @@ -//go:build !ignore_autogenerated - -/* - * Copyright (c) 2020, 2 -/* - * Copyright (c) 2020, 2025, Oracle and/or its affiliates. - * Licensed under the Universal Permissive License v 1.0 as shown at - * http://oss.oracle.com/licenses/upl. -//go:build !ignore_autogenerated - -// Code generated by controller-gen. DO NOT EDIT. - -package v1 - -import ( - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - batchv1 "k8s.io/api/batch/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Action) DeepCopyInto(out *Action) { - *out = *in - if in.Probe != nil { - in, out := &in.Probe, &out.Probe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.Job != nil { - in, out := &in.Job, &out.Job - *out = new(ActionJob) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action. -func (in *Action) DeepCopy() *Action { - if in == nil { - return nil - } - out := new(Action) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionJob) DeepCopyInto(out *ActionJob) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionJob. -func (in *ActionJob) DeepCopy() *ActionJob { - if in == nil { - return nil - } - out := new(ActionJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(string) - **out = **in - } - if in.Main != nil { - in, out := &in.Main, &out.Main - *out = new(string) - **out = **in - } - if in.EntryPoint != nil { - in, out := &in.EntryPoint, &out.EntryPoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.WorkingDir != nil { - in, out := &in.WorkingDir, &out.WorkingDir - *out = new(string) - **out = **in - } - if in.CloudNativeBuildPack != nil { - in, out := &in.CloudNativeBuildPack, &out.CloudNativeBuildPack - *out = new(CloudNativeBuildPackSpec) - (*in).DeepCopyInto(*out) - } - if in.SpringBootFatJar != nil { - in, out := &in.SpringBootFatJar, &out.SpringBootFatJar - *out = new(string) - **out = **in - } - if in.UseImageEntryPoint != nil { - in, out := &in.UseImageEntryPoint, &out.UseImageEntryPoint - *out = new(bool) - **out = **in - } - if in.UseJdkJavaOptions != nil { - in, out := &in.UseJdkJavaOptions, &out.UseJdkJavaOptions - *out = new(bool) - **out = **in - } - if in.AlternateJdkJavaOptions != nil { - in, out := &in.AlternateJdkJavaOptions, &out.AlternateJdkJavaOptions - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec. -func (in *ApplicationSpec) DeepCopy() *ApplicationSpec { - if in == nil { - return nil - } - out := new(ApplicationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudNativeBuildPackSpec) DeepCopyInto(out *CloudNativeBuildPackSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Launcher != nil { - in, out := &in.Launcher, &out.Launcher - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudNativeBuildPackSpec. -func (in *CloudNativeBuildPackSpec) DeepCopy() *CloudNativeBuildPackSpec { - if in == nil { - return nil - } - out := new(CloudNativeBuildPackSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Coherence) DeepCopyInto(out *Coherence) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Coherence. -func (in *Coherence) DeepCopy() *Coherence { - if in == nil { - return nil - } - out := new(Coherence) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Coherence) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJob) DeepCopyInto(out *CoherenceJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJob. -func (in *CoherenceJob) DeepCopy() *CoherenceJob { - if in == nil { - return nil - } - out := new(CoherenceJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CoherenceJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJobList) DeepCopyInto(out *CoherenceJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CoherenceJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJobList. -func (in *CoherenceJobList) DeepCopy() *CoherenceJobList { - if in == nil { - return nil - } - out := new(CoherenceJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CoherenceJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJobProbe) DeepCopyInto(out *CoherenceJobProbe) { - *out = *in - in.Probe.DeepCopyInto(&out.Probe) - if in.ReadyCount != nil { - in, out := &in.ReadyCount, &out.ReadyCount - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJobProbe. -func (in *CoherenceJobProbe) DeepCopy() *CoherenceJobProbe { - if in == nil { - return nil - } - out := new(CoherenceJobProbe) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJobProbeStatus) DeepCopyInto(out *CoherenceJobProbeStatus) { - *out = *in - if in.LastReadyTime != nil { - in, out := &in.LastReadyTime, &out.LastReadyTime - *out = (*in).DeepCopy() - } - if in.LastProbeTime != nil { - in, out := &in.LastProbeTime, &out.LastProbeTime - *out = (*in).DeepCopy() - } - if in.Success != nil { - in, out := &in.Success, &out.Success - *out = new(bool) - **out = **in - } - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJobProbeStatus. -func (in *CoherenceJobProbeStatus) DeepCopy() *CoherenceJobProbeStatus { - if in == nil { - return nil - } - out := new(CoherenceJobProbeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJobResourceSpec) DeepCopyInto(out *CoherenceJobResourceSpec) { - *out = *in - in.CoherenceResourceSpec.DeepCopyInto(&out.CoherenceResourceSpec) - if in.Completions != nil { - in, out := &in.Completions, &out.Completions - *out = new(int32) - **out = **in - } - if in.SyncCompletionsToReplicas != nil { - in, out := &in.SyncCompletionsToReplicas, &out.SyncCompletionsToReplicas - *out = new(bool) - **out = **in - } - if in.PodFailurePolicy != nil { - in, out := &in.PodFailurePolicy, &out.PodFailurePolicy - *out = new(batchv1.PodFailurePolicy) - (*in).DeepCopyInto(*out) - } - if in.BackoffLimit != nil { - in, out := &in.BackoffLimit, &out.BackoffLimit - *out = new(int32) - **out = **in - } - if in.TTLSecondsAfterFinished != nil { - in, out := &in.TTLSecondsAfterFinished, &out.TTLSecondsAfterFinished - *out = new(int32) - **out = **in - } - if in.CompletionMode != nil { - in, out := &in.CompletionMode, &out.CompletionMode - *out = new(batchv1.CompletionMode) - **out = **in - } - if in.Suspend != nil { - in, out := &in.Suspend, &out.Suspend - *out = new(bool) - **out = **in - } - if in.JobAnnotations != nil { - in, out := &in.JobAnnotations, &out.JobAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ReadyAction != nil { - in, out := &in.ReadyAction, &out.ReadyAction - *out = new(CoherenceJobProbe) - (*in).DeepCopyInto(*out) - } - if in.ForceExit != nil { - in, out := &in.ForceExit, &out.ForceExit - *out = new(bool) - **out = **in - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]corev1.EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Global != nil { - in, out := &in.Global, &out.Global - *out = new(GlobalSpec) - (*in).DeepCopyInto(*out) - } - if in.InitResources != nil { - in, out := &in.InitResources, &out.InitResources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJobResourceSpec. -func (in *CoherenceJobResourceSpec) DeepCopy() *CoherenceJobResourceSpec { - if in == nil { - return nil - } - out := new(CoherenceJobResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceJobStatus) DeepCopyInto(out *CoherenceJobStatus) { - *out = *in - in.CoherenceResourceStatus.DeepCopyInto(&out.CoherenceResourceStatus) - if in.ProbeStatus != nil { - in, out := &in.ProbeStatus, &out.ProbeStatus - *out = make([]CoherenceJobProbeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceJobStatus. -func (in *CoherenceJobStatus) DeepCopy() *CoherenceJobStatus { - if in == nil { - return nil - } - out := new(CoherenceJobStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceList) DeepCopyInto(out *CoherenceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Coherence, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceList. -func (in *CoherenceList) DeepCopy() *CoherenceList { - if in == nil { - return nil - } - out := new(CoherenceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CoherenceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceResourceSpec) DeepCopyInto(out *CoherenceResourceSpec) { - *out = *in - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(string) - **out = **in - } - if in.ImagePullPolicy != nil { - in, out := &in.ImagePullPolicy, &out.ImagePullPolicy - *out = new(corev1.PullPolicy) - **out = **in - } - if in.ImagePullSecrets != nil { - in, out := &in.ImagePullSecrets, &out.ImagePullSecrets - *out = make([]LocalObjectReference, len(*in)) - copy(*out, *in) - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.AppLabel != nil { - in, out := &in.AppLabel, &out.AppLabel - *out = new(string) - **out = **in - } - if in.VersionLabel != nil { - in, out := &in.VersionLabel, &out.VersionLabel - *out = new(string) - **out = **in - } - if in.Coherence != nil { - in, out := &in.Coherence, &out.Coherence - *out = new(CoherenceSpec) - (*in).DeepCopyInto(*out) - } - if in.Application != nil { - in, out := &in.Application, &out.Application - *out = new(ApplicationSpec) - (*in).DeepCopyInto(*out) - } - if in.JVM != nil { - in, out := &in.JVM, &out.JVM - *out = new(JVMSpec) - (*in).DeepCopyInto(*out) - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]NamedPortSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.StartQuorum != nil { - in, out := &in.StartQuorum, &out.StartQuorum - *out = make([]StartQuorum, len(*in)) - copy(*out, *in) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]corev1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SideCars != nil { - in, out := &in.SideCars, &out.SideCars - *out = make([]corev1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ConfigMapVolumes != nil { - in, out := &in.ConfigMapVolumes, &out.ConfigMapVolumes - *out = make([]ConfigMapVolumeSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SecretVolumes != nil { - in, out := &in.SecretVolumes, &out.SecretVolumes - *out = make([]SecretVolumeSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]corev1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]corev1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.HealthPort != nil { - in, out := &in.HealthPort, &out.HealthPort - *out = new(int32) - **out = **in - } - if in.ReadinessProbe != nil { - in, out := &in.ReadinessProbe, &out.ReadinessProbe - *out = new(ReadinessProbeSpec) - (*in).DeepCopyInto(*out) - } - if in.LivenessProbe != nil { - in, out := &in.LivenessProbe, &out.LivenessProbe - *out = new(ReadinessProbeSpec) - (*in).DeepCopyInto(*out) - } - if in.StartupProbe != nil { - in, out := &in.StartupProbe, &out.StartupProbe - *out = new(ReadinessProbeSpec) - (*in).DeepCopyInto(*out) - } - if in.ReadinessGates != nil { - in, out := &in.ReadinessGates, &out.ReadinessGates - *out = make([]corev1.PodReadinessGate, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.ContainerSecurityContext != nil { - in, out := &in.ContainerSecurityContext, &out.ContainerSecurityContext - *out = new(corev1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.ShareProcessNamespace != nil { - in, out := &in.ShareProcessNamespace, &out.ShareProcessNamespace - *out = new(bool) - **out = **in - } - if in.HostIPC != nil { - in, out := &in.HostIPC, &out.HostIPC - *out = new(bool) - **out = **in - } - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = new(NetworkSpec) - (*in).DeepCopyInto(*out) - } - if in.CoherenceUtils != nil { - in, out := &in.CoherenceUtils, &out.CoherenceUtils - *out = new(CoherenceUtilsSpec) - (*in).DeepCopyInto(*out) - } - if in.AutomountServiceAccountToken != nil { - in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken - *out = new(bool) - **out = **in - } - if in.OperatorRequestTimeout != nil { - in, out := &in.OperatorRequestTimeout, &out.OperatorRequestTimeout - *out = new(int32) - **out = **in - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } - if in.EnableServiceLinks != nil { - in, out := &in.EnableServiceLinks, &out.EnableServiceLinks - *out = new(bool) - **out = **in - } - if in.PreemptionPolicy != nil { - in, out := &in.PreemptionPolicy, &out.PreemptionPolicy - *out = new(corev1.PreemptionPolicy) - **out = **in - } - if in.PriorityClassName != nil { - in, out := &in.PriorityClassName, &out.PriorityClassName - *out = new(string) - **out = **in - } - if in.RestartPolicy != nil { - in, out := &in.RestartPolicy, &out.RestartPolicy - *out = new(corev1.RestartPolicy) - **out = **in - } - if in.RuntimeClassName != nil { - in, out := &in.RuntimeClassName, &out.RuntimeClassName - *out = new(string) - **out = **in - } - if in.SchedulerName != nil { - in, out := &in.SchedulerName, &out.SchedulerName - *out = new(string) - **out = **in - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]corev1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.RackLabel != nil { - in, out := &in.RackLabel, &out.RackLabel - *out = new(string) - **out = **in - } - if in.SiteLabel != nil { - in, out := &in.SiteLabel, &out.SiteLabel - *out = new(string) - **out = **in - } - if in.Lifecycle != nil { - in, out := &in.Lifecycle, &out.Lifecycle - *out = new(corev1.Lifecycle) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceResourceSpec. -func (in *CoherenceResourceSpec) DeepCopy() *CoherenceResourceSpec { - if in == nil { - return nil - } - out := new(CoherenceResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceResourceStatus) DeepCopyInto(out *CoherenceResourceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.JobProbes != nil { - in, out := &in.JobProbes, &out.JobProbes - *out = make([]CoherenceJobProbeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceResourceStatus. -func (in *CoherenceResourceStatus) DeepCopy() *CoherenceResourceStatus { - if in == nil { - return nil - } - out := new(CoherenceResourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceSpec) DeepCopyInto(out *CoherenceSpec) { - *out = *in - if in.CacheConfig != nil { - in, out := &in.CacheConfig, &out.CacheConfig - *out = new(string) - **out = **in - } - if in.OverrideConfig != nil { - in, out := &in.OverrideConfig, &out.OverrideConfig - *out = new(string) - **out = **in - } - if in.StorageEnabled != nil { - in, out := &in.StorageEnabled, &out.StorageEnabled - *out = new(bool) - **out = **in - } - if in.Persistence != nil { - in, out := &in.Persistence, &out.Persistence - *out = new(PersistenceSpec) - (*in).DeepCopyInto(*out) - } - if in.LogLevel != nil { - in, out := &in.LogLevel, &out.LogLevel - *out = new(int32) - **out = **in - } - if in.Management != nil { - in, out := &in.Management, &out.Management - *out = new(PortSpecWithSSL) - (*in).DeepCopyInto(*out) - } - if in.Metrics != nil { - in, out := &in.Metrics, &out.Metrics - *out = new(PortSpecWithSSL) - (*in).DeepCopyInto(*out) - } - if in.Tracing != nil { - in, out := &in.Tracing, &out.Tracing - *out = new(CoherenceTracingSpec) - (*in).DeepCopyInto(*out) - } - if in.AllowEndangeredForStatusHA != nil { - in, out := &in.AllowEndangeredForStatusHA, &out.AllowEndangeredForStatusHA - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExcludeFromWKA != nil { - in, out := &in.ExcludeFromWKA, &out.ExcludeFromWKA - *out = new(bool) - **out = **in - } - if in.WKA != nil { - in, out := &in.WKA, &out.WKA - *out = new(CoherenceWKASpec) - (*in).DeepCopyInto(*out) - } - if in.SkipVersionCheck != nil { - in, out := &in.SkipVersionCheck, &out.SkipVersionCheck - *out = new(bool) - **out = **in - } - if in.EnableIPMonitor != nil { - in, out := &in.EnableIPMonitor, &out.EnableIPMonitor - *out = new(bool) - **out = **in - } - if in.LocalPort != nil { - in, out := &in.LocalPort, &out.LocalPort - *out = new(int32) - **out = **in - } - if in.LocalPortAdjust != nil { - in, out := &in.LocalPortAdjust, &out.LocalPortAdjust - *out = new(intstr.IntOrString) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceSpec. -func (in *CoherenceSpec) DeepCopy() *CoherenceSpec { - if in == nil { - return nil - } - out := new(CoherenceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceStatefulSetResourceSpec) DeepCopyInto(out *CoherenceStatefulSetResourceSpec) { - *out = *in - in.CoherenceResourceSpec.DeepCopyInto(&out.CoherenceResourceSpec) - if in.Cluster != nil { - in, out := &in.Cluster, &out.Cluster - *out = new(string) - **out = **in - } - if in.StatefulSetAnnotations != nil { - in, out := &in.StatefulSetAnnotations, &out.StatefulSetAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Scaling != nil { - in, out := &in.Scaling, &out.Scaling - *out = new(ScalingSpec) - (*in).DeepCopyInto(*out) - } - if in.SuspendProbe != nil { - in, out := &in.SuspendProbe, &out.SuspendProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.SuspendServicesOnShutdown != nil { - in, out := &in.SuspendServicesOnShutdown, &out.SuspendServicesOnShutdown - *out = new(bool) - **out = **in - } - if in.ResumeServicesOnStartup != nil { - in, out := &in.ResumeServicesOnStartup, &out.ResumeServicesOnStartup - *out = new(bool) - **out = **in - } - if in.AutoResumeServices != nil { - in, out := &in.AutoResumeServices, &out.AutoResumeServices - *out = make(map[string]bool, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SuspendServiceTimeout != nil { - in, out := &in.SuspendServiceTimeout, &out.SuspendServiceTimeout - *out = new(int) - **out = **in - } - if in.HABeforeUpdate != nil { - in, out := &in.HABeforeUpdate, &out.HABeforeUpdate - *out = new(bool) - **out = **in - } - if in.AllowUnsafeDelete != nil { - in, out := &in.AllowUnsafeDelete, &out.AllowUnsafeDelete - *out = new(bool) - **out = **in - } - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]Action, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]corev1.EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Global != nil { - in, out := &in.Global, &out.Global - *out = new(GlobalSpec) - (*in).DeepCopyInto(*out) - } - if in.InitResources != nil { - in, out := &in.InitResources, &out.InitResources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.RollingUpdateStrategy != nil { - in, out := &in.RollingUpdateStrategy, &out.RollingUpdateStrategy - *out = new(RollingUpdateStrategyType) - **out = **in - } - if in.RollingUpdateLabel != nil { - in, out := &in.RollingUpdateLabel, &out.RollingUpdateLabel - *out = new(string) - **out = **in - } - if in.HeadlessServiceIpFamilies != nil { - in, out := &in.HeadlessServiceIpFamilies, &out.HeadlessServiceIpFamilies - *out = make([]corev1.IPFamily, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceStatefulSetResourceSpec. -func (in *CoherenceStatefulSetResourceSpec) DeepCopy() *CoherenceStatefulSetResourceSpec { - if in == nil { - return nil - } - out := new(CoherenceStatefulSetResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceTracingSpec) DeepCopyInto(out *CoherenceTracingSpec) { - *out = *in - if in.Ratio != nil { - in, out := &in.Ratio, &out.Ratio - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceTracingSpec. -func (in *CoherenceTracingSpec) DeepCopy() *CoherenceTracingSpec { - if in == nil { - return nil - } - out := new(CoherenceTracingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceUtilsSpec) DeepCopyInto(out *CoherenceUtilsSpec) { - *out = *in - if in.ImagePullPolicy != nil { - in, out := &in.ImagePullPolicy, &out.ImagePullPolicy - *out = new(corev1.PullPolicy) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceUtilsSpec. -func (in *CoherenceUtilsSpec) DeepCopy() *CoherenceUtilsSpec { - if in == nil { - return nil - } - out := new(CoherenceUtilsSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CoherenceWKASpec) DeepCopyInto(out *CoherenceWKASpec) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.IPFamily != nil { - in, out := &in.IPFamily, &out.IPFamily - *out = new(corev1.IPFamily) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoherenceWKASpec. -func (in *CoherenceWKASpec) DeepCopy() *CoherenceWKASpec { - if in == nil { - return nil - } - out := new(CoherenceWKASpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CommonWebHook) DeepCopyInto(out *CommonWebHook) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonWebHook. -func (in *CommonWebHook) DeepCopy() *CommonWebHook { - if in == nil { - return nil - } - out := new(CommonWebHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. -func (in *Condition) DeepCopy() *Condition { - if in == nil { - return nil - } - out := new(Condition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Conditions) DeepCopyInto(out *Conditions) { - { - in := &in - *out = make(Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions. -func (in Conditions) DeepCopy() Conditions { - if in == nil { - return nil - } - out := new(Conditions) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapVolumeSpec) DeepCopyInto(out *ConfigMapVolumeSpec) { - *out = *in - if in.MountPropagation != nil { - in, out := &in.MountPropagation, &out.MountPropagation - *out = new(corev1.MountPropagationMode) - **out = **in - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapVolumeSpec. -func (in *ConfigMapVolumeSpec) DeepCopy() *ConfigMapVolumeSpec { - if in == nil { - return nil - } - out := new(ConfigMapVolumeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalSpec) DeepCopyInto(out *GlobalSpec) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalSpec. -func (in *GlobalSpec) DeepCopy() *GlobalSpec { - if in == nil { - return nil - } - out := new(GlobalSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSpec) DeepCopyInto(out *ImageSpec) { - *out = *in - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(string) - **out = **in - } - if in.ImagePullPolicy != nil { - in, out := &in.ImagePullPolicy, &out.ImagePullPolicy - *out = new(corev1.PullPolicy) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec. -func (in *ImageSpec) DeepCopy() *ImageSpec { - if in == nil { - return nil - } - out := new(ImageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JVMSpec) DeepCopyInto(out *JVMSpec) { - *out = *in - if in.Classpath != nil { - in, out := &in.Classpath, &out.Classpath - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Debug != nil { - in, out := &in.Debug, &out.Debug - *out = new(JvmDebugSpec) - (*in).DeepCopyInto(*out) - } - if in.UseContainerLimits != nil { - in, out := &in.UseContainerLimits, &out.UseContainerLimits - *out = new(bool) - **out = **in - } - if in.Gc != nil { - in, out := &in.Gc, &out.Gc - *out = new(JvmGarbageCollectorSpec) - (*in).DeepCopyInto(*out) - } - if in.DiagnosticsVolume != nil { - in, out := &in.DiagnosticsVolume, &out.DiagnosticsVolume - *out = new(corev1.VolumeSource) - (*in).DeepCopyInto(*out) - } - if in.Memory != nil { - in, out := &in.Memory, &out.Memory - *out = new(JvmMemorySpec) - (*in).DeepCopyInto(*out) - } - if in.UseJibClasspath != nil { - in, out := &in.UseJibClasspath, &out.UseJibClasspath - *out = new(bool) - **out = **in - } - if in.Java8 != nil { - in, out := &in.Java8, &out.Java8 - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMSpec. -func (in *JVMSpec) DeepCopy() *JVMSpec { - if in == nil { - return nil - } - out := new(JVMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JvmDebugSpec) DeepCopyInto(out *JvmDebugSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Suspend != nil { - in, out := &in.Suspend, &out.Suspend - *out = new(bool) - **out = **in - } - if in.Attach != nil { - in, out := &in.Attach, &out.Attach - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JvmDebugSpec. -func (in *JvmDebugSpec) DeepCopy() *JvmDebugSpec { - if in == nil { - return nil - } - out := new(JvmDebugSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JvmGarbageCollectorSpec) DeepCopyInto(out *JvmGarbageCollectorSpec) { - *out = *in - if in.Collector != nil { - in, out := &in.Collector, &out.Collector - *out = new(string) - **out = **in - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Logging != nil { - in, out := &in.Logging, &out.Logging - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JvmGarbageCollectorSpec. -func (in *JvmGarbageCollectorSpec) DeepCopy() *JvmGarbageCollectorSpec { - if in == nil { - return nil - } - out := new(JvmGarbageCollectorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JvmMemorySpec) DeepCopyInto(out *JvmMemorySpec) { - *out = *in - if in.HeapSize != nil { - in, out := &in.HeapSize, &out.HeapSize - *out = new(string) - **out = **in - } - if in.InitialHeapSize != nil { - in, out := &in.InitialHeapSize, &out.InitialHeapSize - *out = new(string) - **out = **in - } - if in.MaxHeapSize != nil { - in, out := &in.MaxHeapSize, &out.MaxHeapSize - *out = new(string) - **out = **in - } - if in.MaxRAM != nil { - in, out := &in.MaxRAM, &out.MaxRAM - *out = new(string) - **out = **in - } - if in.Percentage != nil { - in, out := &in.Percentage, &out.Percentage - x := (*in).DeepCopy() - *out = &x - } - if in.InitialRAMPercentage != nil { - in, out := &in.InitialRAMPercentage, &out.InitialRAMPercentage - x := (*in).DeepCopy() - *out = &x - } - if in.MaxRAMPercentage != nil { - in, out := &in.MaxRAMPercentage, &out.MaxRAMPercentage - x := (*in).DeepCopy() - *out = &x - } - if in.MinRAMPercentage != nil { - in, out := &in.MinRAMPercentage, &out.MinRAMPercentage - x := (*in).DeepCopy() - *out = &x - } - if in.StackSize != nil { - in, out := &in.StackSize, &out.StackSize - *out = new(string) - **out = **in - } - if in.MetaspaceSize != nil { - in, out := &in.MetaspaceSize, &out.MetaspaceSize - *out = new(string) - **out = **in - } - if in.DirectMemorySize != nil { - in, out := &in.DirectMemorySize, &out.DirectMemorySize - *out = new(string) - **out = **in - } - if in.NativeMemoryTracking != nil { - in, out := &in.NativeMemoryTracking, &out.NativeMemoryTracking - *out = new(string) - **out = **in - } - if in.OnOutOfMemory != nil { - in, out := &in.OnOutOfMemory, &out.OnOutOfMemory - *out = new(JvmOutOfMemorySpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JvmMemorySpec. -func (in *JvmMemorySpec) DeepCopy() *JvmMemorySpec { - if in == nil { - return nil - } - out := new(JvmMemorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JvmOutOfMemorySpec) DeepCopyInto(out *JvmOutOfMemorySpec) { - *out = *in - if in.Exit != nil { - in, out := &in.Exit, &out.Exit - *out = new(bool) - **out = **in - } - if in.HeapDump != nil { - in, out := &in.HeapDump, &out.HeapDump - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JvmOutOfMemorySpec. -func (in *JvmOutOfMemorySpec) DeepCopy() *JvmOutOfMemorySpec { - if in == nil { - return nil - } - out := new(JvmOutOfMemorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. -func (in *LocalObjectReference) DeepCopy() *LocalObjectReference { - if in == nil { - return nil - } - out := new(LocalObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedPortSpec) DeepCopyInto(out *NamedPortSpec) { - *out = *in - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol - *out = new(corev1.Protocol) - **out = **in - } - if in.AppProtocol != nil { - in, out := &in.AppProtocol, &out.AppProtocol - *out = new(string) - **out = **in - } - if in.NodePort != nil { - in, out := &in.NodePort, &out.NodePort - *out = new(int32) - **out = **in - } - if in.HostPort != nil { - in, out := &in.HostPort, &out.HostPort - *out = new(int32) - **out = **in - } - if in.HostIP != nil { - in, out := &in.HostIP, &out.HostIP - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceSpec) - (*in).DeepCopyInto(*out) - } - if in.ServiceMonitor != nil { - in, out := &in.ServiceMonitor, &out.ServiceMonitor - *out = new(ServiceMonitorSpec) - (*in).DeepCopyInto(*out) - } - if in.ExposeOnSTS != nil { - in, out := &in.ExposeOnSTS, &out.ExposeOnSTS - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedPortSpec. -func (in *NamedPortSpec) DeepCopy() *NamedPortSpec { - if in == nil { - return nil - } - out := new(NamedPortSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } - if in.DNSPolicy != nil { - in, out := &in.DNSPolicy, &out.DNSPolicy - *out = new(corev1.DNSPolicy) - **out = **in - } - if in.HostAliases != nil { - in, out := &in.HostAliases, &out.HostAliases - *out = make([]corev1.HostAlias, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.HostNetwork != nil { - in, out := &in.HostNetwork, &out.HostNetwork - *out = new(bool) - **out = **in - } - if in.Hostname != nil { - in, out := &in.Hostname, &out.Hostname - *out = new(string) - **out = **in - } - if in.SetHostnameAsFQDN != nil { - in, out := &in.SetHostnameAsFQDN, &out.SetHostnameAsFQDN - *out = new(bool) - **out = **in - } - if in.Subdomain != nil { - in, out := &in.Subdomain, &out.Subdomain - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistenceSpec) DeepCopyInto(out *PersistenceSpec) { - *out = *in - if in.Mode != nil { - in, out := &in.Mode, &out.Mode - *out = new(string) - **out = **in - } - in.PersistentStorageSpec.DeepCopyInto(&out.PersistentStorageSpec) - if in.Snapshots != nil { - in, out := &in.Snapshots, &out.Snapshots - *out = new(PersistentStorageSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistenceSpec. -func (in *PersistenceSpec) DeepCopy() *PersistenceSpec { - if in == nil { - return nil - } - out := new(PersistenceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentStorageSpec) DeepCopyInto(out *PersistentStorageSpec) { - *out = *in - if in.PersistentVolumeClaim != nil { - in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim - *out = new(corev1.PersistentVolumeClaimSpec) - (*in).DeepCopyInto(*out) - } - if in.Volume != nil { - in, out := &in.Volume, &out.Volume - *out = new(corev1.VolumeSource) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentStorageSpec. -func (in *PersistentStorageSpec) DeepCopy() *PersistentStorageSpec { - if in == nil { - return nil - } - out := new(PersistentStorageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim) { - *out = *in - in.Metadata.DeepCopyInto(&out.Metadata) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaim. -func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim { - if in == nil { - return nil - } - out := new(PersistentVolumeClaim) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimObjectMeta) DeepCopyInto(out *PersistentVolumeClaimObjectMeta) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimObjectMeta. -func (in *PersistentVolumeClaimObjectMeta) DeepCopy() *PersistentVolumeClaimObjectMeta { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig) { - *out = *in - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Searches != nil { - in, out := &in.Searches, &out.Searches - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]corev1.PodDNSConfigOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig. -func (in *PodDNSConfig) DeepCopy() *PodDNSConfig { - if in == nil { - return nil - } - out := new(PodDNSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortSpecWithSSL) DeepCopyInto(out *PortSpecWithSSL) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - if in.SSL != nil { - in, out := &in.SSL, &out.SSL - *out = new(SSLSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSpecWithSSL. -func (in *PortSpecWithSSL) DeepCopy() *PortSpecWithSSL { - if in == nil { - return nil - } - out := new(PortSpecWithSSL) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Probe) DeepCopyInto(out *Probe) { - *out = *in - in.ProbeHandler.DeepCopyInto(&out.ProbeHandler) - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe. -func (in *Probe) DeepCopy() *Probe { - if in == nil { - return nil - } - out := new(Probe) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProbeHandler) DeepCopyInto(out *ProbeHandler) { - *out = *in - if in.Exec != nil { - in, out := &in.Exec, &out.Exec - *out = new(corev1.ExecAction) - (*in).DeepCopyInto(*out) - } - if in.HTTPGet != nil { - in, out := &in.HTTPGet, &out.HTTPGet - *out = new(corev1.HTTPGetAction) - (*in).DeepCopyInto(*out) - } - if in.TCPSocket != nil { - in, out := &in.TCPSocket, &out.TCPSocket - *out = new(corev1.TCPSocketAction) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeHandler. -func (in *ProbeHandler) DeepCopy() *ProbeHandler { - if in == nil { - return nil - } - out := new(ProbeHandler) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReadinessProbeSpec) DeepCopyInto(out *ReadinessProbeSpec) { - *out = *in - in.ProbeHandler.DeepCopyInto(&out.ProbeHandler) - if in.InitialDelaySeconds != nil { - in, out := &in.InitialDelaySeconds, &out.InitialDelaySeconds - *out = new(int32) - **out = **in - } - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int32) - **out = **in - } - if in.PeriodSeconds != nil { - in, out := &in.PeriodSeconds, &out.PeriodSeconds - *out = new(int32) - **out = **in - } - if in.SuccessThreshold != nil { - in, out := &in.SuccessThreshold, &out.SuccessThreshold - *out = new(int32) - **out = **in - } - if in.FailureThreshold != nil { - in, out := &in.FailureThreshold, &out.FailureThreshold - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadinessProbeSpec. -func (in *ReadinessProbeSpec) DeepCopy() *ReadinessProbeSpec { - if in == nil { - return nil - } - out := new(ReadinessProbeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SSLSpec) DeepCopyInto(out *SSLSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = new(string) - **out = **in - } - if in.KeyStore != nil { - in, out := &in.KeyStore, &out.KeyStore - *out = new(string) - **out = **in - } - if in.KeyStorePasswordFile != nil { - in, out := &in.KeyStorePasswordFile, &out.KeyStorePasswordFile - *out = new(string) - **out = **in - } - if in.KeyPasswordFile != nil { - in, out := &in.KeyPasswordFile, &out.KeyPasswordFile - *out = new(string) - **out = **in - } - if in.KeyStoreAlgorithm != nil { - in, out := &in.KeyStoreAlgorithm, &out.KeyStoreAlgorithm - *out = new(string) - **out = **in - } - if in.KeyStoreProvider != nil { - in, out := &in.KeyStoreProvider, &out.KeyStoreProvider - *out = new(string) - **out = **in - } - if in.KeyStoreType != nil { - in, out := &in.KeyStoreType, &out.KeyStoreType - *out = new(string) - **out = **in - } - if in.TrustStore != nil { - in, out := &in.TrustStore, &out.TrustStore - *out = new(string) - **out = **in - } - if in.TrustStorePasswordFile != nil { - in, out := &in.TrustStorePasswordFile, &out.TrustStorePasswordFile - *out = new(string) - **out = **in - } - if in.TrustStoreAlgorithm != nil { - in, out := &in.TrustStoreAlgorithm, &out.TrustStoreAlgorithm - *out = new(string) - **out = **in - } - if in.TrustStoreProvider != nil { - in, out := &in.TrustStoreProvider, &out.TrustStoreProvider - *out = new(string) - **out = **in - } - if in.TrustStoreType != nil { - in, out := &in.TrustStoreType, &out.TrustStoreType - *out = new(string) - **out = **in - } - if in.RequireClientCert != nil { - in, out := &in.RequireClientCert, &out.RequireClientCert - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSLSpec. -func (in *SSLSpec) DeepCopy() *SSLSpec { - if in == nil { - return nil - } - out := new(SSLSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScalingSpec) DeepCopyInto(out *ScalingSpec) { - *out = *in - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(ScalingPolicy) - **out = **in - } - if in.Probe != nil { - in, out := &in.Probe, &out.Probe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingSpec. -func (in *ScalingSpec) DeepCopy() *ScalingSpec { - if in == nil { - return nil - } - out := new(ScalingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretVolumeSpec) DeepCopyInto(out *SecretVolumeSpec) { - *out = *in - if in.MountPropagation != nil { - in, out := &in.MountPropagation, &out.MountPropagation - *out = new(corev1.MountPropagationMode) - **out = **in - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.KeyToPath, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DefaultMode != nil { - in, out := &in.DefaultMode, &out.DefaultMode - *out = new(int32) - **out = **in - } - if in.Optional != nil { - in, out := &in.Optional, &out.Optional - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretVolumeSpec. -func (in *SecretVolumeSpec) DeepCopy() *SecretVolumeSpec { - if in == nil { - return nil - } - out := new(SecretVolumeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.TargetLabels != nil { - in, out := &in.TargetLabels, &out.TargetLabels - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PodTargetLabels != nil { - in, out := &in.PodTargetLabels, &out.PodTargetLabels - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SampleLimit != nil { - in, out := &in.SampleLimit, &out.SampleLimit - *out = new(uint64) - **out = **in - } - if in.Params != nil { - in, out := &in.Params, &out.Params - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - inVal := (*in)[key] - in, out := &inVal, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.TLSConfig != nil { - in, out := &in.TLSConfig, &out.TLSConfig - *out = new(monitoringv1.TLSConfig) - (*in).DeepCopyInto(*out) - } - if in.BearerTokenSecret != nil { - in, out := &in.BearerTokenSecret, &out.BearerTokenSecret - *out = new(corev1.SecretKeySelector) - (*in).DeepCopyInto(*out) - } - if in.Authorization != nil { - in, out := &in.Authorization, &out.Authorization - *out = new(monitoringv1.SafeAuthorization) - (*in).DeepCopyInto(*out) - } - if in.HonorTimestamps != nil { - in, out := &in.HonorTimestamps, &out.HonorTimestamps - *out = new(bool) - **out = **in - } - if in.BasicAuth != nil { - in, out := &in.BasicAuth, &out.BasicAuth - *out = new(monitoringv1.BasicAuth) - (*in).DeepCopyInto(*out) - } - if in.MetricRelabelings != nil { - in, out := &in.MetricRelabelings, &out.MetricRelabelings - *out = make([]monitoringv1.RelabelConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Relabelings != nil { - in, out := &in.Relabelings, &out.Relabelings - *out = make([]monitoringv1.RelabelConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ProxyURL != nil { - in, out := &in.ProxyURL, &out.ProxyURL - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorSpec. -func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec { - if in == nil { - return nil - } - out := new(ServiceMonitorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.PortName != nil { - in, out := &in.PortName, &out.PortName - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(corev1.ServiceType) - **out = **in - } - if in.ExternalIPs != nil { - in, out := &in.ExternalIPs, &out.ExternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ClusterIP != nil { - in, out := &in.ClusterIP, &out.ClusterIP - *out = new(string) - **out = **in - } - if in.ClusterIPs != nil { - in, out := &in.ClusterIPs, &out.ClusterIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancerIP != nil { - in, out := &in.LoadBalancerIP, &out.LoadBalancerIP - *out = new(string) - **out = **in - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SessionAffinity != nil { - in, out := &in.SessionAffinity, &out.SessionAffinity - *out = new(corev1.ServiceAffinity) - **out = **in - } - if in.LoadBalancerSourceRanges != nil { - in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExternalName != nil { - in, out := &in.ExternalName, &out.ExternalName - *out = new(string) - **out = **in - } - if in.ExternalTrafficPolicy != nil { - in, out := &in.ExternalTrafficPolicy, &out.ExternalTrafficPolicy - *out = new(corev1.ServiceExternalTrafficPolicy) - **out = **in - } - if in.HealthCheckNodePort != nil { - in, out := &in.HealthCheckNodePort, &out.HealthCheckNodePort - *out = new(int32) - **out = **in - } - if in.PublishNotReadyAddresses != nil { - in, out := &in.PublishNotReadyAddresses, &out.PublishNotReadyAddresses - *out = new(bool) - **out = **in - } - if in.SessionAffinityConfig != nil { - in, out := &in.SessionAffinityConfig, &out.SessionAffinityConfig - *out = new(corev1.SessionAffinityConfig) - (*in).DeepCopyInto(*out) - } - if in.IPFamilies != nil { - in, out := &in.IPFamilies, &out.IPFamilies - *out = make([]corev1.IPFamily, len(*in)) - copy(*out, *in) - } - if in.IPFamilyPolicy != nil { - in, out := &in.IPFamilyPolicy, &out.IPFamilyPolicy - *out = new(corev1.IPFamilyPolicy) - **out = **in - } - if in.AllocateLoadBalancerNodePorts != nil { - in, out := &in.AllocateLoadBalancerNodePorts, &out.AllocateLoadBalancerNodePorts - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. -func (in *ServiceSpec) DeepCopy() *ServiceSpec { - if in == nil { - return nil - } - out := new(ServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StartQuorum) DeepCopyInto(out *StartQuorum) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartQuorum. -func (in *StartQuorum) DeepCopy() *StartQuorum { - if in == nil { - return nil - } - out := new(StartQuorum) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StartQuorumStatus) DeepCopyInto(out *StartQuorumStatus) { - *out = *in - out.StartQuorum = in.StartQuorum -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartQuorumStatus. -func (in *StartQuorumStatus) DeepCopy() *StartQuorumStatus { - if in == nil { - return nil - } - out := new(StartQuorumStatus) - in.DeepCopyInto(out) - return out -} diff --git a/docs/about/04_coherence_spec.adoc b/docs/about/04_coherence_spec.adoc index aef2deb52..43b8f5fb2 100644 --- a/docs/about/04_coherence_spec.adoc +++ b/docs/about/04_coherence_spec.adoc @@ -990,8 +990,11 @@ m| params | Optional HTTP URL parameters See https://github.com/prometheus-opera m| interval | Interval at which metrics should be scraped See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| monitoringv1.Duration | false m| scrapeTimeout | Timeout after which the scrape is ended See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| monitoringv1.Duration | false m| tlsConfig | TLS configuration to use when scraping the endpoint See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| *monitoringv1.TLSConfig | false -m| bearerTokenFile | File to read bearer token for scraping targets. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| string | false -m| bearerTokenSecret | Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| *https://{k8s-doc-link}/#secretkeyselector-v1-core[corev1.SecretKeySelector] | false +m| bearerTokenFile | File to read bearer token for scraping targets. Deprecated: use `authorization` instead. m| string | false +m| bearerTokenSecret | Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator. Deprecated: use `authorization` instead. m| *https://{k8s-doc-link}/#secretkeyselector-v1-core[corev1.SecretKeySelector] | false +m| authorization | `authorization` configures the Authorization header credentials to use when scraping the target. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint + + + +Cannot be set at the same time as `basicAuth`, or `oauth2`. m| *monitoringv1.SafeAuthorization | false m| honorLabels | HonorLabels chooses the metric labels on collisions with target labels. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| bool | false m| honorTimestamps | HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data. See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| *bool | false m| basicAuth | BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#endpoint m| *monitoringv1.BasicAuth | false @@ -1019,7 +1022,7 @@ m| clusterIP | clusterIP is the IP address of the service and is usually assigne m| clusterIPs | ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are "None", empty string (""), or a valid IP address. Setting this to "None" makes a "headless service" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value. + + Unless the "IPv6DualStack" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies m| []string | false -m| loadBalancerIP | LoadBalancerIP is the IP address of the load balancer m| *string | false +m| loadBalancerIP | LoadBalancerIP is the IP address of the load balancer Deprecated: This field is deprecated in the Kubernetes API. m| *string | false m| labels | The extra labels to add to the service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ m| map[string]string | false m| annotations | Annotations is free form yaml that will be added to the service annotations m| map[string]string | false m| sessionAffinity | Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies m| *https://pkg.go.dev/k8s.io/api/core/v1#ServiceAffinity | false From de4c117e2b94bcebd3cb21a16251ac1a47289d92 Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Tue, 18 Mar 2025 11:12:23 +0300 Subject: [PATCH 3/4] Harden site and rack label tests --- hack/apply-custom-node-labels.sh | 14 +++++++++++++ hack/k3d-label-node.sh | 24 ++++++++++++++++------ hack/kind-label-node.sh | 15 +++++++++++--- hack/label-nodes.sh | 3 ++- test/e2e/remote/zone-test-custom-rack.yaml | 3 ++- test/e2e/remote/zone-test-custom-site.yaml | 2 +- test/e2e/remote/zone_test.go | 4 ++-- 7 files changed, 51 insertions(+), 14 deletions(-) create mode 100755 hack/apply-custom-node-labels.sh diff --git a/hack/apply-custom-node-labels.sh b/hack/apply-custom-node-labels.sh new file mode 100755 index 000000000..4a1647753 --- /dev/null +++ b/hack/apply-custom-node-labels.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# +# Copyright (c) 2020, 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at +# http://oss.oracle.com/licenses/upl. +# + +# Apply the custom node labels required for site and rack tests +NODES=$(kubectl get nodes -o name) +for NODE in $NODES; do + kubectl label $NODE coherence.oracle.com/site=test-site --overwrite + kubectl label $NODE coherence.oracle.com/rack=test-rack --overwrite +done diff --git a/hack/k3d-label-node.sh b/hack/k3d-label-node.sh index 2889a9f27..8f501bcc6 100755 --- a/hack/k3d-label-node.sh +++ b/hack/k3d-label-node.sh @@ -1,32 +1,44 @@ #!/usr/bin/env bash +# +# Copyright (c) 2020, 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at +# http://oss.oracle.com/licenses/upl. +# + kubectl label node k3d-operator-agent-0 topology.kubernetes.io/zone=zone-one --overwrite kubectl label node k3d-operator-agent-0 topology.kubernetes.io/region=one --overwrite kubectl label node k3d-operator-agent-0 oci.oraclecloud.com/fault-domain=fd-one --overwrite -kubectl label node k3d-operator-agent-0 coherence.oracle.com/test=test-one --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-one --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-one --overwrite kubectl label node k3d-operator-agent-1 topology.kubernetes.io/zone=zone-one --overwrite kubectl label node k3d-operator-agent-1 topology.kubernetes.io/region=one --overwrite kubectl label node k3d-operator-agent-1 oci.oraclecloud.com/fault-domain=fd-one --overwrite -kubectl label node k3d-operator-agent-1 coherence.oracle.com/test=test-one --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-one --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-two --overwrite kubectl label node k3d-operator-agent-2 topology.kubernetes.io/zone=zone-two --overwrite || true kubectl label node k3d-operator-agent-2 topology.kubernetes.io/region=two --overwrite || true kubectl label node k3d-operator-agent-2 oci.oraclecloud.com/fault-domain=fd-two --overwrite || true -kubectl label node k3d-operator-agent-2 coherence.oracle.com/test=test-two --overwrite || true +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-two --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-one --overwrite kubectl label node k3d-operator-agent-3 topology.kubernetes.io/zone=zone-two --overwrite || true kubectl label node k3d-operator-agent-3 topology.kubernetes.io/region=two --overwrite || true kubectl label node k3d-operator-agent-3 oci.oraclecloud.com/fault-domain=fd-two --overwrite || true -kubectl label node k3d-operator-agent-3 coherence.oracle.com/test=test-two --overwrite || true +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-two --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-one --overwrite kubectl label node k3d-operator-agent-4 topology.kubernetes.io/zone=zone-three --overwrite || true kubectl label node k3d-operator-agent-4 topology.kubernetes.io/region=three --overwrite || true kubectl label node k3d-operator-agent-4 oci.oraclecloud.com/fault-domain=fd-three --overwrite || true -kubectl label node k3d-operator-agent-4 coherence.oracle.com/test=test-three --overwrite || true +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-three --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-one --overwrite kubectl label node k3d-operator-server-0 topology.kubernetes.io/zone=zone-three --overwrite || true kubectl label node k3d-operator-server-0 topology.kubernetes.io/region=three --overwrite || true kubectl label node k3d-operator-server-0 oci.oraclecloud.com/fault-domain=fd-three --overwrite || true -kubectl label node k3d-operator-server-0 coherence.oracle.com/test=test-three --overwrite || true +kubectl label node k3d-operator-agent-0 coherence.oracle.com/site=site-three --overwrite +kubectl label node k3d-operator-agent-0 coherence.oracle.com/rack=rack-one --overwrite diff --git a/hack/kind-label-node.sh b/hack/kind-label-node.sh index baabfa659..d95ce5fa2 100755 --- a/hack/kind-label-node.sh +++ b/hack/kind-label-node.sh @@ -1,15 +1,24 @@ #!/usr/bin/env bash +# +# Copyright (c) 2020, 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at +# http://oss.oracle.com/licenses/upl. +# + kubectl label node operator-worker topology.kubernetes.io/zone=zone-one --overwrite kubectl label node operator-worker topology.kubernetes.io/region=one --overwrite kubectl label node operator-worker oci.oraclecloud.com/fault-domain=fd-one --overwrite -kubectl label node operator-worker coherence.oracle.com/test=test-one --overwrite +kubectl label node operator-worker coherence.oracle.com/site=site-one --overwrite +kubectl label node operator-worker coherence.oracle.com/rack=rack-one --overwrite kubectl label node operator-worker2 topology.kubernetes.io/zone=zone-two --overwrite || true kubectl label node operator-worker2 topology.kubernetes.io/region=two --overwrite || true kubectl label node operator-worker2 oci.oraclecloud.com/fault-domain=fd-two --overwrite || true -kubectl label node operator-worker2 coherence.oracle.com/test=test-two --overwrite || true +kubectl label node operator-worker2 coherence.oracle.com/site=site-two --overwrite || true +kubectl label node operator-worker2 coherence.oracle.com/rack=rack-two --overwrite || true kubectl label node operator-worker3 topology.kubernetes.io/zone=zone-three --overwrite || true kubectl label node operator-worker3 topology.kubernetes.io/region=three --overwrite || true kubectl label node operator-worker3 oci.oraclecloud.com/fault-domain=fd-three --overwrite || true -kubectl label node operator-worker3 coherence.oracle.com/test=test-three --overwrite || true +kubectl label node operator-worker3 coherence.oracle.com/site=site-three --overwrite || true +kubectl label node operator-worker3 coherence.oracle.com/rack=rack-three --overwrite || true diff --git a/hack/label-nodes.sh b/hack/label-nodes.sh index c8f3ddcfe..7c0995c95 100755 --- a/hack/label-nodes.sh +++ b/hack/label-nodes.sh @@ -11,5 +11,6 @@ for NODE in $NODES; do kubectl label $NODE topology.kubernetes.io/zone=twighlght-zone --overwrite kubectl label $NODE topology.kubernetes.io/region=AYT --overwrite kubectl label $NODE oci.oraclecloud.com/fault-domain=fd-one --overwrite - kubectl label $NODE coherence.oracle.com/test=test-one --overwrite + kubectl label $NODE coherence.oracle.com/site=test-site --overwrite + kubectl label $NODE coherence.oracle.com/rack=test-rack --overwrite done diff --git a/test/e2e/remote/zone-test-custom-rack.yaml b/test/e2e/remote/zone-test-custom-rack.yaml index 6c55870c8..f45ed695e 100644 --- a/test/e2e/remote/zone-test-custom-rack.yaml +++ b/test/e2e/remote/zone-test-custom-rack.yaml @@ -4,7 +4,8 @@ metadata: name: zone-test spec: replicas: 3 - rackLabel: coherence.oracle.com/test + siteLabel: coherence.oracle.com/site + rackLabel: coherence.oracle.com/rack operatorRequestTimeout: 120 coherence: management: diff --git a/test/e2e/remote/zone-test-custom-site.yaml b/test/e2e/remote/zone-test-custom-site.yaml index a5de51662..a0bfe391a 100644 --- a/test/e2e/remote/zone-test-custom-site.yaml +++ b/test/e2e/remote/zone-test-custom-site.yaml @@ -4,7 +4,7 @@ metadata: name: zone-test spec: replicas: 3 - siteLabel: coherence.oracle.com/test + siteLabel: coherence.oracle.com/site operatorRequestTimeout: 120 coherence: management: diff --git a/test/e2e/remote/zone_test.go b/test/e2e/remote/zone_test.go index 5f99f6cc7..005274d39 100644 --- a/test/e2e/remote/zone_test.go +++ b/test/e2e/remote/zone_test.go @@ -58,7 +58,7 @@ func TestCustomSiteLabel(t *testing.T) { return fmt.Sprintf("custom-site-zone-test-sts.%s.svc", namespace) } - assertLabel(t, "custom-site", "zone-test-custom-site.yaml", []string{"coherence.oracle.com/test"}, []string{}, fn, dfn) + assertLabel(t, "custom-site", "zone-test-custom-site.yaml", []string{"coherence.oracle.com/site"}, []string{}, fn, dfn) } // Verify that a Coherence resource deployed by the Operator has the correct rack value @@ -96,7 +96,7 @@ func TestCustomRackLabel(t *testing.T) { return "n/a" } - assertLabel(t, "custom-rack", "zone-test-custom-rack.yaml", []string{"coherence.oracle.com/test"}, []string{}, fn, dfn) + assertLabel(t, "custom-rack", "zone-test-custom-rack.yaml", []string{"coherence.oracle.com/rack"}, []string{}, fn, dfn) } func assertLabel(t *testing.T, name string, fileName string, labels, prefixLabels []string, fn func(management.MemberData) string, dfn func(string) string) { From e026a458a7547ad58e3365e8d4e334212aeb71bf Mon Sep 17 00:00:00 2001 From: Jonathan Knight Date: Tue, 18 Mar 2025 12:01:20 +0300 Subject: [PATCH 4/4] Use Coherence resource name in CLI yaml --- api/v1/coherenceresourcespec_types.go | 1 + api/v1/common_test.go | 4 ++++ api/v1/constants.go | 1 + pkg/runner/cmd_config.go | 8 ++++++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api/v1/coherenceresourcespec_types.go b/api/v1/coherenceresourcespec_types.go index ffd7d645a..9c8ff07c5 100644 --- a/api/v1/coherenceresourcespec_types.go +++ b/api/v1/coherenceresourcespec_types.go @@ -996,6 +996,7 @@ func (in *CoherenceResourceSpec) CreateDefaultEnv(deployment CoherenceResource) corev1.EnvVar{Name: EnvVarCohHealthPort, Value: Int32ToString(in.GetHealthPort())}, corev1.EnvVar{Name: EnvVarCoherenceTTL, Value: "0"}, corev1.EnvVar{Name: EnvVarCohCtlHome, Value: VolumeMountPathUtils}, + corev1.EnvVar{Name: EnvVarCohResourceName, Value: deployment.GetName()}, ) ann := deployment.GetAnnotations() diff --git a/api/v1/common_test.go b/api/v1/common_test.go index 8cbe5c9e1..4ec176f31 100644 --- a/api/v1/common_test.go +++ b/api/v1/common_test.go @@ -373,6 +373,10 @@ func createMinimalExpectedPodSpec(deployment coh.CoherenceResource) corev1.PodTe Name: "COHERENCE_IPMONITOR_PINGTIMEOUT", Value: "0", }, + { + Name: coh.EnvVarCohResourceName, + Value: deployment.GetName(), + }, } if deployment.GetType() == coh.CoherenceTypeJob { diff --git a/api/v1/constants.go b/api/v1/constants.go index 462be4d59..1279f7dca 100644 --- a/api/v1/constants.go +++ b/api/v1/constants.go @@ -219,6 +219,7 @@ const ( EnvVarCohSkipVersionCheck = "COHERENCE_OPERATOR_SKIP_VERSION_CHECK" EnvVarCohPodUID = "COHERENCE_OPERATOR_POD_UID" EnvVarCohIdentity = "COHERENCE_OPERATOR_IDENTITY" + EnvVarCohResourceName = "COHERENCE_OPERATOR_RESOURCE_NAME" EnvVarCohAppDir = "COHERENCE_OPERATOR_APP_DIR" EnvVarCohSkipSite = "COHERENCE_OPERATOR_SKIP_SITE" EnvVarCohSite = "COHERENCE_OPERATOR_SITE_INFO_LOCATION" diff --git a/pkg/runner/cmd_config.go b/pkg/runner/cmd_config.go index 159a02b60..9239cb1cb 100644 --- a/pkg/runner/cmd_config.go +++ b/pkg/runner/cmd_config.go @@ -239,6 +239,10 @@ func createCliConfig(details *run_details.RunDetails) error { fileName := fmt.Sprintf(v1.FileNamePattern, home, os.PathSeparator, "cohctl.yaml") cluster := details.Getenv(v1.EnvVarCohClusterName) + name := details.Getenv(v1.EnvVarCohResourceName) + if name == "" { + name = cluster + } port := details.Getenv(v1.EnvVarCohMgmtPrefix + v1.EnvVarCohPortSuffix) if port == "" { port = fmt.Sprintf("%d", v1.DefaultManagementPort) @@ -250,7 +254,7 @@ func createCliConfig(details *run_details.RunDetails) error { var buffer bytes.Buffer buffer.WriteString("clusters:\n") - buffer.WriteString(" - name: default\n") + buffer.WriteString(" - name: \"" + name + "\"\n") buffer.WriteString(" discoverytype: manual\n") buffer.WriteString(" connectiontype: " + protocol + "\n") buffer.WriteString(" connectionurl: " + protocol + "://127.0.0.1:" + port + "/management/coherence/cluster\n") @@ -267,7 +271,7 @@ func createCliConfig(details *run_details.RunDetails) error { buffer.WriteString(" loggingdestination: \"\"\n") buffer.WriteString(" managementavailable: false\n") buffer.WriteString("color: \"on\"\n") - buffer.WriteString("currentcontext: default\n") + buffer.WriteString("currentcontext: \"" + name + "\"\n") buffer.WriteString("debug: false\n") buffer.WriteString("defaultbytesformat: m\n") buffer.WriteString("ignoreinvalidcerts: false\n")