Skip to content

Commit 78ffe41

Browse files
committed
Removing unused control plane default structure and funcs
Signed-off-by: Jiri Podivin <[email protected]>
1 parent 991d251 commit 78ffe41

File tree

5 files changed

+0
-41
lines changed

5 files changed

+0
-41
lines changed

apis/core/v1beta1/openstackcontrolplane_types.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
"github.com/openstack-k8s-operators/lib-common/modules/common/route"
3535
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
3636
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
37-
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
3837
"github.com/openstack-k8s-operators/lib-common/modules/storage"
3938
manilav1 "github.com/openstack-k8s-operators/manila-operator/api/v1beta1"
4039
mariadbv1 "github.com/openstack-k8s-operators/mariadb-operator/api/v1beta1"
@@ -928,16 +927,6 @@ func (instance *OpenStackControlPlane) InitConditions() {
928927
instance.Status.Conditions.Init(&cl)
929928
}
930929

931-
// SetupDefaults - initializes any CRD field defaults based on environment variables (the defaulting mechanism itself is implemented via webhooks)
932-
func SetupDefaults() {
933-
// Acquire environmental defaults and initialize OpenStackControlPlane defaults with them
934-
openstackControlPlaneDefaults := OpenStackControlPlaneDefaults{
935-
RabbitMqImageURL: util.GetEnvVar("RELATED_IMAGE_RABBITMQ_IMAGE_URL_DEFAULT", RabbitMqContainerImage),
936-
}
937-
938-
SetupOpenStackControlPlaneDefaults(openstackControlPlaneDefaults)
939-
}
940-
941930
// IsCustomIssuer - returns true if CustomIssuer is provided and not empty string
942931
func (ca CACertConfig) IsCustomIssuer() bool {
943932
return ca.CustomIssuer != nil && *ca.CustomIssuer != ""

apis/core/v1beta1/openstackcontrolplane_webhook.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,9 @@ import (
5959

6060
var ctlplaneWebhookClient client.Client
6161

62-
// OpenStackControlPlaneDefaults -
63-
type OpenStackControlPlaneDefaults struct {
64-
RabbitMqImageURL string
65-
}
66-
67-
var openstackControlPlaneDefaults OpenStackControlPlaneDefaults
68-
6962
// log is for logging in this package.
7063
var openstackcontrolplanelog = logf.Log.WithName("openstackcontrolplane-resource")
7164

72-
// SetupOpenStackControlPlaneDefaults - initialize OpenStackControlPlane spec defaults for use with internal webhooks
73-
func SetupOpenStackControlPlaneDefaults(defaults OpenStackControlPlaneDefaults) {
74-
openstackControlPlaneDefaults = defaults
75-
openstackcontrolplanelog.Info("OpenStackControlPlane defaults initialized", "defaults", defaults)
76-
}
77-
7865
// SetupWebhookWithManager sets up the Webhook with the Manager.
7966
func (r *OpenStackControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
8067
if ctlplaneWebhookClient == nil {

apis/core/v1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ func main() {
253253
dataplanev1.SetupDefaults()
254254

255255
// Defaults for anything else that was not covered by OpenStackClient nor service operator defaults
256-
corev1.SetupDefaults()
257256
corev1.SetupVersionDefaults()
258257

259258
// Webhooks

tests/functional/ctlplane/suite_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ var _ = BeforeSuite(func() {
328328
core_ctrl.SetupVersionDefaults()
329329
openstack.SetupServiceOperatorDefaults()
330330
openstackclientv1.SetupDefaults()
331-
corev1.SetupDefaults()
332331
corev1.SetupVersionDefaults()
333332

334333
err = (&client_ctrl.OpenStackClientReconciler{

0 commit comments

Comments
 (0)