Remove deprecated options in v0.7.0 (#554)

diff --git a/api/v1beta1/solrcloud_types.go b/api/v1beta1/solrcloud_types.go
index 3e97b01..5117b56 100644
--- a/api/v1beta1/solrcloud_types.go
+++ b/api/v1beta1/solrcloud_types.go
@@ -535,14 +535,6 @@
 	// +optional
 	AdditionalDomainNames []string `json:"additionalDomainNames,omitempty"`
 
-	// Provide additional domainNames that the Ingress or ExternalDNS should listen on.
-	// This option is ignored with the LoadBalancer method.
-	//
-	// DEPRECATED: Please use additionalDomainNames instead. This will be removed in a future version.
-	//
-	// +optional
-	AdditionalDomains []string `json:"additionalDomains,omitempty"`
-
 	// NodePortOverride defines the port to have all Solr node service(s) listen on and advertise itself as if advertising through an Ingress or LoadBalancer.
 	// This overrides the default usage of the podPort.
 	//
@@ -556,18 +548,6 @@
 	// +optional
 	NodePortOverride int `json:"nodePortOverride,omitempty"`
 
-	// IngressTLSTerminationSecret defines a TLS Secret to use for TLS termination of all exposed addresses in the ingress.
-	//
-	// This is option is only available when Method=Ingress, because ExternalDNS and LoadBalancer Services do not support TLS termination.
-	// This option is also unavailable when the SolrCloud has TLS enabled via `spec.solrTLS`, in this case the Ingress cannot terminate TLS before reaching Solr.
-	//
-	// When using this option, the UseExternalAddress option will be disabled, since Solr cannot be running in HTTP mode and making internal requests in HTTPS.
-	//
-	// DEPRECATED: Use ingressTLSTermination.tlsSecret instead
-	//
-	// +optional
-	IngressTLSTerminationSecret string `json:"ingressTLSTerminationSecret,omitempty"`
-
 	// IngressTLSTermination tells the SolrCloud Ingress to terminate TLS on incoming connections.
 	//
 	// This is option is only available when Method=Ingress, because ExternalDNS and LoadBalancer Services do not support TLS termination.
@@ -597,61 +577,12 @@
 )
 
 func (opts *ExternalAddressability) withDefaults(usesTLS bool, logger logr.Logger) (changed bool) {
-	// TODO: Remove in v0.7.0
-	// If the deprecated IngressTLSTerminationSecret exists, use it to default the new location of the value.
-	// If that location already exists, then merely remove the deprecated option.
-	if opts.IngressTLSTerminationSecret != "" {
-		terminationSecretLogger := logger.WithValues("option", "spec.solrAddressability.external.ingressTLSTerminationSecret").WithValues("newLocation", "spec.solrAddressability.external.ingressTLSTermination.tlsSecret")
-		var loggingAction string
-		if !opts.HasIngressTLSTermination() {
-			opts.IngressTLSTermination = &SolrIngressTLSTermination{
-				TLSSecret: opts.IngressTLSTerminationSecret,
-			}
-			loggingAction = "Moving"
-		} else {
-			terminationSecretLogger = terminationSecretLogger.WithValues("reason", "Cannot move deprecated option because ingressTLSTermination is already defined")
-			loggingAction = "Removing"
-		}
-		opts.IngressTLSTerminationSecret = ""
-		terminationSecretLogger.Info(loggingAction + " deprecated CRD option")
-		changed = true
-	}
-
 	// You can't use an externalAddress for Solr Nodes if the Nodes are hidden externally
 	if opts.UseExternalAddress && (opts.HideNodes || opts.IngressTLSTermination != nil) {
 		changed = true
 		opts.UseExternalAddress = false
 	}
 
-	// Add the values from the deprecated "additionalDomains" to the new "additionalDomainNames" field
-	// But make sure you aren't creating duplicates
-	// TODO: Remove in v0.7.0
-	if opts.AdditionalDomains != nil {
-		// Only modify AdditionalDomainNames if AdditionalDomains is empty
-		// But if it is non-nil and empty, still set AdditionalDomains to nil
-		if len(opts.AdditionalDomains) > 0 {
-			if len(opts.AdditionalDomainNames) == 0 {
-				opts.AdditionalDomainNames = opts.AdditionalDomains
-			} else {
-				for _, domain := range opts.AdditionalDomains {
-					hasDomain := false
-					for _, containsDomain := range opts.AdditionalDomainNames {
-						if domain == containsDomain {
-							hasDomain = true
-							break
-						}
-					}
-					if !hasDomain {
-						opts.AdditionalDomainNames = append(opts.AdditionalDomainNames, domain)
-					}
-				}
-			}
-		}
-		logger.Info("Moving deprecated CRD option", "option", "spec.solrAddressability.external.additionalDomains", "newLocation", "spec.solrAddressability.external.additionalDomainNames")
-		changed = true
-		opts.AdditionalDomains = nil
-	}
-
 	// If the Ingress method is used, default the nodePortOverride to 80 or 443, since that is the port that most ingress controllers listen on.
 	if !opts.HideNodes && opts.Method == Ingress && opts.NodePortOverride == 0 {
 		changed = true
diff --git a/api/v1beta1/solrcloud_with_defaults_test.go b/api/v1beta1/solrcloud_with_defaults_test.go
deleted file mode 100644
index 9c706e8..0000000
--- a/api/v1beta1/solrcloud_with_defaults_test.go
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package v1beta1
-
-import (
-	"github.com/stretchr/testify/assert"
-	ctrl "sigs.k8s.io/controller-runtime"
-	"testing"
-)
-
-func TestDeprecatedAdditionalDomains(t *testing.T) {
-	ext := &ExternalAddressability{}
-	logger := ctrl.Log
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no additional domains in either field)")
-
-	ext.AdditionalDomainNames = []string{"t1", "t2"}
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no additional domains in the deprecated field)")
-
-	ext.AdditionalDomains = nil
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no additional domains in the deprecated field)")
-
-	ext.AdditionalDomains = []string{}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2"}, ext.AdditionalDomainNames, "There are no values from additionalDomains to append to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomains = []string{"t1", "t2"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2"}, ext.AdditionalDomainNames, "The values are the same between additionalDomains and additionalDomainNames, so nothing should be changed in additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomains = []string{"t1", "t2", "t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomains = []string{"t1", "t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomains = []string{"t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomains = []string{"t4", "t1", "t2", "t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t1", "t2", "t4", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomainNames = nil
-	ext.AdditionalDomains = []string{"t4", "t1", "t2", "t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t4", "t1", "t2", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-
-	ext.AdditionalDomainNames = []string{}
-	ext.AdditionalDomains = []string{"t4", "t1", "t2", "t3"}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.ElementsMatch(t, []string{"t4", "t1", "t2", "t3"}, ext.AdditionalDomainNames, "The unique values from additionalDomains were not appended to additionalDomainNames")
-	assert.Nil(t, ext.AdditionalDomains, "The additionalDomains field was not set to nil")
-}
-
-func TestDeprecatedIngressTerminationTLSSecret(t *testing.T) {
-	ext := &ExternalAddressability{
-		Method:           Ingress,
-		NodePortOverride: 80,
-	}
-
-	logger := ctrl.Log
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no termination in either field)")
-
-	ext.IngressTLSTerminationSecret = ""
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no termination in the deprecated field)")
-
-	ext.IngressTLSTermination = &SolrIngressTLSTermination{
-		TLSSecret: "test",
-	}
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no termination in the deprecated field)")
-
-	ext.IngressTLSTermination = &SolrIngressTLSTermination{
-		UseDefaultTLSSecret: true,
-	}
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no termination in the deprecated field)")
-
-	ext.IngressTLSTermination = &SolrIngressTLSTermination{
-		UseDefaultTLSSecret: false,
-	}
-
-	assert.False(t, ext.withDefaults(false, logger), "withDefaults() returned true when nothing should have been changed (no termination in the deprecated field)")
-
-	ext.IngressTLSTerminationSecret = "test2"
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.Equal(t, "test2", ext.IngressTLSTermination.TLSSecret, "The value from ingressTLSTerminationSecret should have populated ingressTLSTermination.tlsSecret")
-	assert.Empty(t, ext.IngressTLSTerminationSecret, "The ingressTLSTerminationSecret field was not set to nil")
-
-	ext.IngressTLSTerminationSecret = "test2"
-	ext.IngressTLSTermination = &SolrIngressTLSTermination{
-		UseDefaultTLSSecret: true,
-	}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.Empty(t, ext.IngressTLSTermination.TLSSecret, "The value from ingressTLSTerminationSecret should not have populated ingressTLSTermination.tlsSecret, since useDefaultTLSSecret is set to true")
-	assert.Empty(t, ext.IngressTLSTerminationSecret, "The ingressTLSTerminationSecret field was not set to nil")
-
-	ext.IngressTLSTerminationSecret = "test2"
-	ext.IngressTLSTermination = &SolrIngressTLSTermination{
-		TLSSecret: "test",
-	}
-
-	assert.True(t, ext.withDefaults(false, logger), "withDefaults() returned false when the additionalDomains field needs to be removed")
-	assert.Equal(t, "test", ext.IngressTLSTermination.TLSSecret, "The value from ingressTLSTerminationSecret should not have populated ingressTLSTermination.tlsSecret, since the field is already set")
-	assert.Empty(t, ext.IngressTLSTerminationSecret, "The ingressTLSTerminationSecret field was not set to nil")
-}
diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go
index c3e2014..3ef8333 100644
--- a/api/v1beta1/zz_generated.deepcopy.go
+++ b/api/v1beta1/zz_generated.deepcopy.go
@@ -259,11 +259,6 @@
 		*out = make([]string, len(*in))
 		copy(*out, *in)
 	}
-	if in.AdditionalDomains != nil {
-		in, out := &in.AdditionalDomains, &out.AdditionalDomains
-		*out = make([]string, len(*in))
-		copy(*out, *in)
-	}
 	if in.IngressTLSTermination != nil {
 		in, out := &in.IngressTLSTermination, &out.IngressTLSTermination
 		*out = new(SolrIngressTLSTermination)
diff --git a/config/crd/bases/solr.apache.org_solrclouds.yaml b/config/crd/bases/solr.apache.org_solrclouds.yaml
index 4d3cf1c..8908561 100644
--- a/config/crd/bases/solr.apache.org_solrclouds.yaml
+++ b/config/crd/bases/solr.apache.org_solrclouds.yaml
@@ -9198,15 +9198,6 @@
                         items:
                           type: string
                         type: array
-                      additionalDomains:
-                        description: "Provide additional domainNames that the Ingress
-                          or ExternalDNS should listen on. This option is ignored
-                          with the LoadBalancer method. \n DEPRECATED: Please use
-                          additionalDomainNames instead. This will be removed in a
-                          future version."
-                        items:
-                          type: string
-                        type: array
                       domainName:
                         description: "Override the domainName provided as startup
                           parameters to the operator, used by ingresses and externalDNS.
@@ -9254,19 +9245,6 @@
                               https://kubernetes.github.io/ingress-nginx/user-guide/tls/#default-ssl-certificate"
                             type: boolean
                         type: object
-                      ingressTLSTerminationSecret:
-                        description: "IngressTLSTerminationSecret defines a TLS Secret
-                          to use for TLS termination of all exposed addresses in the
-                          ingress. \n This is option is only available when Method=Ingress,
-                          because ExternalDNS and LoadBalancer Services do not support
-                          TLS termination. This option is also unavailable when the
-                          SolrCloud has TLS enabled via `spec.solrTLS`, in this case
-                          the Ingress cannot terminate TLS before reaching Solr. \n
-                          When using this option, the UseExternalAddress option will
-                          be disabled, since Solr cannot be running in HTTP mode and
-                          making internal requests in HTTPS. \n DEPRECATED: Use ingressTLSTermination.tlsSecret
-                          instead"
-                        type: string
                       method:
                         description: The way in which this SolrCloud's service(s)
                           should be made addressable externally.
diff --git a/docs/upgrade-notes.md b/docs/upgrade-notes.md
index 7d8bf92..0832ac4 100644
--- a/docs/upgrade-notes.md
+++ b/docs/upgrade-notes.md
@@ -133,6 +133,14 @@
   This change will improve request success rates during a rolling restart.
   Refer to the [Managed Updates documentation](solr-cloud/managed-updates.md#pod-readiness-during-updates).
 
+- The deprecated SolrCloud CRD field `Spec.solrAddressability.external.ingressTLSTerminationSecret` has been removed, please use `Spec.solrAddressability.external.ingressTLSTermination.tlsSecret` instead.
+  In order to have these fields changed automatically, upgrade to the `v0.6.0` version of the Solr operator before upgrading to the `v0.7.0` version.
+  However, all new SolrCloud resources will need to respect this field change.
+
+- The deprecated SolrCloud CRD field `Spec.solrAddressability.external.additionalDomains` has been removed, please use `Spec.solrAddressability.external.additionalDomainNames` instead.
+  In order to have these fields changed automatically, upgrade to the `v0.6.0` version of the Solr operator before upgrading to the `v0.7.0` version.
+  However, all new SolrCloud resources will need to respect this field change.
+
 ### v0.6.0
 - The default Solr version for the `SolrCloud` and `SolrPrometheusExporter` resources has been upgraded from `8.9` to `8.11`.
   This will not affect any existing resources, as default versions are hard-written to the resources immediately.
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index 3142875..de4c601 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -169,6 +169,13 @@
           url: https://github.com/apache/solr-operator/issues/538
         - name: GitHub PR
           url: https://github.com/apache/solr-operator/pull/540
+    - kind: removed
+      description: Options deprecated in v0.6.0 have been been removed.
+      links:
+        - name: GitHub Issue
+          url: https://github.com/apache/solr-operator/issues/553
+        - name: GitHub PR
+          url: https://github.com/apache/solr-operator/pull/554
   artifacthub.io/images: |
     - name: solr-operator
       image: apache/solr-operator:v0.7.0-prerelease
diff --git a/helm/solr-operator/crds/crds.yaml b/helm/solr-operator/crds/crds.yaml
index 8ac1456..4e02209 100644
--- a/helm/solr-operator/crds/crds.yaml
+++ b/helm/solr-operator/crds/crds.yaml
@@ -9447,15 +9447,6 @@
                         items:
                           type: string
                         type: array
-                      additionalDomains:
-                        description: "Provide additional domainNames that the Ingress
-                          or ExternalDNS should listen on. This option is ignored
-                          with the LoadBalancer method. \n DEPRECATED: Please use
-                          additionalDomainNames instead. This will be removed in a
-                          future version."
-                        items:
-                          type: string
-                        type: array
                       domainName:
                         description: "Override the domainName provided as startup
                           parameters to the operator, used by ingresses and externalDNS.
@@ -9503,19 +9494,6 @@
                               https://kubernetes.github.io/ingress-nginx/user-guide/tls/#default-ssl-certificate"
                             type: boolean
                         type: object
-                      ingressTLSTerminationSecret:
-                        description: "IngressTLSTerminationSecret defines a TLS Secret
-                          to use for TLS termination of all exposed addresses in the
-                          ingress. \n This is option is only available when Method=Ingress,
-                          because ExternalDNS and LoadBalancer Services do not support
-                          TLS termination. This option is also unavailable when the
-                          SolrCloud has TLS enabled via `spec.solrTLS`, in this case
-                          the Ingress cannot terminate TLS before reaching Solr. \n
-                          When using this option, the UseExternalAddress option will
-                          be disabled, since Solr cannot be running in HTTP mode and
-                          making internal requests in HTTPS. \n DEPRECATED: Use ingressTLSTermination.tlsSecret
-                          instead"
-                        type: string
                       method:
                         description: The way in which this SolrCloud's service(s)
                           should be made addressable externally.