From a4de4c1716b227622b5ae28b6dfbff5dfdf9cdbb Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 26 Nov 2018 10:49:25 -0700 Subject: [PATCH] Update generated code --- .../apps/v1beta2/zz_generated_daemon_set_controller.go | 8 ++------ .../zz_generated_daemon_set_lifecycle_adapter.go | 10 ++++++++++ .../apps/v1beta2/zz_generated_deployment_controller.go | 8 ++------ .../zz_generated_deployment_lifecycle_adapter.go | 10 ++++++++++ .../v1beta2/zz_generated_replica_set_controller.go | 8 ++------ .../zz_generated_replica_set_lifecycle_adapter.go | 10 ++++++++++ .../v1beta2/zz_generated_stateful_set_controller.go | 8 ++------ .../zz_generated_stateful_set_lifecycle_adapter.go | 10 ++++++++++ apis/batch/v1/zz_generated_job_controller.go | 8 ++------ apis/batch/v1/zz_generated_job_lifecycle_adapter.go | 10 ++++++++++ apis/batch/v1beta1/zz_generated_cron_job_controller.go | 8 ++------ .../v1beta1/zz_generated_cron_job_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_component_status_controller.go | 8 ++------ .../zz_generated_component_status_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_config_map_controller.go | 8 ++------ .../v1/zz_generated_config_map_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_endpoints_controller.go | 8 ++------ .../v1/zz_generated_endpoints_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_event_controller.go | 8 ++------ apis/core/v1/zz_generated_event_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_namespace_controller.go | 8 ++------ .../v1/zz_generated_namespace_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_node_controller.go | 8 ++------ apis/core/v1/zz_generated_node_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_persistent_volume_claim_controller.go | 8 ++------ ...erated_persistent_volume_claim_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_pod_controller.go | 8 ++------ apis/core/v1/zz_generated_pod_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_replication_controller_controller.go | 8 ++------ ...nerated_replication_controller_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_resource_quota_controller.go | 8 ++------ .../zz_generated_resource_quota_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_secret_controller.go | 8 ++------ apis/core/v1/zz_generated_secret_lifecycle_adapter.go | 10 ++++++++++ .../core/v1/zz_generated_service_account_controller.go | 8 ++------ .../zz_generated_service_account_lifecycle_adapter.go | 10 ++++++++++ apis/core/v1/zz_generated_service_controller.go | 8 ++------ apis/core/v1/zz_generated_service_lifecycle_adapter.go | 10 ++++++++++ .../v1beta1/zz_generated_ingress_controller.go | 8 ++------ .../v1beta1/zz_generated_ingress_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_pod_security_policy_controller.go | 8 ++------ ..._generated_pod_security_policy_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_auth_config_controller.go | 8 ++------ .../v3/zz_generated_auth_config_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_catalog_controller.go | 8 ++------ .../v3/zz_generated_catalog_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_cluster_alert_controller.go | 8 ++------ .../v3/zz_generated_cluster_alert_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_cluster_catalog_controller.go | 8 ++------ .../zz_generated_cluster_catalog_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_cluster_controller.go | 8 ++------ .../v3/zz_generated_cluster_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_cluster_logging_controller.go | 8 ++------ .../zz_generated_cluster_logging_lifecycle_adapter.go | 10 ++++++++++ ..._generated_cluster_registration_token_controller.go | 8 ++------ ...ted_cluster_registration_token_lifecycle_adapter.go | 10 ++++++++++ ...nerated_cluster_role_template_binding_controller.go | 8 ++------ ..._cluster_role_template_binding_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_compose_config_controller.go | 8 ++------ .../zz_generated_compose_config_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_dynamic_schema_controller.go | 8 ++------ .../zz_generated_dynamic_schema_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_global_role_binding_controller.go | 8 ++------ ..._generated_global_role_binding_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_global_role_controller.go | 8 ++------ .../v3/zz_generated_global_role_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_group_controller.go | 8 ++------ .../v3/zz_generated_group_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_group_member_controller.go | 8 ++------ .../v3/zz_generated_group_member_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_ldap_config_controller.go | 8 ++------ .../v3/zz_generated_ldap_config_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_listen_config_controller.go | 8 ++------ .../v3/zz_generated_listen_config_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_node_controller.go | 8 ++------ .../v3/zz_generated_node_driver_controller.go | 8 ++------ .../v3/zz_generated_node_driver_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_node_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_node_pool_controller.go | 8 ++------ .../v3/zz_generated_node_pool_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_node_template_controller.go | 8 ++------ .../v3/zz_generated_node_template_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_notifier_controller.go | 8 ++------ .../v3/zz_generated_notifier_lifecycle_adapter.go | 10 ++++++++++ ...enerated_pod_security_policy_template_controller.go | 8 ++------ ...d_pod_security_policy_template_lifecycle_adapter.go | 10 ++++++++++ ...urity_policy_template_project_binding_controller.go | 8 ++------ ...olicy_template_project_binding_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_preference_controller.go | 8 ++------ .../v3/zz_generated_preference_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_principal_controller.go | 8 ++------ .../v3/zz_generated_principal_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_project_alert_controller.go | 8 ++------ .../v3/zz_generated_project_alert_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_project_catalog_controller.go | 8 ++------ .../zz_generated_project_catalog_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_project_controller.go | 8 ++------ .../v3/zz_generated_project_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_project_logging_controller.go | 8 ++------ .../zz_generated_project_logging_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_project_network_policy_controller.go | 8 ++------ ...nerated_project_network_policy_lifecycle_adapter.go | 10 ++++++++++ ...nerated_project_role_template_binding_controller.go | 8 ++------ ..._project_role_template_binding_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_role_template_controller.go | 8 ++------ .../v3/zz_generated_role_template_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_setting_controller.go | 8 ++------ .../v3/zz_generated_setting_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_template_content_controller.go | 8 ++------ .../zz_generated_template_content_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_template_controller.go | 8 ++------ .../v3/zz_generated_template_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_template_version_controller.go | 8 ++------ .../zz_generated_template_version_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_token_controller.go | 8 ++------ .../v3/zz_generated_token_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_user_attribute_controller.go | 8 ++------ .../zz_generated_user_attribute_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_user_controller.go | 8 ++------ .../v3/zz_generated_user_lifecycle_adapter.go | 10 ++++++++++ .../v3public/zz_generated_auth_provider_controller.go | 8 ++------ .../zz_generated_auth_provider_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_network_policy_controller.go | 8 ++------ .../zz_generated_network_policy_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_app_controller.go | 8 ++------ .../v3/zz_generated_app_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_app_revision_controller.go | 8 ++------ .../v3/zz_generated_app_revision_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_basic_auth_controller.go | 8 ++------ .../v3/zz_generated_basic_auth_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_certificate_controller.go | 8 ++------ .../v3/zz_generated_certificate_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_docker_credential_controller.go | 8 ++------ ...zz_generated_docker_credential_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_namespaced_basic_auth_controller.go | 8 ++------ ...enerated_namespaced_basic_auth_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_namespaced_certificate_controller.go | 8 ++------ ...nerated_namespaced_certificate_lifecycle_adapter.go | 10 ++++++++++ ...enerated_namespaced_docker_credential_controller.go | 8 ++------ ...d_namespaced_docker_credential_lifecycle_adapter.go | 10 ++++++++++ ...ated_namespaced_service_account_token_controller.go | 8 ++------ ...mespaced_service_account_token_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_namespaced_ssh_auth_controller.go | 8 ++------ ..._generated_namespaced_ssh_auth_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_pipeline_controller.go | 8 ++------ .../v3/zz_generated_pipeline_execution_controller.go | 8 ++------ ...z_generated_pipeline_execution_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_pipeline_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_pipeline_setting_controller.go | 8 ++------ .../zz_generated_pipeline_setting_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_service_account_token_controller.go | 8 ++------ ...enerated_service_account_token_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_source_code_credential_controller.go | 8 ++------ ...nerated_source_code_credential_lifecycle_adapter.go | 10 ++++++++++ ...generated_source_code_provider_config_controller.go | 8 ++------ ...ed_source_code_provider_config_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_source_code_provider_controller.go | 8 ++------ ...generated_source_code_provider_lifecycle_adapter.go | 10 ++++++++++ .../zz_generated_source_code_repository_controller.go | 8 ++------ ...nerated_source_code_repository_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_ssh_auth_controller.go | 8 ++------ .../v3/zz_generated_ssh_auth_lifecycle_adapter.go | 10 ++++++++++ .../v3/zz_generated_workload_controller.go | 8 ++------ .../v3/zz_generated_workload_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_cluster_role_binding_controller.go | 8 ++------ ...generated_cluster_role_binding_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_cluster_role_controller.go | 8 ++------ .../v1/zz_generated_cluster_role_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_role_binding_controller.go | 8 ++------ .../v1/zz_generated_role_binding_lifecycle_adapter.go | 10 ++++++++++ .../v1/zz_generated_role_controller.go | 8 ++------ .../v1/zz_generated_role_lifecycle_adapter.go | 10 ++++++++++ 172 files changed, 1032 insertions(+), 516 deletions(-) diff --git a/apis/apps/v1beta2/zz_generated_daemon_set_controller.go b/apis/apps/v1beta2/zz_generated_daemon_set_controller.go index 258333ba..9fc6c67e 100644 --- a/apis/apps/v1beta2/zz_generated_daemon_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_daemon_set_controller.go @@ -343,12 +343,12 @@ func (n *daemonSetClient2) Cache() DaemonSetClientCache { func (n *daemonSetClient2) OnCreate(ctx context.Context, name string, sync DaemonSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &daemonSetLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &daemonSetLifecycleDelegate{create: sync}) } func (n *daemonSetClient2) OnChange(ctx context.Context, name string, sync DaemonSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &daemonSetLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &daemonSetLifecycleDelegate{update: sync}) } func (n *daemonSetClient2) OnRemove(ctx context.Context, name string, sync DaemonSetChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *daemonSetLifecycleDelegate) Remove(obj *v1beta2.DaemonSet) (runtime.Obj return n.remove(obj) } -func (n *daemonSetLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *daemonSetLifecycleDelegate) Updated(obj *v1beta2.DaemonSet) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/apps/v1beta2/zz_generated_daemon_set_lifecycle_adapter.go b/apis/apps/v1beta2/zz_generated_daemon_set_lifecycle_adapter.go index a2997672..38523994 100644 --- a/apis/apps/v1beta2/zz_generated_daemon_set_lifecycle_adapter.go +++ b/apis/apps/v1beta2/zz_generated_daemon_set_lifecycle_adapter.go @@ -16,6 +16,16 @@ type daemonSetLifecycleAdapter struct { lifecycle DaemonSetLifecycle } +func (w *daemonSetLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *daemonSetLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *daemonSetLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta2.DaemonSet)) if o == nil { diff --git a/apis/apps/v1beta2/zz_generated_deployment_controller.go b/apis/apps/v1beta2/zz_generated_deployment_controller.go index 17bf1f9d..251d3fff 100644 --- a/apis/apps/v1beta2/zz_generated_deployment_controller.go +++ b/apis/apps/v1beta2/zz_generated_deployment_controller.go @@ -343,12 +343,12 @@ func (n *deploymentClient2) Cache() DeploymentClientCache { func (n *deploymentClient2) OnCreate(ctx context.Context, name string, sync DeploymentChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &deploymentLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &deploymentLifecycleDelegate{create: sync}) } func (n *deploymentClient2) OnChange(ctx context.Context, name string, sync DeploymentChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &deploymentLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &deploymentLifecycleDelegate{update: sync}) } func (n *deploymentClient2) OnRemove(ctx context.Context, name string, sync DeploymentChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *deploymentLifecycleDelegate) Remove(obj *v1beta2.Deployment) (runtime.O return n.remove(obj) } -func (n *deploymentLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *deploymentLifecycleDelegate) Updated(obj *v1beta2.Deployment) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/apps/v1beta2/zz_generated_deployment_lifecycle_adapter.go b/apis/apps/v1beta2/zz_generated_deployment_lifecycle_adapter.go index 986a1e81..53e353d1 100644 --- a/apis/apps/v1beta2/zz_generated_deployment_lifecycle_adapter.go +++ b/apis/apps/v1beta2/zz_generated_deployment_lifecycle_adapter.go @@ -16,6 +16,16 @@ type deploymentLifecycleAdapter struct { lifecycle DeploymentLifecycle } +func (w *deploymentLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *deploymentLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *deploymentLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta2.Deployment)) if o == nil { diff --git a/apis/apps/v1beta2/zz_generated_replica_set_controller.go b/apis/apps/v1beta2/zz_generated_replica_set_controller.go index 33a651e5..345c1553 100644 --- a/apis/apps/v1beta2/zz_generated_replica_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_replica_set_controller.go @@ -343,12 +343,12 @@ func (n *replicaSetClient2) Cache() ReplicaSetClientCache { func (n *replicaSetClient2) OnCreate(ctx context.Context, name string, sync ReplicaSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &replicaSetLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &replicaSetLifecycleDelegate{create: sync}) } func (n *replicaSetClient2) OnChange(ctx context.Context, name string, sync ReplicaSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &replicaSetLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &replicaSetLifecycleDelegate{update: sync}) } func (n *replicaSetClient2) OnRemove(ctx context.Context, name string, sync ReplicaSetChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *replicaSetLifecycleDelegate) Remove(obj *v1beta2.ReplicaSet) (runtime.O return n.remove(obj) } -func (n *replicaSetLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *replicaSetLifecycleDelegate) Updated(obj *v1beta2.ReplicaSet) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/apps/v1beta2/zz_generated_replica_set_lifecycle_adapter.go b/apis/apps/v1beta2/zz_generated_replica_set_lifecycle_adapter.go index e12fd4db..70293d5b 100644 --- a/apis/apps/v1beta2/zz_generated_replica_set_lifecycle_adapter.go +++ b/apis/apps/v1beta2/zz_generated_replica_set_lifecycle_adapter.go @@ -16,6 +16,16 @@ type replicaSetLifecycleAdapter struct { lifecycle ReplicaSetLifecycle } +func (w *replicaSetLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *replicaSetLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *replicaSetLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta2.ReplicaSet)) if o == nil { diff --git a/apis/apps/v1beta2/zz_generated_stateful_set_controller.go b/apis/apps/v1beta2/zz_generated_stateful_set_controller.go index a368bba2..e240cc62 100644 --- a/apis/apps/v1beta2/zz_generated_stateful_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_stateful_set_controller.go @@ -343,12 +343,12 @@ func (n *statefulSetClient2) Cache() StatefulSetClientCache { func (n *statefulSetClient2) OnCreate(ctx context.Context, name string, sync StatefulSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &statefulSetLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &statefulSetLifecycleDelegate{create: sync}) } func (n *statefulSetClient2) OnChange(ctx context.Context, name string, sync StatefulSetChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &statefulSetLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &statefulSetLifecycleDelegate{update: sync}) } func (n *statefulSetClient2) OnRemove(ctx context.Context, name string, sync StatefulSetChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *statefulSetLifecycleDelegate) Remove(obj *v1beta2.StatefulSet) (runtime return n.remove(obj) } -func (n *statefulSetLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *statefulSetLifecycleDelegate) Updated(obj *v1beta2.StatefulSet) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/apps/v1beta2/zz_generated_stateful_set_lifecycle_adapter.go b/apis/apps/v1beta2/zz_generated_stateful_set_lifecycle_adapter.go index 170b3cb1..65ddd46b 100644 --- a/apis/apps/v1beta2/zz_generated_stateful_set_lifecycle_adapter.go +++ b/apis/apps/v1beta2/zz_generated_stateful_set_lifecycle_adapter.go @@ -16,6 +16,16 @@ type statefulSetLifecycleAdapter struct { lifecycle StatefulSetLifecycle } +func (w *statefulSetLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *statefulSetLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *statefulSetLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta2.StatefulSet)) if o == nil { diff --git a/apis/batch/v1/zz_generated_job_controller.go b/apis/batch/v1/zz_generated_job_controller.go index 312d783b..43a4edf6 100644 --- a/apis/batch/v1/zz_generated_job_controller.go +++ b/apis/batch/v1/zz_generated_job_controller.go @@ -343,12 +343,12 @@ func (n *jobClient2) Cache() JobClientCache { func (n *jobClient2) OnCreate(ctx context.Context, name string, sync JobChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &jobLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &jobLifecycleDelegate{create: sync}) } func (n *jobClient2) OnChange(ctx context.Context, name string, sync JobChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &jobLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &jobLifecycleDelegate{update: sync}) } func (n *jobClient2) OnRemove(ctx context.Context, name string, sync JobChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *jobLifecycleDelegate) Remove(obj *v1.Job) (runtime.Object, error) { return n.remove(obj) } -func (n *jobLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *jobLifecycleDelegate) Updated(obj *v1.Job) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/batch/v1/zz_generated_job_lifecycle_adapter.go b/apis/batch/v1/zz_generated_job_lifecycle_adapter.go index 95e96c93..aeba79f2 100644 --- a/apis/batch/v1/zz_generated_job_lifecycle_adapter.go +++ b/apis/batch/v1/zz_generated_job_lifecycle_adapter.go @@ -16,6 +16,16 @@ type jobLifecycleAdapter struct { lifecycle JobLifecycle } +func (w *jobLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *jobLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *jobLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Job)) if o == nil { diff --git a/apis/batch/v1beta1/zz_generated_cron_job_controller.go b/apis/batch/v1beta1/zz_generated_cron_job_controller.go index bcc2683d..45ecc146 100644 --- a/apis/batch/v1beta1/zz_generated_cron_job_controller.go +++ b/apis/batch/v1beta1/zz_generated_cron_job_controller.go @@ -343,12 +343,12 @@ func (n *cronJobClient2) Cache() CronJobClientCache { func (n *cronJobClient2) OnCreate(ctx context.Context, name string, sync CronJobChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &cronJobLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &cronJobLifecycleDelegate{create: sync}) } func (n *cronJobClient2) OnChange(ctx context.Context, name string, sync CronJobChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &cronJobLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &cronJobLifecycleDelegate{update: sync}) } func (n *cronJobClient2) OnRemove(ctx context.Context, name string, sync CronJobChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *cronJobLifecycleDelegate) Remove(obj *v1beta1.CronJob) (runtime.Object, return n.remove(obj) } -func (n *cronJobLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *cronJobLifecycleDelegate) Updated(obj *v1beta1.CronJob) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/batch/v1beta1/zz_generated_cron_job_lifecycle_adapter.go b/apis/batch/v1beta1/zz_generated_cron_job_lifecycle_adapter.go index f91e7ee2..65968e0f 100644 --- a/apis/batch/v1beta1/zz_generated_cron_job_lifecycle_adapter.go +++ b/apis/batch/v1beta1/zz_generated_cron_job_lifecycle_adapter.go @@ -16,6 +16,16 @@ type cronJobLifecycleAdapter struct { lifecycle CronJobLifecycle } +func (w *cronJobLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *cronJobLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *cronJobLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta1.CronJob)) if o == nil { diff --git a/apis/core/v1/zz_generated_component_status_controller.go b/apis/core/v1/zz_generated_component_status_controller.go index c97c9b17..7b760478 100644 --- a/apis/core/v1/zz_generated_component_status_controller.go +++ b/apis/core/v1/zz_generated_component_status_controller.go @@ -342,12 +342,12 @@ func (n *componentStatusClient2) Cache() ComponentStatusClientCache { func (n *componentStatusClient2) OnCreate(ctx context.Context, name string, sync ComponentStatusChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &componentStatusLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &componentStatusLifecycleDelegate{create: sync}) } func (n *componentStatusClient2) OnChange(ctx context.Context, name string, sync ComponentStatusChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &componentStatusLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &componentStatusLifecycleDelegate{update: sync}) } func (n *componentStatusClient2) OnRemove(ctx context.Context, name string, sync ComponentStatusChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *componentStatusLifecycleDelegate) Remove(obj *v1.ComponentStatus) (runt return n.remove(obj) } -func (n *componentStatusLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *componentStatusLifecycleDelegate) Updated(obj *v1.ComponentStatus) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_component_status_lifecycle_adapter.go b/apis/core/v1/zz_generated_component_status_lifecycle_adapter.go index 27aa6613..d7b82aa6 100644 --- a/apis/core/v1/zz_generated_component_status_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_component_status_lifecycle_adapter.go @@ -16,6 +16,16 @@ type componentStatusLifecycleAdapter struct { lifecycle ComponentStatusLifecycle } +func (w *componentStatusLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *componentStatusLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *componentStatusLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ComponentStatus)) if o == nil { diff --git a/apis/core/v1/zz_generated_config_map_controller.go b/apis/core/v1/zz_generated_config_map_controller.go index 94157ac3..71be49dd 100644 --- a/apis/core/v1/zz_generated_config_map_controller.go +++ b/apis/core/v1/zz_generated_config_map_controller.go @@ -343,12 +343,12 @@ func (n *configMapClient2) Cache() ConfigMapClientCache { func (n *configMapClient2) OnCreate(ctx context.Context, name string, sync ConfigMapChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &configMapLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &configMapLifecycleDelegate{create: sync}) } func (n *configMapClient2) OnChange(ctx context.Context, name string, sync ConfigMapChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &configMapLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &configMapLifecycleDelegate{update: sync}) } func (n *configMapClient2) OnRemove(ctx context.Context, name string, sync ConfigMapChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *configMapLifecycleDelegate) Remove(obj *v1.ConfigMap) (runtime.Object, return n.remove(obj) } -func (n *configMapLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *configMapLifecycleDelegate) Updated(obj *v1.ConfigMap) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_config_map_lifecycle_adapter.go b/apis/core/v1/zz_generated_config_map_lifecycle_adapter.go index 4a4a8d57..2b46adf9 100644 --- a/apis/core/v1/zz_generated_config_map_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_config_map_lifecycle_adapter.go @@ -16,6 +16,16 @@ type configMapLifecycleAdapter struct { lifecycle ConfigMapLifecycle } +func (w *configMapLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *configMapLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *configMapLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ConfigMap)) if o == nil { diff --git a/apis/core/v1/zz_generated_endpoints_controller.go b/apis/core/v1/zz_generated_endpoints_controller.go index 0bbe347e..4ceceb35 100644 --- a/apis/core/v1/zz_generated_endpoints_controller.go +++ b/apis/core/v1/zz_generated_endpoints_controller.go @@ -343,12 +343,12 @@ func (n *endpointsClient2) Cache() EndpointsClientCache { func (n *endpointsClient2) OnCreate(ctx context.Context, name string, sync EndpointsChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &endpointsLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &endpointsLifecycleDelegate{create: sync}) } func (n *endpointsClient2) OnChange(ctx context.Context, name string, sync EndpointsChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &endpointsLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &endpointsLifecycleDelegate{update: sync}) } func (n *endpointsClient2) OnRemove(ctx context.Context, name string, sync EndpointsChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *endpointsLifecycleDelegate) Remove(obj *v1.Endpoints) (runtime.Object, return n.remove(obj) } -func (n *endpointsLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *endpointsLifecycleDelegate) Updated(obj *v1.Endpoints) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_endpoints_lifecycle_adapter.go b/apis/core/v1/zz_generated_endpoints_lifecycle_adapter.go index 6b9aac8a..9684bfa2 100644 --- a/apis/core/v1/zz_generated_endpoints_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_endpoints_lifecycle_adapter.go @@ -16,6 +16,16 @@ type endpointsLifecycleAdapter struct { lifecycle EndpointsLifecycle } +func (w *endpointsLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *endpointsLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *endpointsLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Endpoints)) if o == nil { diff --git a/apis/core/v1/zz_generated_event_controller.go b/apis/core/v1/zz_generated_event_controller.go index eb59c749..69b4fd83 100644 --- a/apis/core/v1/zz_generated_event_controller.go +++ b/apis/core/v1/zz_generated_event_controller.go @@ -342,12 +342,12 @@ func (n *eventClient2) Cache() EventClientCache { func (n *eventClient2) OnCreate(ctx context.Context, name string, sync EventChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &eventLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &eventLifecycleDelegate{create: sync}) } func (n *eventClient2) OnChange(ctx context.Context, name string, sync EventChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &eventLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &eventLifecycleDelegate{update: sync}) } func (n *eventClient2) OnRemove(ctx context.Context, name string, sync EventChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *eventLifecycleDelegate) Remove(obj *v1.Event) (runtime.Object, error) { return n.remove(obj) } -func (n *eventLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *eventLifecycleDelegate) Updated(obj *v1.Event) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_event_lifecycle_adapter.go b/apis/core/v1/zz_generated_event_lifecycle_adapter.go index 1e7afa42..6ceda526 100644 --- a/apis/core/v1/zz_generated_event_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_event_lifecycle_adapter.go @@ -16,6 +16,16 @@ type eventLifecycleAdapter struct { lifecycle EventLifecycle } +func (w *eventLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *eventLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *eventLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Event)) if o == nil { diff --git a/apis/core/v1/zz_generated_namespace_controller.go b/apis/core/v1/zz_generated_namespace_controller.go index 7ca011c9..d3fbc712 100644 --- a/apis/core/v1/zz_generated_namespace_controller.go +++ b/apis/core/v1/zz_generated_namespace_controller.go @@ -342,12 +342,12 @@ func (n *namespaceClient2) Cache() NamespaceClientCache { func (n *namespaceClient2) OnCreate(ctx context.Context, name string, sync NamespaceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespaceLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespaceLifecycleDelegate{create: sync}) } func (n *namespaceClient2) OnChange(ctx context.Context, name string, sync NamespaceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespaceLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespaceLifecycleDelegate{update: sync}) } func (n *namespaceClient2) OnRemove(ctx context.Context, name string, sync NamespaceChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespaceLifecycleDelegate) Remove(obj *v1.Namespace) (runtime.Object, return n.remove(obj) } -func (n *namespaceLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespaceLifecycleDelegate) Updated(obj *v1.Namespace) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_namespace_lifecycle_adapter.go b/apis/core/v1/zz_generated_namespace_lifecycle_adapter.go index bafcee14..32e73829 100644 --- a/apis/core/v1/zz_generated_namespace_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_namespace_lifecycle_adapter.go @@ -16,6 +16,16 @@ type namespaceLifecycleAdapter struct { lifecycle NamespaceLifecycle } +func (w *namespaceLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespaceLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespaceLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Namespace)) if o == nil { diff --git a/apis/core/v1/zz_generated_node_controller.go b/apis/core/v1/zz_generated_node_controller.go index 38935621..c3e4022c 100644 --- a/apis/core/v1/zz_generated_node_controller.go +++ b/apis/core/v1/zz_generated_node_controller.go @@ -342,12 +342,12 @@ func (n *nodeClient2) Cache() NodeClientCache { func (n *nodeClient2) OnCreate(ctx context.Context, name string, sync NodeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &nodeLifecycleDelegate{create: sync}) } func (n *nodeClient2) OnChange(ctx context.Context, name string, sync NodeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &nodeLifecycleDelegate{update: sync}) } func (n *nodeClient2) OnRemove(ctx context.Context, name string, sync NodeChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *nodeLifecycleDelegate) Remove(obj *v1.Node) (runtime.Object, error) { return n.remove(obj) } -func (n *nodeLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *nodeLifecycleDelegate) Updated(obj *v1.Node) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_node_lifecycle_adapter.go b/apis/core/v1/zz_generated_node_lifecycle_adapter.go index 64344171..7b9488ce 100644 --- a/apis/core/v1/zz_generated_node_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_node_lifecycle_adapter.go @@ -16,6 +16,16 @@ type nodeLifecycleAdapter struct { lifecycle NodeLifecycle } +func (w *nodeLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *nodeLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *nodeLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Node)) if o == nil { diff --git a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go index 6e2d1568..6f3e7fe9 100644 --- a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go +++ b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go @@ -343,12 +343,12 @@ func (n *persistentVolumeClaimClient2) Cache() PersistentVolumeClaimClientCache func (n *persistentVolumeClaimClient2) OnCreate(ctx context.Context, name string, sync PersistentVolumeClaimChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &persistentVolumeClaimLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &persistentVolumeClaimLifecycleDelegate{create: sync}) } func (n *persistentVolumeClaimClient2) OnChange(ctx context.Context, name string, sync PersistentVolumeClaimChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &persistentVolumeClaimLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &persistentVolumeClaimLifecycleDelegate{update: sync}) } func (n *persistentVolumeClaimClient2) OnRemove(ctx context.Context, name string, sync PersistentVolumeClaimChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *persistentVolumeClaimLifecycleDelegate) Remove(obj *v1.PersistentVolume return n.remove(obj) } -func (n *persistentVolumeClaimLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *persistentVolumeClaimLifecycleDelegate) Updated(obj *v1.PersistentVolumeClaim) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_persistent_volume_claim_lifecycle_adapter.go b/apis/core/v1/zz_generated_persistent_volume_claim_lifecycle_adapter.go index ef705cef..7b33354f 100644 --- a/apis/core/v1/zz_generated_persistent_volume_claim_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_persistent_volume_claim_lifecycle_adapter.go @@ -16,6 +16,16 @@ type persistentVolumeClaimLifecycleAdapter struct { lifecycle PersistentVolumeClaimLifecycle } +func (w *persistentVolumeClaimLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *persistentVolumeClaimLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *persistentVolumeClaimLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.PersistentVolumeClaim)) if o == nil { diff --git a/apis/core/v1/zz_generated_pod_controller.go b/apis/core/v1/zz_generated_pod_controller.go index b3cedf6f..b6fa083a 100644 --- a/apis/core/v1/zz_generated_pod_controller.go +++ b/apis/core/v1/zz_generated_pod_controller.go @@ -343,12 +343,12 @@ func (n *podClient2) Cache() PodClientCache { func (n *podClient2) OnCreate(ctx context.Context, name string, sync PodChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &podLifecycleDelegate{create: sync}) } func (n *podClient2) OnChange(ctx context.Context, name string, sync PodChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &podLifecycleDelegate{update: sync}) } func (n *podClient2) OnRemove(ctx context.Context, name string, sync PodChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *podLifecycleDelegate) Remove(obj *v1.Pod) (runtime.Object, error) { return n.remove(obj) } -func (n *podLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *podLifecycleDelegate) Updated(obj *v1.Pod) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_pod_lifecycle_adapter.go b/apis/core/v1/zz_generated_pod_lifecycle_adapter.go index 726f17c3..6b2f8475 100644 --- a/apis/core/v1/zz_generated_pod_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_pod_lifecycle_adapter.go @@ -16,6 +16,16 @@ type podLifecycleAdapter struct { lifecycle PodLifecycle } +func (w *podLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *podLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *podLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Pod)) if o == nil { diff --git a/apis/core/v1/zz_generated_replication_controller_controller.go b/apis/core/v1/zz_generated_replication_controller_controller.go index 71c0f1ca..1081745c 100644 --- a/apis/core/v1/zz_generated_replication_controller_controller.go +++ b/apis/core/v1/zz_generated_replication_controller_controller.go @@ -343,12 +343,12 @@ func (n *replicationControllerClient2) Cache() ReplicationControllerClientCache func (n *replicationControllerClient2) OnCreate(ctx context.Context, name string, sync ReplicationControllerChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &replicationControllerLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &replicationControllerLifecycleDelegate{create: sync}) } func (n *replicationControllerClient2) OnChange(ctx context.Context, name string, sync ReplicationControllerChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &replicationControllerLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &replicationControllerLifecycleDelegate{update: sync}) } func (n *replicationControllerClient2) OnRemove(ctx context.Context, name string, sync ReplicationControllerChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *replicationControllerLifecycleDelegate) Remove(obj *v1.ReplicationContr return n.remove(obj) } -func (n *replicationControllerLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *replicationControllerLifecycleDelegate) Updated(obj *v1.ReplicationController) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_replication_controller_lifecycle_adapter.go b/apis/core/v1/zz_generated_replication_controller_lifecycle_adapter.go index 3be8dac3..3cf986f6 100644 --- a/apis/core/v1/zz_generated_replication_controller_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_replication_controller_lifecycle_adapter.go @@ -16,6 +16,16 @@ type replicationControllerLifecycleAdapter struct { lifecycle ReplicationControllerLifecycle } +func (w *replicationControllerLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *replicationControllerLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *replicationControllerLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ReplicationController)) if o == nil { diff --git a/apis/core/v1/zz_generated_resource_quota_controller.go b/apis/core/v1/zz_generated_resource_quota_controller.go index 1c6a00ae..2ab241af 100644 --- a/apis/core/v1/zz_generated_resource_quota_controller.go +++ b/apis/core/v1/zz_generated_resource_quota_controller.go @@ -343,12 +343,12 @@ func (n *resourceQuotaClient2) Cache() ResourceQuotaClientCache { func (n *resourceQuotaClient2) OnCreate(ctx context.Context, name string, sync ResourceQuotaChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &resourceQuotaLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &resourceQuotaLifecycleDelegate{create: sync}) } func (n *resourceQuotaClient2) OnChange(ctx context.Context, name string, sync ResourceQuotaChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &resourceQuotaLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &resourceQuotaLifecycleDelegate{update: sync}) } func (n *resourceQuotaClient2) OnRemove(ctx context.Context, name string, sync ResourceQuotaChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *resourceQuotaLifecycleDelegate) Remove(obj *v1.ResourceQuota) (runtime. return n.remove(obj) } -func (n *resourceQuotaLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *resourceQuotaLifecycleDelegate) Updated(obj *v1.ResourceQuota) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_resource_quota_lifecycle_adapter.go b/apis/core/v1/zz_generated_resource_quota_lifecycle_adapter.go index 6e6eb269..350aa20d 100644 --- a/apis/core/v1/zz_generated_resource_quota_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_resource_quota_lifecycle_adapter.go @@ -16,6 +16,16 @@ type resourceQuotaLifecycleAdapter struct { lifecycle ResourceQuotaLifecycle } +func (w *resourceQuotaLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *resourceQuotaLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *resourceQuotaLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ResourceQuota)) if o == nil { diff --git a/apis/core/v1/zz_generated_secret_controller.go b/apis/core/v1/zz_generated_secret_controller.go index b5954d3e..6ed18b95 100644 --- a/apis/core/v1/zz_generated_secret_controller.go +++ b/apis/core/v1/zz_generated_secret_controller.go @@ -343,12 +343,12 @@ func (n *secretClient2) Cache() SecretClientCache { func (n *secretClient2) OnCreate(ctx context.Context, name string, sync SecretChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &secretLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &secretLifecycleDelegate{create: sync}) } func (n *secretClient2) OnChange(ctx context.Context, name string, sync SecretChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &secretLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &secretLifecycleDelegate{update: sync}) } func (n *secretClient2) OnRemove(ctx context.Context, name string, sync SecretChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *secretLifecycleDelegate) Remove(obj *v1.Secret) (runtime.Object, error) return n.remove(obj) } -func (n *secretLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *secretLifecycleDelegate) Updated(obj *v1.Secret) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_secret_lifecycle_adapter.go b/apis/core/v1/zz_generated_secret_lifecycle_adapter.go index 20cb6d8f..5233fdbc 100644 --- a/apis/core/v1/zz_generated_secret_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_secret_lifecycle_adapter.go @@ -16,6 +16,16 @@ type secretLifecycleAdapter struct { lifecycle SecretLifecycle } +func (w *secretLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *secretLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *secretLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Secret)) if o == nil { diff --git a/apis/core/v1/zz_generated_service_account_controller.go b/apis/core/v1/zz_generated_service_account_controller.go index d8d3d14e..2dfbcd07 100644 --- a/apis/core/v1/zz_generated_service_account_controller.go +++ b/apis/core/v1/zz_generated_service_account_controller.go @@ -343,12 +343,12 @@ func (n *serviceAccountClient2) Cache() ServiceAccountClientCache { func (n *serviceAccountClient2) OnCreate(ctx context.Context, name string, sync ServiceAccountChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceAccountLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &serviceAccountLifecycleDelegate{create: sync}) } func (n *serviceAccountClient2) OnChange(ctx context.Context, name string, sync ServiceAccountChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceAccountLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &serviceAccountLifecycleDelegate{update: sync}) } func (n *serviceAccountClient2) OnRemove(ctx context.Context, name string, sync ServiceAccountChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *serviceAccountLifecycleDelegate) Remove(obj *v1.ServiceAccount) (runtim return n.remove(obj) } -func (n *serviceAccountLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *serviceAccountLifecycleDelegate) Updated(obj *v1.ServiceAccount) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_service_account_lifecycle_adapter.go b/apis/core/v1/zz_generated_service_account_lifecycle_adapter.go index 20778d96..0be5f4be 100644 --- a/apis/core/v1/zz_generated_service_account_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_service_account_lifecycle_adapter.go @@ -16,6 +16,16 @@ type serviceAccountLifecycleAdapter struct { lifecycle ServiceAccountLifecycle } +func (w *serviceAccountLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *serviceAccountLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *serviceAccountLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ServiceAccount)) if o == nil { diff --git a/apis/core/v1/zz_generated_service_controller.go b/apis/core/v1/zz_generated_service_controller.go index ba67878b..cb7279f4 100644 --- a/apis/core/v1/zz_generated_service_controller.go +++ b/apis/core/v1/zz_generated_service_controller.go @@ -343,12 +343,12 @@ func (n *serviceClient2) Cache() ServiceClientCache { func (n *serviceClient2) OnCreate(ctx context.Context, name string, sync ServiceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &serviceLifecycleDelegate{create: sync}) } func (n *serviceClient2) OnChange(ctx context.Context, name string, sync ServiceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &serviceLifecycleDelegate{update: sync}) } func (n *serviceClient2) OnRemove(ctx context.Context, name string, sync ServiceChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *serviceLifecycleDelegate) Remove(obj *v1.Service) (runtime.Object, erro return n.remove(obj) } -func (n *serviceLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *serviceLifecycleDelegate) Updated(obj *v1.Service) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/core/v1/zz_generated_service_lifecycle_adapter.go b/apis/core/v1/zz_generated_service_lifecycle_adapter.go index dffe4833..8f8152a1 100644 --- a/apis/core/v1/zz_generated_service_lifecycle_adapter.go +++ b/apis/core/v1/zz_generated_service_lifecycle_adapter.go @@ -16,6 +16,16 @@ type serviceLifecycleAdapter struct { lifecycle ServiceLifecycle } +func (w *serviceLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *serviceLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *serviceLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Service)) if o == nil { diff --git a/apis/extensions/v1beta1/zz_generated_ingress_controller.go b/apis/extensions/v1beta1/zz_generated_ingress_controller.go index 108bcd04..2a6bb590 100644 --- a/apis/extensions/v1beta1/zz_generated_ingress_controller.go +++ b/apis/extensions/v1beta1/zz_generated_ingress_controller.go @@ -343,12 +343,12 @@ func (n *ingressClient2) Cache() IngressClientCache { func (n *ingressClient2) OnCreate(ctx context.Context, name string, sync IngressChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &ingressLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &ingressLifecycleDelegate{create: sync}) } func (n *ingressClient2) OnChange(ctx context.Context, name string, sync IngressChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &ingressLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &ingressLifecycleDelegate{update: sync}) } func (n *ingressClient2) OnRemove(ctx context.Context, name string, sync IngressChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *ingressLifecycleDelegate) Remove(obj *v1beta1.Ingress) (runtime.Object, return n.remove(obj) } -func (n *ingressLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *ingressLifecycleDelegate) Updated(obj *v1beta1.Ingress) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/extensions/v1beta1/zz_generated_ingress_lifecycle_adapter.go b/apis/extensions/v1beta1/zz_generated_ingress_lifecycle_adapter.go index 3a72c1a0..953894c2 100644 --- a/apis/extensions/v1beta1/zz_generated_ingress_lifecycle_adapter.go +++ b/apis/extensions/v1beta1/zz_generated_ingress_lifecycle_adapter.go @@ -16,6 +16,16 @@ type ingressLifecycleAdapter struct { lifecycle IngressLifecycle } +func (w *ingressLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *ingressLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *ingressLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta1.Ingress)) if o == nil { diff --git a/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go b/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go index e75a9141..24a0b43f 100644 --- a/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go +++ b/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go @@ -342,12 +342,12 @@ func (n *podSecurityPolicyClient2) Cache() PodSecurityPolicyClientCache { func (n *podSecurityPolicyClient2) OnCreate(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &podSecurityPolicyLifecycleDelegate{create: sync}) } func (n *podSecurityPolicyClient2) OnChange(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &podSecurityPolicyLifecycleDelegate{update: sync}) } func (n *podSecurityPolicyClient2) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *podSecurityPolicyLifecycleDelegate) Remove(obj *v1beta1.PodSecurityPoli return n.remove(obj) } -func (n *podSecurityPolicyLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *podSecurityPolicyLifecycleDelegate) Updated(obj *v1beta1.PodSecurityPolicy) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/extensions/v1beta1/zz_generated_pod_security_policy_lifecycle_adapter.go b/apis/extensions/v1beta1/zz_generated_pod_security_policy_lifecycle_adapter.go index 503bda8c..7aebebba 100644 --- a/apis/extensions/v1beta1/zz_generated_pod_security_policy_lifecycle_adapter.go +++ b/apis/extensions/v1beta1/zz_generated_pod_security_policy_lifecycle_adapter.go @@ -16,6 +16,16 @@ type podSecurityPolicyLifecycleAdapter struct { lifecycle PodSecurityPolicyLifecycle } +func (w *podSecurityPolicyLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *podSecurityPolicyLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *podSecurityPolicyLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1beta1.PodSecurityPolicy)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go index c69397b2..d776b04c 100644 --- a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go @@ -341,12 +341,12 @@ func (n *authConfigClient2) Cache() AuthConfigClientCache { func (n *authConfigClient2) OnCreate(ctx context.Context, name string, sync AuthConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &authConfigLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &authConfigLifecycleDelegate{create: sync}) } func (n *authConfigClient2) OnChange(ctx context.Context, name string, sync AuthConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &authConfigLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &authConfigLifecycleDelegate{update: sync}) } func (n *authConfigClient2) OnRemove(ctx context.Context, name string, sync AuthConfigChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *authConfigLifecycleDelegate) Remove(obj *AuthConfig) (runtime.Object, e return n.remove(obj) } -func (n *authConfigLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *authConfigLifecycleDelegate) Updated(obj *AuthConfig) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_auth_config_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_auth_config_lifecycle_adapter.go index 67f8b702..13f14ecf 100644 --- a/apis/management.cattle.io/v3/zz_generated_auth_config_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_auth_config_lifecycle_adapter.go @@ -15,6 +15,16 @@ type authConfigLifecycleAdapter struct { lifecycle AuthConfigLifecycle } +func (w *authConfigLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *authConfigLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *authConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*AuthConfig)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go index 47277c8f..819fbe4f 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go @@ -341,12 +341,12 @@ func (n *catalogClient2) Cache() CatalogClientCache { func (n *catalogClient2) OnCreate(ctx context.Context, name string, sync CatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &catalogLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &catalogLifecycleDelegate{create: sync}) } func (n *catalogClient2) OnChange(ctx context.Context, name string, sync CatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &catalogLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &catalogLifecycleDelegate{update: sync}) } func (n *catalogClient2) OnRemove(ctx context.Context, name string, sync CatalogChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *catalogLifecycleDelegate) Remove(obj *Catalog) (runtime.Object, error) return n.remove(obj) } -func (n *catalogLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *catalogLifecycleDelegate) Updated(obj *Catalog) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_catalog_lifecycle_adapter.go index 68b99dea..5123f5fc 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_lifecycle_adapter.go @@ -15,6 +15,16 @@ type catalogLifecycleAdapter struct { lifecycle CatalogLifecycle } +func (w *catalogLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *catalogLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *catalogLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Catalog)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go index a3c8f5c8..840fa44d 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go @@ -342,12 +342,12 @@ func (n *clusterAlertClient2) Cache() ClusterAlertClientCache { func (n *clusterAlertClient2) OnCreate(ctx context.Context, name string, sync ClusterAlertChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterAlertLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterAlertLifecycleDelegate{create: sync}) } func (n *clusterAlertClient2) OnChange(ctx context.Context, name string, sync ClusterAlertChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterAlertLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterAlertLifecycleDelegate{update: sync}) } func (n *clusterAlertClient2) OnRemove(ctx context.Context, name string, sync ClusterAlertChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterAlertLifecycleDelegate) Remove(obj *ClusterAlert) (runtime.Objec return n.remove(obj) } -func (n *clusterAlertLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterAlertLifecycleDelegate) Updated(obj *ClusterAlert) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_lifecycle_adapter.go index b786b527..91f32a09 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterAlertLifecycleAdapter struct { lifecycle ClusterAlertLifecycle } +func (w *clusterAlertLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterAlertLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterAlertLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ClusterAlert)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go index d3d1aa6f..9f2bc5f2 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go @@ -342,12 +342,12 @@ func (n *clusterCatalogClient2) Cache() ClusterCatalogClientCache { func (n *clusterCatalogClient2) OnCreate(ctx context.Context, name string, sync ClusterCatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterCatalogLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterCatalogLifecycleDelegate{create: sync}) } func (n *clusterCatalogClient2) OnChange(ctx context.Context, name string, sync ClusterCatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterCatalogLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterCatalogLifecycleDelegate{update: sync}) } func (n *clusterCatalogClient2) OnRemove(ctx context.Context, name string, sync ClusterCatalogChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterCatalogLifecycleDelegate) Remove(obj *ClusterCatalog) (runtime.O return n.remove(obj) } -func (n *clusterCatalogLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterCatalogLifecycleDelegate) Updated(obj *ClusterCatalog) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_lifecycle_adapter.go index a3389496..03040fac 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterCatalogLifecycleAdapter struct { lifecycle ClusterCatalogLifecycle } +func (w *clusterCatalogLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterCatalogLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterCatalogLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ClusterCatalog)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go index 41a439bf..0ca82dec 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go @@ -341,12 +341,12 @@ func (n *clusterClient2) Cache() ClusterClientCache { func (n *clusterClient2) OnCreate(ctx context.Context, name string, sync ClusterChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterLifecycleDelegate{create: sync}) } func (n *clusterClient2) OnChange(ctx context.Context, name string, sync ClusterChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterLifecycleDelegate{update: sync}) } func (n *clusterClient2) OnRemove(ctx context.Context, name string, sync ClusterChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *clusterLifecycleDelegate) Remove(obj *Cluster) (runtime.Object, error) return n.remove(obj) } -func (n *clusterLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterLifecycleDelegate) Updated(obj *Cluster) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_lifecycle_adapter.go index 38cf5d05..4bb39910 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterLifecycleAdapter struct { lifecycle ClusterLifecycle } +func (w *clusterLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Cluster)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go index 305c65e5..f829be9e 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go @@ -342,12 +342,12 @@ func (n *clusterLoggingClient2) Cache() ClusterLoggingClientCache { func (n *clusterLoggingClient2) OnCreate(ctx context.Context, name string, sync ClusterLoggingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterLoggingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterLoggingLifecycleDelegate{create: sync}) } func (n *clusterLoggingClient2) OnChange(ctx context.Context, name string, sync ClusterLoggingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterLoggingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterLoggingLifecycleDelegate{update: sync}) } func (n *clusterLoggingClient2) OnRemove(ctx context.Context, name string, sync ClusterLoggingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterLoggingLifecycleDelegate) Remove(obj *ClusterLogging) (runtime.O return n.remove(obj) } -func (n *clusterLoggingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterLoggingLifecycleDelegate) Updated(obj *ClusterLogging) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_logging_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_logging_lifecycle_adapter.go index 658cd73c..0443105f 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_logging_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_logging_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterLoggingLifecycleAdapter struct { lifecycle ClusterLoggingLifecycle } +func (w *clusterLoggingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterLoggingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterLoggingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ClusterLogging)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go index 8acc68b2..b619c0ba 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go @@ -342,12 +342,12 @@ func (n *clusterRegistrationTokenClient2) Cache() ClusterRegistrationTokenClient func (n *clusterRegistrationTokenClient2) OnCreate(ctx context.Context, name string, sync ClusterRegistrationTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRegistrationTokenLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterRegistrationTokenLifecycleDelegate{create: sync}) } func (n *clusterRegistrationTokenClient2) OnChange(ctx context.Context, name string, sync ClusterRegistrationTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRegistrationTokenLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterRegistrationTokenLifecycleDelegate{update: sync}) } func (n *clusterRegistrationTokenClient2) OnRemove(ctx context.Context, name string, sync ClusterRegistrationTokenChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterRegistrationTokenLifecycleDelegate) Remove(obj *ClusterRegistrat return n.remove(obj) } -func (n *clusterRegistrationTokenLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterRegistrationTokenLifecycleDelegate) Updated(obj *ClusterRegistrationToken) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_lifecycle_adapter.go index 149bc294..dceea5d9 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterRegistrationTokenLifecycleAdapter struct { lifecycle ClusterRegistrationTokenLifecycle } +func (w *clusterRegistrationTokenLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterRegistrationTokenLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterRegistrationTokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ClusterRegistrationToken)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go index 485fc1a1..0c0eb49a 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go @@ -342,12 +342,12 @@ func (n *clusterRoleTemplateBindingClient2) Cache() ClusterRoleTemplateBindingCl func (n *clusterRoleTemplateBindingClient2) OnCreate(ctx context.Context, name string, sync ClusterRoleTemplateBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleTemplateBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterRoleTemplateBindingLifecycleDelegate{create: sync}) } func (n *clusterRoleTemplateBindingClient2) OnChange(ctx context.Context, name string, sync ClusterRoleTemplateBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleTemplateBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterRoleTemplateBindingLifecycleDelegate{update: sync}) } func (n *clusterRoleTemplateBindingClient2) OnRemove(ctx context.Context, name string, sync ClusterRoleTemplateBindingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterRoleTemplateBindingLifecycleDelegate) Remove(obj *ClusterRoleTem return n.remove(obj) } -func (n *clusterRoleTemplateBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterRoleTemplateBindingLifecycleDelegate) Updated(obj *ClusterRoleTemplateBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_lifecycle_adapter.go index bd9e27c4..988898cb 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_lifecycle_adapter.go @@ -15,6 +15,16 @@ type clusterRoleTemplateBindingLifecycleAdapter struct { lifecycle ClusterRoleTemplateBindingLifecycle } +func (w *clusterRoleTemplateBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterRoleTemplateBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ClusterRoleTemplateBinding)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go index f1079597..b67c3796 100644 --- a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go @@ -341,12 +341,12 @@ func (n *composeConfigClient2) Cache() ComposeConfigClientCache { func (n *composeConfigClient2) OnCreate(ctx context.Context, name string, sync ComposeConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &composeConfigLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &composeConfigLifecycleDelegate{create: sync}) } func (n *composeConfigClient2) OnChange(ctx context.Context, name string, sync ComposeConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &composeConfigLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &composeConfigLifecycleDelegate{update: sync}) } func (n *composeConfigClient2) OnRemove(ctx context.Context, name string, sync ComposeConfigChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *composeConfigLifecycleDelegate) Remove(obj *ComposeConfig) (runtime.Obj return n.remove(obj) } -func (n *composeConfigLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *composeConfigLifecycleDelegate) Updated(obj *ComposeConfig) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_compose_config_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_compose_config_lifecycle_adapter.go index 47e9ed1f..760b7bb6 100644 --- a/apis/management.cattle.io/v3/zz_generated_compose_config_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_compose_config_lifecycle_adapter.go @@ -15,6 +15,16 @@ type composeConfigLifecycleAdapter struct { lifecycle ComposeConfigLifecycle } +func (w *composeConfigLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *composeConfigLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *composeConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ComposeConfig)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go index c9be4705..9dceac6f 100644 --- a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go @@ -341,12 +341,12 @@ func (n *dynamicSchemaClient2) Cache() DynamicSchemaClientCache { func (n *dynamicSchemaClient2) OnCreate(ctx context.Context, name string, sync DynamicSchemaChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &dynamicSchemaLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &dynamicSchemaLifecycleDelegate{create: sync}) } func (n *dynamicSchemaClient2) OnChange(ctx context.Context, name string, sync DynamicSchemaChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &dynamicSchemaLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &dynamicSchemaLifecycleDelegate{update: sync}) } func (n *dynamicSchemaClient2) OnRemove(ctx context.Context, name string, sync DynamicSchemaChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *dynamicSchemaLifecycleDelegate) Remove(obj *DynamicSchema) (runtime.Obj return n.remove(obj) } -func (n *dynamicSchemaLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *dynamicSchemaLifecycleDelegate) Updated(obj *DynamicSchema) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_lifecycle_adapter.go index 3ecb89bd..e57fd2c6 100644 --- a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_lifecycle_adapter.go @@ -15,6 +15,16 @@ type dynamicSchemaLifecycleAdapter struct { lifecycle DynamicSchemaLifecycle } +func (w *dynamicSchemaLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *dynamicSchemaLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *dynamicSchemaLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*DynamicSchema)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go index 4566e80b..78c990da 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go @@ -341,12 +341,12 @@ func (n *globalRoleBindingClient2) Cache() GlobalRoleBindingClientCache { func (n *globalRoleBindingClient2) OnCreate(ctx context.Context, name string, sync GlobalRoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &globalRoleBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &globalRoleBindingLifecycleDelegate{create: sync}) } func (n *globalRoleBindingClient2) OnChange(ctx context.Context, name string, sync GlobalRoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &globalRoleBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &globalRoleBindingLifecycleDelegate{update: sync}) } func (n *globalRoleBindingClient2) OnRemove(ctx context.Context, name string, sync GlobalRoleBindingChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *globalRoleBindingLifecycleDelegate) Remove(obj *GlobalRoleBinding) (run return n.remove(obj) } -func (n *globalRoleBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *globalRoleBindingLifecycleDelegate) Updated(obj *GlobalRoleBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_binding_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_global_role_binding_lifecycle_adapter.go index 252513d3..708c3574 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_binding_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_binding_lifecycle_adapter.go @@ -15,6 +15,16 @@ type globalRoleBindingLifecycleAdapter struct { lifecycle GlobalRoleBindingLifecycle } +func (w *globalRoleBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *globalRoleBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *globalRoleBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*GlobalRoleBinding)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go index 8f2d52ee..78ddec64 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go @@ -341,12 +341,12 @@ func (n *globalRoleClient2) Cache() GlobalRoleClientCache { func (n *globalRoleClient2) OnCreate(ctx context.Context, name string, sync GlobalRoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &globalRoleLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &globalRoleLifecycleDelegate{create: sync}) } func (n *globalRoleClient2) OnChange(ctx context.Context, name string, sync GlobalRoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &globalRoleLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &globalRoleLifecycleDelegate{update: sync}) } func (n *globalRoleClient2) OnRemove(ctx context.Context, name string, sync GlobalRoleChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *globalRoleLifecycleDelegate) Remove(obj *GlobalRole) (runtime.Object, e return n.remove(obj) } -func (n *globalRoleLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *globalRoleLifecycleDelegate) Updated(obj *GlobalRole) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_global_role_lifecycle_adapter.go index e57c0ac0..19760482 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_lifecycle_adapter.go @@ -15,6 +15,16 @@ type globalRoleLifecycleAdapter struct { lifecycle GlobalRoleLifecycle } +func (w *globalRoleLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *globalRoleLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *globalRoleLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*GlobalRole)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_group_controller.go b/apis/management.cattle.io/v3/zz_generated_group_controller.go index 71f3723d..69cc7b80 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_controller.go @@ -341,12 +341,12 @@ func (n *groupClient2) Cache() GroupClientCache { func (n *groupClient2) OnCreate(ctx context.Context, name string, sync GroupChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &groupLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &groupLifecycleDelegate{create: sync}) } func (n *groupClient2) OnChange(ctx context.Context, name string, sync GroupChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &groupLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &groupLifecycleDelegate{update: sync}) } func (n *groupClient2) OnRemove(ctx context.Context, name string, sync GroupChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *groupLifecycleDelegate) Remove(obj *Group) (runtime.Object, error) { return n.remove(obj) } -func (n *groupLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *groupLifecycleDelegate) Updated(obj *Group) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_group_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_group_lifecycle_adapter.go index a73e9923..3707988b 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_group_lifecycle_adapter.go @@ -15,6 +15,16 @@ type groupLifecycleAdapter struct { lifecycle GroupLifecycle } +func (w *groupLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *groupLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *groupLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Group)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go index e43bd8c3..0700a9a7 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go @@ -341,12 +341,12 @@ func (n *groupMemberClient2) Cache() GroupMemberClientCache { func (n *groupMemberClient2) OnCreate(ctx context.Context, name string, sync GroupMemberChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &groupMemberLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &groupMemberLifecycleDelegate{create: sync}) } func (n *groupMemberClient2) OnChange(ctx context.Context, name string, sync GroupMemberChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &groupMemberLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &groupMemberLifecycleDelegate{update: sync}) } func (n *groupMemberClient2) OnRemove(ctx context.Context, name string, sync GroupMemberChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *groupMemberLifecycleDelegate) Remove(obj *GroupMember) (runtime.Object, return n.remove(obj) } -func (n *groupMemberLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *groupMemberLifecycleDelegate) Updated(obj *GroupMember) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_group_member_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_group_member_lifecycle_adapter.go index 4da248ac..26d0c139 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_member_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_group_member_lifecycle_adapter.go @@ -15,6 +15,16 @@ type groupMemberLifecycleAdapter struct { lifecycle GroupMemberLifecycle } +func (w *groupMemberLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *groupMemberLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *groupMemberLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*GroupMember)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go index 003bd4a5..76d097ef 100644 --- a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go @@ -341,12 +341,12 @@ func (n *ldapConfigClient2) Cache() LdapConfigClientCache { func (n *ldapConfigClient2) OnCreate(ctx context.Context, name string, sync LdapConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &ldapConfigLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &ldapConfigLifecycleDelegate{create: sync}) } func (n *ldapConfigClient2) OnChange(ctx context.Context, name string, sync LdapConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &ldapConfigLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &ldapConfigLifecycleDelegate{update: sync}) } func (n *ldapConfigClient2) OnRemove(ctx context.Context, name string, sync LdapConfigChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *ldapConfigLifecycleDelegate) Remove(obj *LdapConfig) (runtime.Object, e return n.remove(obj) } -func (n *ldapConfigLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *ldapConfigLifecycleDelegate) Updated(obj *LdapConfig) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go index 4dd1a4cb..220a0235 100644 --- a/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_ldap_config_lifecycle_adapter.go @@ -15,6 +15,16 @@ type ldapConfigLifecycleAdapter struct { lifecycle LdapConfigLifecycle } +func (w *ldapConfigLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *ldapConfigLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *ldapConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*LdapConfig)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go b/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go index b729ddb8..bef452b7 100644 --- a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go @@ -341,12 +341,12 @@ func (n *listenConfigClient2) Cache() ListenConfigClientCache { func (n *listenConfigClient2) OnCreate(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &listenConfigLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &listenConfigLifecycleDelegate{create: sync}) } func (n *listenConfigClient2) OnChange(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &listenConfigLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &listenConfigLifecycleDelegate{update: sync}) } func (n *listenConfigClient2) OnRemove(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *listenConfigLifecycleDelegate) Remove(obj *ListenConfig) (runtime.Objec return n.remove(obj) } -func (n *listenConfigLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *listenConfigLifecycleDelegate) Updated(obj *ListenConfig) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go index 7fc67aa0..66a27270 100644 --- a/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go @@ -15,6 +15,16 @@ type listenConfigLifecycleAdapter struct { lifecycle ListenConfigLifecycle } +func (w *listenConfigLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *listenConfigLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *listenConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ListenConfig)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_node_controller.go b/apis/management.cattle.io/v3/zz_generated_node_controller.go index bb2adf07..e977c842 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_controller.go @@ -342,12 +342,12 @@ func (n *nodeClient2) Cache() NodeClientCache { func (n *nodeClient2) OnCreate(ctx context.Context, name string, sync NodeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &nodeLifecycleDelegate{create: sync}) } func (n *nodeClient2) OnChange(ctx context.Context, name string, sync NodeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &nodeLifecycleDelegate{update: sync}) } func (n *nodeClient2) OnRemove(ctx context.Context, name string, sync NodeChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *nodeLifecycleDelegate) Remove(obj *Node) (runtime.Object, error) { return n.remove(obj) } -func (n *nodeLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *nodeLifecycleDelegate) Updated(obj *Node) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go index 650c96b0..0684dac3 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go @@ -341,12 +341,12 @@ func (n *nodeDriverClient2) Cache() NodeDriverClientCache { func (n *nodeDriverClient2) OnCreate(ctx context.Context, name string, sync NodeDriverChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeDriverLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &nodeDriverLifecycleDelegate{create: sync}) } func (n *nodeDriverClient2) OnChange(ctx context.Context, name string, sync NodeDriverChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeDriverLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &nodeDriverLifecycleDelegate{update: sync}) } func (n *nodeDriverClient2) OnRemove(ctx context.Context, name string, sync NodeDriverChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *nodeDriverLifecycleDelegate) Remove(obj *NodeDriver) (runtime.Object, e return n.remove(obj) } -func (n *nodeDriverLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *nodeDriverLifecycleDelegate) Updated(obj *NodeDriver) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_node_driver_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_node_driver_lifecycle_adapter.go index c99c4448..7607389e 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_driver_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_node_driver_lifecycle_adapter.go @@ -15,6 +15,16 @@ type nodeDriverLifecycleAdapter struct { lifecycle NodeDriverLifecycle } +func (w *nodeDriverLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *nodeDriverLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *nodeDriverLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NodeDriver)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_node_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_node_lifecycle_adapter.go index 248c0e7c..2b8502a9 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_node_lifecycle_adapter.go @@ -15,6 +15,16 @@ type nodeLifecycleAdapter struct { lifecycle NodeLifecycle } +func (w *nodeLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *nodeLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *nodeLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Node)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go index ea24ae10..53872e0a 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go @@ -342,12 +342,12 @@ func (n *nodePoolClient2) Cache() NodePoolClientCache { func (n *nodePoolClient2) OnCreate(ctx context.Context, name string, sync NodePoolChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodePoolLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &nodePoolLifecycleDelegate{create: sync}) } func (n *nodePoolClient2) OnChange(ctx context.Context, name string, sync NodePoolChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodePoolLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &nodePoolLifecycleDelegate{update: sync}) } func (n *nodePoolClient2) OnRemove(ctx context.Context, name string, sync NodePoolChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *nodePoolLifecycleDelegate) Remove(obj *NodePool) (runtime.Object, error return n.remove(obj) } -func (n *nodePoolLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *nodePoolLifecycleDelegate) Updated(obj *NodePool) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_node_pool_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_node_pool_lifecycle_adapter.go index 21284283..e7d187e1 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_pool_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_node_pool_lifecycle_adapter.go @@ -15,6 +15,16 @@ type nodePoolLifecycleAdapter struct { lifecycle NodePoolLifecycle } +func (w *nodePoolLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *nodePoolLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *nodePoolLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NodePool)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go index e894d727..3bcb77e3 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go @@ -342,12 +342,12 @@ func (n *nodeTemplateClient2) Cache() NodeTemplateClientCache { func (n *nodeTemplateClient2) OnCreate(ctx context.Context, name string, sync NodeTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeTemplateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &nodeTemplateLifecycleDelegate{create: sync}) } func (n *nodeTemplateClient2) OnChange(ctx context.Context, name string, sync NodeTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &nodeTemplateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &nodeTemplateLifecycleDelegate{update: sync}) } func (n *nodeTemplateClient2) OnRemove(ctx context.Context, name string, sync NodeTemplateChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *nodeTemplateLifecycleDelegate) Remove(obj *NodeTemplate) (runtime.Objec return n.remove(obj) } -func (n *nodeTemplateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *nodeTemplateLifecycleDelegate) Updated(obj *NodeTemplate) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_node_template_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_node_template_lifecycle_adapter.go index 8c0ca551..cc21ddd6 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_template_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_node_template_lifecycle_adapter.go @@ -15,6 +15,16 @@ type nodeTemplateLifecycleAdapter struct { lifecycle NodeTemplateLifecycle } +func (w *nodeTemplateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *nodeTemplateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *nodeTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NodeTemplate)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go index f3a328cd..4f2a5b43 100644 --- a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go @@ -342,12 +342,12 @@ func (n *notifierClient2) Cache() NotifierClientCache { func (n *notifierClient2) OnCreate(ctx context.Context, name string, sync NotifierChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, ¬ifierLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", ¬ifierLifecycleDelegate{create: sync}) } func (n *notifierClient2) OnChange(ctx context.Context, name string, sync NotifierChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, ¬ifierLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", ¬ifierLifecycleDelegate{update: sync}) } func (n *notifierClient2) OnRemove(ctx context.Context, name string, sync NotifierChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *notifierLifecycleDelegate) Remove(obj *Notifier) (runtime.Object, error return n.remove(obj) } -func (n *notifierLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *notifierLifecycleDelegate) Updated(obj *Notifier) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_notifier_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_notifier_lifecycle_adapter.go index 33c2b953..4b031b27 100644 --- a/apis/management.cattle.io/v3/zz_generated_notifier_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_notifier_lifecycle_adapter.go @@ -15,6 +15,16 @@ type notifierLifecycleAdapter struct { lifecycle NotifierLifecycle } +func (w *notifierLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *notifierLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *notifierLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Notifier)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go index 1929ed6e..ede7896d 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go @@ -341,12 +341,12 @@ func (n *podSecurityPolicyTemplateClient2) Cache() PodSecurityPolicyTemplateClie func (n *podSecurityPolicyTemplateClient2) OnCreate(ctx context.Context, name string, sync PodSecurityPolicyTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyTemplateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &podSecurityPolicyTemplateLifecycleDelegate{create: sync}) } func (n *podSecurityPolicyTemplateClient2) OnChange(ctx context.Context, name string, sync PodSecurityPolicyTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyTemplateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &podSecurityPolicyTemplateLifecycleDelegate{update: sync}) } func (n *podSecurityPolicyTemplateClient2) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyTemplateChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *podSecurityPolicyTemplateLifecycleDelegate) Remove(obj *PodSecurityPoli return n.remove(obj) } -func (n *podSecurityPolicyTemplateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *podSecurityPolicyTemplateLifecycleDelegate) Updated(obj *PodSecurityPolicyTemplate) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_lifecycle_adapter.go index 58278550..db3667da 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_lifecycle_adapter.go @@ -15,6 +15,16 @@ type podSecurityPolicyTemplateLifecycleAdapter struct { lifecycle PodSecurityPolicyTemplateLifecycle } +func (w *podSecurityPolicyTemplateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *podSecurityPolicyTemplateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *podSecurityPolicyTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*PodSecurityPolicyTemplate)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go index 48b47649..f275f53d 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go @@ -342,12 +342,12 @@ func (n *podSecurityPolicyTemplateProjectBindingClient2) Cache() PodSecurityPoli func (n *podSecurityPolicyTemplateProjectBindingClient2) OnCreate(ctx context.Context, name string, sync PodSecurityPolicyTemplateProjectBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyTemplateProjectBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &podSecurityPolicyTemplateProjectBindingLifecycleDelegate{create: sync}) } func (n *podSecurityPolicyTemplateProjectBindingClient2) OnChange(ctx context.Context, name string, sync PodSecurityPolicyTemplateProjectBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &podSecurityPolicyTemplateProjectBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &podSecurityPolicyTemplateProjectBindingLifecycleDelegate{update: sync}) } func (n *podSecurityPolicyTemplateProjectBindingClient2) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyTemplateProjectBindingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *podSecurityPolicyTemplateProjectBindingLifecycleDelegate) Remove(obj *P return n.remove(obj) } -func (n *podSecurityPolicyTemplateProjectBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *podSecurityPolicyTemplateProjectBindingLifecycleDelegate) Updated(obj *PodSecurityPolicyTemplateProjectBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_lifecycle_adapter.go index dfc32185..ac581165 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_lifecycle_adapter.go @@ -15,6 +15,16 @@ type podSecurityPolicyTemplateProjectBindingLifecycleAdapter struct { lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle } +func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*PodSecurityPolicyTemplateProjectBinding)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_preference_controller.go b/apis/management.cattle.io/v3/zz_generated_preference_controller.go index 93a5cb78..a1dae208 100644 --- a/apis/management.cattle.io/v3/zz_generated_preference_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_preference_controller.go @@ -342,12 +342,12 @@ func (n *preferenceClient2) Cache() PreferenceClientCache { func (n *preferenceClient2) OnCreate(ctx context.Context, name string, sync PreferenceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &preferenceLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &preferenceLifecycleDelegate{create: sync}) } func (n *preferenceClient2) OnChange(ctx context.Context, name string, sync PreferenceChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &preferenceLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &preferenceLifecycleDelegate{update: sync}) } func (n *preferenceClient2) OnRemove(ctx context.Context, name string, sync PreferenceChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *preferenceLifecycleDelegate) Remove(obj *Preference) (runtime.Object, e return n.remove(obj) } -func (n *preferenceLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *preferenceLifecycleDelegate) Updated(obj *Preference) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_preference_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_preference_lifecycle_adapter.go index f4ac9609..27c5b2ca 100644 --- a/apis/management.cattle.io/v3/zz_generated_preference_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_preference_lifecycle_adapter.go @@ -15,6 +15,16 @@ type preferenceLifecycleAdapter struct { lifecycle PreferenceLifecycle } +func (w *preferenceLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *preferenceLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *preferenceLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Preference)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_principal_controller.go b/apis/management.cattle.io/v3/zz_generated_principal_controller.go index 7154a2bd..e561f56b 100644 --- a/apis/management.cattle.io/v3/zz_generated_principal_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_principal_controller.go @@ -341,12 +341,12 @@ func (n *principalClient2) Cache() PrincipalClientCache { func (n *principalClient2) OnCreate(ctx context.Context, name string, sync PrincipalChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &principalLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &principalLifecycleDelegate{create: sync}) } func (n *principalClient2) OnChange(ctx context.Context, name string, sync PrincipalChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &principalLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &principalLifecycleDelegate{update: sync}) } func (n *principalClient2) OnRemove(ctx context.Context, name string, sync PrincipalChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *principalLifecycleDelegate) Remove(obj *Principal) (runtime.Object, err return n.remove(obj) } -func (n *principalLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *principalLifecycleDelegate) Updated(obj *Principal) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_principal_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_principal_lifecycle_adapter.go index 3a0363e9..87c8977e 100644 --- a/apis/management.cattle.io/v3/zz_generated_principal_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_principal_lifecycle_adapter.go @@ -15,6 +15,16 @@ type principalLifecycleAdapter struct { lifecycle PrincipalLifecycle } +func (w *principalLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *principalLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *principalLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Principal)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go index 40dfabc4..5a03108c 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go @@ -342,12 +342,12 @@ func (n *projectAlertClient2) Cache() ProjectAlertClientCache { func (n *projectAlertClient2) OnCreate(ctx context.Context, name string, sync ProjectAlertChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectAlertLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectAlertLifecycleDelegate{create: sync}) } func (n *projectAlertClient2) OnChange(ctx context.Context, name string, sync ProjectAlertChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectAlertLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectAlertLifecycleDelegate{update: sync}) } func (n *projectAlertClient2) OnRemove(ctx context.Context, name string, sync ProjectAlertChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectAlertLifecycleDelegate) Remove(obj *ProjectAlert) (runtime.Objec return n.remove(obj) } -func (n *projectAlertLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectAlertLifecycleDelegate) Updated(obj *ProjectAlert) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_alert_lifecycle_adapter.go index 6c446a7f..7e67c19a 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectAlertLifecycleAdapter struct { lifecycle ProjectAlertLifecycle } +func (w *projectAlertLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectAlertLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectAlertLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ProjectAlert)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go index 19adb9cb..a937b2e4 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go @@ -342,12 +342,12 @@ func (n *projectCatalogClient2) Cache() ProjectCatalogClientCache { func (n *projectCatalogClient2) OnCreate(ctx context.Context, name string, sync ProjectCatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectCatalogLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectCatalogLifecycleDelegate{create: sync}) } func (n *projectCatalogClient2) OnChange(ctx context.Context, name string, sync ProjectCatalogChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectCatalogLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectCatalogLifecycleDelegate{update: sync}) } func (n *projectCatalogClient2) OnRemove(ctx context.Context, name string, sync ProjectCatalogChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectCatalogLifecycleDelegate) Remove(obj *ProjectCatalog) (runtime.O return n.remove(obj) } -func (n *projectCatalogLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectCatalogLifecycleDelegate) Updated(obj *ProjectCatalog) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_catalog_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_catalog_lifecycle_adapter.go index 81239f1f..208f1389 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_catalog_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_catalog_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectCatalogLifecycleAdapter struct { lifecycle ProjectCatalogLifecycle } +func (w *projectCatalogLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectCatalogLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectCatalogLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ProjectCatalog)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_controller.go b/apis/management.cattle.io/v3/zz_generated_project_controller.go index a146e99d..dadb28f4 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_controller.go @@ -342,12 +342,12 @@ func (n *projectClient2) Cache() ProjectClientCache { func (n *projectClient2) OnCreate(ctx context.Context, name string, sync ProjectChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectLifecycleDelegate{create: sync}) } func (n *projectClient2) OnChange(ctx context.Context, name string, sync ProjectChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectLifecycleDelegate{update: sync}) } func (n *projectClient2) OnRemove(ctx context.Context, name string, sync ProjectChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectLifecycleDelegate) Remove(obj *Project) (runtime.Object, error) return n.remove(obj) } -func (n *projectLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectLifecycleDelegate) Updated(obj *Project) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_lifecycle_adapter.go index 5e47f827..a2c2f4f0 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectLifecycleAdapter struct { lifecycle ProjectLifecycle } +func (w *projectLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Project)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go index a11b324d..7075367b 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go @@ -342,12 +342,12 @@ func (n *projectLoggingClient2) Cache() ProjectLoggingClientCache { func (n *projectLoggingClient2) OnCreate(ctx context.Context, name string, sync ProjectLoggingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectLoggingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectLoggingLifecycleDelegate{create: sync}) } func (n *projectLoggingClient2) OnChange(ctx context.Context, name string, sync ProjectLoggingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectLoggingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectLoggingLifecycleDelegate{update: sync}) } func (n *projectLoggingClient2) OnRemove(ctx context.Context, name string, sync ProjectLoggingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectLoggingLifecycleDelegate) Remove(obj *ProjectLogging) (runtime.O return n.remove(obj) } -func (n *projectLoggingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectLoggingLifecycleDelegate) Updated(obj *ProjectLogging) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_logging_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_logging_lifecycle_adapter.go index 2e227c20..70bb7d0a 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_logging_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_logging_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectLoggingLifecycleAdapter struct { lifecycle ProjectLoggingLifecycle } +func (w *projectLoggingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectLoggingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectLoggingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ProjectLogging)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go index ea8a539c..22fe75b1 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go @@ -342,12 +342,12 @@ func (n *projectNetworkPolicyClient2) Cache() ProjectNetworkPolicyClientCache { func (n *projectNetworkPolicyClient2) OnCreate(ctx context.Context, name string, sync ProjectNetworkPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectNetworkPolicyLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectNetworkPolicyLifecycleDelegate{create: sync}) } func (n *projectNetworkPolicyClient2) OnChange(ctx context.Context, name string, sync ProjectNetworkPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectNetworkPolicyLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectNetworkPolicyLifecycleDelegate{update: sync}) } func (n *projectNetworkPolicyClient2) OnRemove(ctx context.Context, name string, sync ProjectNetworkPolicyChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectNetworkPolicyLifecycleDelegate) Remove(obj *ProjectNetworkPolicy return n.remove(obj) } -func (n *projectNetworkPolicyLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectNetworkPolicyLifecycleDelegate) Updated(obj *ProjectNetworkPolicy) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_network_policy_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_network_policy_lifecycle_adapter.go index b5298ae8..de93cd98 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_network_policy_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_network_policy_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectNetworkPolicyLifecycleAdapter struct { lifecycle ProjectNetworkPolicyLifecycle } +func (w *projectNetworkPolicyLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectNetworkPolicyLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectNetworkPolicyLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ProjectNetworkPolicy)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go index d116da58..2971e3c4 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go @@ -342,12 +342,12 @@ func (n *projectRoleTemplateBindingClient2) Cache() ProjectRoleTemplateBindingCl func (n *projectRoleTemplateBindingClient2) OnCreate(ctx context.Context, name string, sync ProjectRoleTemplateBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectRoleTemplateBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &projectRoleTemplateBindingLifecycleDelegate{create: sync}) } func (n *projectRoleTemplateBindingClient2) OnChange(ctx context.Context, name string, sync ProjectRoleTemplateBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &projectRoleTemplateBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &projectRoleTemplateBindingLifecycleDelegate{update: sync}) } func (n *projectRoleTemplateBindingClient2) OnRemove(ctx context.Context, name string, sync ProjectRoleTemplateBindingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *projectRoleTemplateBindingLifecycleDelegate) Remove(obj *ProjectRoleTem return n.remove(obj) } -func (n *projectRoleTemplateBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *projectRoleTemplateBindingLifecycleDelegate) Updated(obj *ProjectRoleTemplateBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_lifecycle_adapter.go index b05de01a..5ee848d1 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_lifecycle_adapter.go @@ -15,6 +15,16 @@ type projectRoleTemplateBindingLifecycleAdapter struct { lifecycle ProjectRoleTemplateBindingLifecycle } +func (w *projectRoleTemplateBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *projectRoleTemplateBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *projectRoleTemplateBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ProjectRoleTemplateBinding)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go index 1500f9a3..13f62a07 100644 --- a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go @@ -341,12 +341,12 @@ func (n *roleTemplateClient2) Cache() RoleTemplateClientCache { func (n *roleTemplateClient2) OnCreate(ctx context.Context, name string, sync RoleTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleTemplateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &roleTemplateLifecycleDelegate{create: sync}) } func (n *roleTemplateClient2) OnChange(ctx context.Context, name string, sync RoleTemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleTemplateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &roleTemplateLifecycleDelegate{update: sync}) } func (n *roleTemplateClient2) OnRemove(ctx context.Context, name string, sync RoleTemplateChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *roleTemplateLifecycleDelegate) Remove(obj *RoleTemplate) (runtime.Objec return n.remove(obj) } -func (n *roleTemplateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *roleTemplateLifecycleDelegate) Updated(obj *RoleTemplate) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_role_template_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_role_template_lifecycle_adapter.go index 5c96df0d..52b4e37d 100644 --- a/apis/management.cattle.io/v3/zz_generated_role_template_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_role_template_lifecycle_adapter.go @@ -15,6 +15,16 @@ type roleTemplateLifecycleAdapter struct { lifecycle RoleTemplateLifecycle } +func (w *roleTemplateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *roleTemplateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *roleTemplateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*RoleTemplate)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_setting_controller.go b/apis/management.cattle.io/v3/zz_generated_setting_controller.go index a41dd7d3..c834d449 100644 --- a/apis/management.cattle.io/v3/zz_generated_setting_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_setting_controller.go @@ -341,12 +341,12 @@ func (n *settingClient2) Cache() SettingClientCache { func (n *settingClient2) OnCreate(ctx context.Context, name string, sync SettingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &settingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &settingLifecycleDelegate{create: sync}) } func (n *settingClient2) OnChange(ctx context.Context, name string, sync SettingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &settingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &settingLifecycleDelegate{update: sync}) } func (n *settingClient2) OnRemove(ctx context.Context, name string, sync SettingChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *settingLifecycleDelegate) Remove(obj *Setting) (runtime.Object, error) return n.remove(obj) } -func (n *settingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *settingLifecycleDelegate) Updated(obj *Setting) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_setting_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_setting_lifecycle_adapter.go index 62426698..b999b176 100644 --- a/apis/management.cattle.io/v3/zz_generated_setting_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_setting_lifecycle_adapter.go @@ -15,6 +15,16 @@ type settingLifecycleAdapter struct { lifecycle SettingLifecycle } +func (w *settingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *settingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *settingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Setting)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go index 5efd09ee..9fd3eadf 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go @@ -341,12 +341,12 @@ func (n *templateContentClient2) Cache() TemplateContentClientCache { func (n *templateContentClient2) OnCreate(ctx context.Context, name string, sync TemplateContentChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateContentLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &templateContentLifecycleDelegate{create: sync}) } func (n *templateContentClient2) OnChange(ctx context.Context, name string, sync TemplateContentChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateContentLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &templateContentLifecycleDelegate{update: sync}) } func (n *templateContentClient2) OnRemove(ctx context.Context, name string, sync TemplateContentChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *templateContentLifecycleDelegate) Remove(obj *TemplateContent) (runtime return n.remove(obj) } -func (n *templateContentLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *templateContentLifecycleDelegate) Updated(obj *TemplateContent) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_template_content_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_template_content_lifecycle_adapter.go index 7eac4a2e..958fe949 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_content_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_template_content_lifecycle_adapter.go @@ -15,6 +15,16 @@ type templateContentLifecycleAdapter struct { lifecycle TemplateContentLifecycle } +func (w *templateContentLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *templateContentLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *templateContentLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*TemplateContent)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_template_controller.go b/apis/management.cattle.io/v3/zz_generated_template_controller.go index 4dd708a6..bdf7bbf7 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_controller.go @@ -341,12 +341,12 @@ func (n *templateClient2) Cache() TemplateClientCache { func (n *templateClient2) OnCreate(ctx context.Context, name string, sync TemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &templateLifecycleDelegate{create: sync}) } func (n *templateClient2) OnChange(ctx context.Context, name string, sync TemplateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &templateLifecycleDelegate{update: sync}) } func (n *templateClient2) OnRemove(ctx context.Context, name string, sync TemplateChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *templateLifecycleDelegate) Remove(obj *Template) (runtime.Object, error return n.remove(obj) } -func (n *templateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *templateLifecycleDelegate) Updated(obj *Template) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_template_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_template_lifecycle_adapter.go index 0e579265..9dfa67be 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_template_lifecycle_adapter.go @@ -15,6 +15,16 @@ type templateLifecycleAdapter struct { lifecycle TemplateLifecycle } +func (w *templateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *templateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *templateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Template)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go index e08dafc5..3cfa56c1 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go @@ -341,12 +341,12 @@ func (n *templateVersionClient2) Cache() TemplateVersionClientCache { func (n *templateVersionClient2) OnCreate(ctx context.Context, name string, sync TemplateVersionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateVersionLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &templateVersionLifecycleDelegate{create: sync}) } func (n *templateVersionClient2) OnChange(ctx context.Context, name string, sync TemplateVersionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &templateVersionLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &templateVersionLifecycleDelegate{update: sync}) } func (n *templateVersionClient2) OnRemove(ctx context.Context, name string, sync TemplateVersionChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *templateVersionLifecycleDelegate) Remove(obj *TemplateVersion) (runtime return n.remove(obj) } -func (n *templateVersionLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *templateVersionLifecycleDelegate) Updated(obj *TemplateVersion) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_template_version_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_template_version_lifecycle_adapter.go index 36113ac7..f0659afb 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_version_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_template_version_lifecycle_adapter.go @@ -15,6 +15,16 @@ type templateVersionLifecycleAdapter struct { lifecycle TemplateVersionLifecycle } +func (w *templateVersionLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *templateVersionLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *templateVersionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*TemplateVersion)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_token_controller.go b/apis/management.cattle.io/v3/zz_generated_token_controller.go index 72c45c36..7fae9242 100644 --- a/apis/management.cattle.io/v3/zz_generated_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_token_controller.go @@ -341,12 +341,12 @@ func (n *tokenClient2) Cache() TokenClientCache { func (n *tokenClient2) OnCreate(ctx context.Context, name string, sync TokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &tokenLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &tokenLifecycleDelegate{create: sync}) } func (n *tokenClient2) OnChange(ctx context.Context, name string, sync TokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &tokenLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &tokenLifecycleDelegate{update: sync}) } func (n *tokenClient2) OnRemove(ctx context.Context, name string, sync TokenChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *tokenLifecycleDelegate) Remove(obj *Token) (runtime.Object, error) { return n.remove(obj) } -func (n *tokenLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *tokenLifecycleDelegate) Updated(obj *Token) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_token_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_token_lifecycle_adapter.go index 356f7fb2..d25fd5d4 100644 --- a/apis/management.cattle.io/v3/zz_generated_token_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_token_lifecycle_adapter.go @@ -15,6 +15,16 @@ type tokenLifecycleAdapter struct { lifecycle TokenLifecycle } +func (w *tokenLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *tokenLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *tokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Token)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go index 68d476f5..2e04cb1b 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go @@ -341,12 +341,12 @@ func (n *userAttributeClient2) Cache() UserAttributeClientCache { func (n *userAttributeClient2) OnCreate(ctx context.Context, name string, sync UserAttributeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &userAttributeLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &userAttributeLifecycleDelegate{create: sync}) } func (n *userAttributeClient2) OnChange(ctx context.Context, name string, sync UserAttributeChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &userAttributeLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &userAttributeLifecycleDelegate{update: sync}) } func (n *userAttributeClient2) OnRemove(ctx context.Context, name string, sync UserAttributeChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *userAttributeLifecycleDelegate) Remove(obj *UserAttribute) (runtime.Obj return n.remove(obj) } -func (n *userAttributeLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *userAttributeLifecycleDelegate) Updated(obj *UserAttribute) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go index a323f71f..1dc7a410 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_user_attribute_lifecycle_adapter.go @@ -15,6 +15,16 @@ type userAttributeLifecycleAdapter struct { lifecycle UserAttributeLifecycle } +func (w *userAttributeLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *userAttributeLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *userAttributeLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*UserAttribute)) if o == nil { diff --git a/apis/management.cattle.io/v3/zz_generated_user_controller.go b/apis/management.cattle.io/v3/zz_generated_user_controller.go index 42cfe13e..a81f30d8 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_controller.go @@ -341,12 +341,12 @@ func (n *userClient2) Cache() UserClientCache { func (n *userClient2) OnCreate(ctx context.Context, name string, sync UserChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &userLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &userLifecycleDelegate{create: sync}) } func (n *userClient2) OnChange(ctx context.Context, name string, sync UserChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &userLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &userLifecycleDelegate{update: sync}) } func (n *userClient2) OnRemove(ctx context.Context, name string, sync UserChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *userLifecycleDelegate) Remove(obj *User) (runtime.Object, error) { return n.remove(obj) } -func (n *userLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *userLifecycleDelegate) Updated(obj *User) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3/zz_generated_user_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_user_lifecycle_adapter.go index e18e2f9d..383d6c4a 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_user_lifecycle_adapter.go @@ -15,6 +15,16 @@ type userLifecycleAdapter struct { lifecycle UserLifecycle } +func (w *userLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *userLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *userLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*User)) if o == nil { diff --git a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go index 8675ac44..384b7f44 100644 --- a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go +++ b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go @@ -341,12 +341,12 @@ func (n *authProviderClient2) Cache() AuthProviderClientCache { func (n *authProviderClient2) OnCreate(ctx context.Context, name string, sync AuthProviderChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &authProviderLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &authProviderLifecycleDelegate{create: sync}) } func (n *authProviderClient2) OnChange(ctx context.Context, name string, sync AuthProviderChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &authProviderLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &authProviderLifecycleDelegate{update: sync}) } func (n *authProviderClient2) OnRemove(ctx context.Context, name string, sync AuthProviderChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *authProviderLifecycleDelegate) Remove(obj *AuthProvider) (runtime.Objec return n.remove(obj) } -func (n *authProviderLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *authProviderLifecycleDelegate) Updated(obj *AuthProvider) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/management.cattle.io/v3public/zz_generated_auth_provider_lifecycle_adapter.go b/apis/management.cattle.io/v3public/zz_generated_auth_provider_lifecycle_adapter.go index 25285d81..b6de60ab 100644 --- a/apis/management.cattle.io/v3public/zz_generated_auth_provider_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3public/zz_generated_auth_provider_lifecycle_adapter.go @@ -15,6 +15,16 @@ type authProviderLifecycleAdapter struct { lifecycle AuthProviderLifecycle } +func (w *authProviderLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *authProviderLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *authProviderLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*AuthProvider)) if o == nil { diff --git a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go index f3c3216f..69a4fec9 100644 --- a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go +++ b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go @@ -343,12 +343,12 @@ func (n *networkPolicyClient2) Cache() NetworkPolicyClientCache { func (n *networkPolicyClient2) OnCreate(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &networkPolicyLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &networkPolicyLifecycleDelegate{create: sync}) } func (n *networkPolicyClient2) OnChange(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &networkPolicyLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &networkPolicyLifecycleDelegate{update: sync}) } func (n *networkPolicyClient2) OnRemove(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *networkPolicyLifecycleDelegate) Remove(obj *v1.NetworkPolicy) (runtime. return n.remove(obj) } -func (n *networkPolicyLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *networkPolicyLifecycleDelegate) Updated(obj *v1.NetworkPolicy) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/networking.k8s.io/v1/zz_generated_network_policy_lifecycle_adapter.go b/apis/networking.k8s.io/v1/zz_generated_network_policy_lifecycle_adapter.go index dbb9e9ce..c084ba6c 100644 --- a/apis/networking.k8s.io/v1/zz_generated_network_policy_lifecycle_adapter.go +++ b/apis/networking.k8s.io/v1/zz_generated_network_policy_lifecycle_adapter.go @@ -16,6 +16,16 @@ type networkPolicyLifecycleAdapter struct { lifecycle NetworkPolicyLifecycle } +func (w *networkPolicyLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *networkPolicyLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *networkPolicyLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.NetworkPolicy)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_app_controller.go b/apis/project.cattle.io/v3/zz_generated_app_controller.go index 46578d81..6c8d37b2 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_controller.go @@ -342,12 +342,12 @@ func (n *appClient2) Cache() AppClientCache { func (n *appClient2) OnCreate(ctx context.Context, name string, sync AppChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &appLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &appLifecycleDelegate{create: sync}) } func (n *appClient2) OnChange(ctx context.Context, name string, sync AppChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &appLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &appLifecycleDelegate{update: sync}) } func (n *appClient2) OnRemove(ctx context.Context, name string, sync AppChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *appLifecycleDelegate) Remove(obj *App) (runtime.Object, error) { return n.remove(obj) } -func (n *appLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *appLifecycleDelegate) Updated(obj *App) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_app_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_app_lifecycle_adapter.go index d1c7b3f2..d8e0dacb 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_app_lifecycle_adapter.go @@ -15,6 +15,16 @@ type appLifecycleAdapter struct { lifecycle AppLifecycle } +func (w *appLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *appLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *appLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*App)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go index c1259fe9..51f4aeb8 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go @@ -342,12 +342,12 @@ func (n *appRevisionClient2) Cache() AppRevisionClientCache { func (n *appRevisionClient2) OnCreate(ctx context.Context, name string, sync AppRevisionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &appRevisionLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &appRevisionLifecycleDelegate{create: sync}) } func (n *appRevisionClient2) OnChange(ctx context.Context, name string, sync AppRevisionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &appRevisionLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &appRevisionLifecycleDelegate{update: sync}) } func (n *appRevisionClient2) OnRemove(ctx context.Context, name string, sync AppRevisionChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *appRevisionLifecycleDelegate) Remove(obj *AppRevision) (runtime.Object, return n.remove(obj) } -func (n *appRevisionLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *appRevisionLifecycleDelegate) Updated(obj *AppRevision) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_app_revision_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_app_revision_lifecycle_adapter.go index 682317d1..95958211 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_revision_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_app_revision_lifecycle_adapter.go @@ -15,6 +15,16 @@ type appRevisionLifecycleAdapter struct { lifecycle AppRevisionLifecycle } +func (w *appRevisionLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *appRevisionLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *appRevisionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*AppRevision)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go index 848f56bb..81ef5516 100644 --- a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go @@ -342,12 +342,12 @@ func (n *basicAuthClient2) Cache() BasicAuthClientCache { func (n *basicAuthClient2) OnCreate(ctx context.Context, name string, sync BasicAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &basicAuthLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &basicAuthLifecycleDelegate{create: sync}) } func (n *basicAuthClient2) OnChange(ctx context.Context, name string, sync BasicAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &basicAuthLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &basicAuthLifecycleDelegate{update: sync}) } func (n *basicAuthClient2) OnRemove(ctx context.Context, name string, sync BasicAuthChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *basicAuthLifecycleDelegate) Remove(obj *BasicAuth) (runtime.Object, err return n.remove(obj) } -func (n *basicAuthLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *basicAuthLifecycleDelegate) Updated(obj *BasicAuth) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_basic_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_basic_auth_lifecycle_adapter.go index a49449f5..ee2fc343 100644 --- a/apis/project.cattle.io/v3/zz_generated_basic_auth_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_basic_auth_lifecycle_adapter.go @@ -15,6 +15,16 @@ type basicAuthLifecycleAdapter struct { lifecycle BasicAuthLifecycle } +func (w *basicAuthLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *basicAuthLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *basicAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*BasicAuth)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go index c7adf396..857b5d6f 100644 --- a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go @@ -342,12 +342,12 @@ func (n *certificateClient2) Cache() CertificateClientCache { func (n *certificateClient2) OnCreate(ctx context.Context, name string, sync CertificateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &certificateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &certificateLifecycleDelegate{create: sync}) } func (n *certificateClient2) OnChange(ctx context.Context, name string, sync CertificateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &certificateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &certificateLifecycleDelegate{update: sync}) } func (n *certificateClient2) OnRemove(ctx context.Context, name string, sync CertificateChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *certificateLifecycleDelegate) Remove(obj *Certificate) (runtime.Object, return n.remove(obj) } -func (n *certificateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *certificateLifecycleDelegate) Updated(obj *Certificate) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_certificate_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_certificate_lifecycle_adapter.go index 60708544..e2a5c3f7 100644 --- a/apis/project.cattle.io/v3/zz_generated_certificate_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_certificate_lifecycle_adapter.go @@ -15,6 +15,16 @@ type certificateLifecycleAdapter struct { lifecycle CertificateLifecycle } +func (w *certificateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *certificateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *certificateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Certificate)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go index c7f32c2d..84049823 100644 --- a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go @@ -342,12 +342,12 @@ func (n *dockerCredentialClient2) Cache() DockerCredentialClientCache { func (n *dockerCredentialClient2) OnCreate(ctx context.Context, name string, sync DockerCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &dockerCredentialLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &dockerCredentialLifecycleDelegate{create: sync}) } func (n *dockerCredentialClient2) OnChange(ctx context.Context, name string, sync DockerCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &dockerCredentialLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &dockerCredentialLifecycleDelegate{update: sync}) } func (n *dockerCredentialClient2) OnRemove(ctx context.Context, name string, sync DockerCredentialChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *dockerCredentialLifecycleDelegate) Remove(obj *DockerCredential) (runti return n.remove(obj) } -func (n *dockerCredentialLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *dockerCredentialLifecycleDelegate) Updated(obj *DockerCredential) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_docker_credential_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_docker_credential_lifecycle_adapter.go index 333a7d63..f79173f3 100644 --- a/apis/project.cattle.io/v3/zz_generated_docker_credential_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_docker_credential_lifecycle_adapter.go @@ -15,6 +15,16 @@ type dockerCredentialLifecycleAdapter struct { lifecycle DockerCredentialLifecycle } +func (w *dockerCredentialLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *dockerCredentialLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *dockerCredentialLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*DockerCredential)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go index f07f44bd..597409c6 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go @@ -342,12 +342,12 @@ func (n *namespacedBasicAuthClient2) Cache() NamespacedBasicAuthClientCache { func (n *namespacedBasicAuthClient2) OnCreate(ctx context.Context, name string, sync NamespacedBasicAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedBasicAuthLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespacedBasicAuthLifecycleDelegate{create: sync}) } func (n *namespacedBasicAuthClient2) OnChange(ctx context.Context, name string, sync NamespacedBasicAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedBasicAuthLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespacedBasicAuthLifecycleDelegate{update: sync}) } func (n *namespacedBasicAuthClient2) OnRemove(ctx context.Context, name string, sync NamespacedBasicAuthChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespacedBasicAuthLifecycleDelegate) Remove(obj *NamespacedBasicAuth) return n.remove(obj) } -func (n *namespacedBasicAuthLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespacedBasicAuthLifecycleDelegate) Updated(obj *NamespacedBasicAuth) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go index 3518f99a..c28b07d8 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_lifecycle_adapter.go @@ -15,6 +15,16 @@ type namespacedBasicAuthLifecycleAdapter struct { lifecycle NamespacedBasicAuthLifecycle } +func (w *namespacedBasicAuthLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespacedBasicAuthLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespacedBasicAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NamespacedBasicAuth)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go index 210ec3ba..44ba6598 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go @@ -342,12 +342,12 @@ func (n *namespacedCertificateClient2) Cache() NamespacedCertificateClientCache func (n *namespacedCertificateClient2) OnCreate(ctx context.Context, name string, sync NamespacedCertificateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedCertificateLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespacedCertificateLifecycleDelegate{create: sync}) } func (n *namespacedCertificateClient2) OnChange(ctx context.Context, name string, sync NamespacedCertificateChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedCertificateLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespacedCertificateLifecycleDelegate{update: sync}) } func (n *namespacedCertificateClient2) OnRemove(ctx context.Context, name string, sync NamespacedCertificateChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespacedCertificateLifecycleDelegate) Remove(obj *NamespacedCertifica return n.remove(obj) } -func (n *namespacedCertificateLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespacedCertificateLifecycleDelegate) Updated(obj *NamespacedCertificate) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go index 65d3a326..81336594 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_lifecycle_adapter.go @@ -15,6 +15,16 @@ type namespacedCertificateLifecycleAdapter struct { lifecycle NamespacedCertificateLifecycle } +func (w *namespacedCertificateLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespacedCertificateLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespacedCertificateLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NamespacedCertificate)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go index 83be276d..d09263dc 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go @@ -342,12 +342,12 @@ func (n *namespacedDockerCredentialClient2) Cache() NamespacedDockerCredentialCl func (n *namespacedDockerCredentialClient2) OnCreate(ctx context.Context, name string, sync NamespacedDockerCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedDockerCredentialLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespacedDockerCredentialLifecycleDelegate{create: sync}) } func (n *namespacedDockerCredentialClient2) OnChange(ctx context.Context, name string, sync NamespacedDockerCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedDockerCredentialLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespacedDockerCredentialLifecycleDelegate{update: sync}) } func (n *namespacedDockerCredentialClient2) OnRemove(ctx context.Context, name string, sync NamespacedDockerCredentialChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespacedDockerCredentialLifecycleDelegate) Remove(obj *NamespacedDock return n.remove(obj) } -func (n *namespacedDockerCredentialLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespacedDockerCredentialLifecycleDelegate) Updated(obj *NamespacedDockerCredential) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go index d17a6c77..4be61112 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_lifecycle_adapter.go @@ -15,6 +15,16 @@ type namespacedDockerCredentialLifecycleAdapter struct { lifecycle NamespacedDockerCredentialLifecycle } +func (w *namespacedDockerCredentialLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespacedDockerCredentialLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespacedDockerCredentialLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NamespacedDockerCredential)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go index 235a6b7f..4070df86 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go @@ -342,12 +342,12 @@ func (n *namespacedServiceAccountTokenClient2) Cache() NamespacedServiceAccountT func (n *namespacedServiceAccountTokenClient2) OnCreate(ctx context.Context, name string, sync NamespacedServiceAccountTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedServiceAccountTokenLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespacedServiceAccountTokenLifecycleDelegate{create: sync}) } func (n *namespacedServiceAccountTokenClient2) OnChange(ctx context.Context, name string, sync NamespacedServiceAccountTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedServiceAccountTokenLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespacedServiceAccountTokenLifecycleDelegate{update: sync}) } func (n *namespacedServiceAccountTokenClient2) OnRemove(ctx context.Context, name string, sync NamespacedServiceAccountTokenChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespacedServiceAccountTokenLifecycleDelegate) Remove(obj *NamespacedS return n.remove(obj) } -func (n *namespacedServiceAccountTokenLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespacedServiceAccountTokenLifecycleDelegate) Updated(obj *NamespacedServiceAccountToken) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go index 05e0dd91..81857c1d 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_lifecycle_adapter.go @@ -15,6 +15,16 @@ type namespacedServiceAccountTokenLifecycleAdapter struct { lifecycle NamespacedServiceAccountTokenLifecycle } +func (w *namespacedServiceAccountTokenLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespacedServiceAccountTokenLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespacedServiceAccountTokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NamespacedServiceAccountToken)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go index 7fcb8ece..e12e78b6 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go @@ -342,12 +342,12 @@ func (n *namespacedSshAuthClient2) Cache() NamespacedSSHAuthClientCache { func (n *namespacedSshAuthClient2) OnCreate(ctx context.Context, name string, sync NamespacedSSHAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedSshAuthLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &namespacedSshAuthLifecycleDelegate{create: sync}) } func (n *namespacedSshAuthClient2) OnChange(ctx context.Context, name string, sync NamespacedSSHAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &namespacedSshAuthLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &namespacedSshAuthLifecycleDelegate{update: sync}) } func (n *namespacedSshAuthClient2) OnRemove(ctx context.Context, name string, sync NamespacedSSHAuthChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *namespacedSshAuthLifecycleDelegate) Remove(obj *NamespacedSSHAuth) (run return n.remove(obj) } -func (n *namespacedSshAuthLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *namespacedSshAuthLifecycleDelegate) Updated(obj *NamespacedSSHAuth) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go index 3b04c7b0..d2214b80 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_lifecycle_adapter.go @@ -15,6 +15,16 @@ type namespacedSshAuthLifecycleAdapter struct { lifecycle NamespacedSSHAuthLifecycle } +func (w *namespacedSshAuthLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *namespacedSshAuthLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *namespacedSshAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*NamespacedSSHAuth)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go index 154a2a13..33793a68 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go @@ -342,12 +342,12 @@ func (n *pipelineClient2) Cache() PipelineClientCache { func (n *pipelineClient2) OnCreate(ctx context.Context, name string, sync PipelineChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &pipelineLifecycleDelegate{create: sync}) } func (n *pipelineClient2) OnChange(ctx context.Context, name string, sync PipelineChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &pipelineLifecycleDelegate{update: sync}) } func (n *pipelineClient2) OnRemove(ctx context.Context, name string, sync PipelineChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *pipelineLifecycleDelegate) Remove(obj *Pipeline) (runtime.Object, error return n.remove(obj) } -func (n *pipelineLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *pipelineLifecycleDelegate) Updated(obj *Pipeline) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go index 4f9d3668..975cea00 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go @@ -342,12 +342,12 @@ func (n *pipelineExecutionClient2) Cache() PipelineExecutionClientCache { func (n *pipelineExecutionClient2) OnCreate(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineExecutionLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &pipelineExecutionLifecycleDelegate{create: sync}) } func (n *pipelineExecutionClient2) OnChange(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineExecutionLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &pipelineExecutionLifecycleDelegate{update: sync}) } func (n *pipelineExecutionClient2) OnRemove(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *pipelineExecutionLifecycleDelegate) Remove(obj *PipelineExecution) (run return n.remove(obj) } -func (n *pipelineExecutionLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *pipelineExecutionLifecycleDelegate) Updated(obj *PipelineExecution) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go index 0b2d683a..17826f2c 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_lifecycle_adapter.go @@ -15,6 +15,16 @@ type pipelineExecutionLifecycleAdapter struct { lifecycle PipelineExecutionLifecycle } +func (w *pipelineExecutionLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *pipelineExecutionLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *pipelineExecutionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*PipelineExecution)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go index 4f971fa1..fdafbe51 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_lifecycle_adapter.go @@ -15,6 +15,16 @@ type pipelineLifecycleAdapter struct { lifecycle PipelineLifecycle } +func (w *pipelineLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *pipelineLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *pipelineLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Pipeline)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go index c8f3b8db..8353b30e 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go @@ -342,12 +342,12 @@ func (n *pipelineSettingClient2) Cache() PipelineSettingClientCache { func (n *pipelineSettingClient2) OnCreate(ctx context.Context, name string, sync PipelineSettingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineSettingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &pipelineSettingLifecycleDelegate{create: sync}) } func (n *pipelineSettingClient2) OnChange(ctx context.Context, name string, sync PipelineSettingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &pipelineSettingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &pipelineSettingLifecycleDelegate{update: sync}) } func (n *pipelineSettingClient2) OnRemove(ctx context.Context, name string, sync PipelineSettingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *pipelineSettingLifecycleDelegate) Remove(obj *PipelineSetting) (runtime return n.remove(obj) } -func (n *pipelineSettingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *pipelineSettingLifecycleDelegate) Updated(obj *PipelineSetting) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_lifecycle_adapter.go index 915bf438..f5645d24 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_lifecycle_adapter.go @@ -15,6 +15,16 @@ type pipelineSettingLifecycleAdapter struct { lifecycle PipelineSettingLifecycle } +func (w *pipelineSettingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *pipelineSettingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *pipelineSettingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*PipelineSetting)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go index 6d79f8c6..0458b4b3 100644 --- a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go @@ -342,12 +342,12 @@ func (n *serviceAccountTokenClient2) Cache() ServiceAccountTokenClientCache { func (n *serviceAccountTokenClient2) OnCreate(ctx context.Context, name string, sync ServiceAccountTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceAccountTokenLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &serviceAccountTokenLifecycleDelegate{create: sync}) } func (n *serviceAccountTokenClient2) OnChange(ctx context.Context, name string, sync ServiceAccountTokenChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &serviceAccountTokenLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &serviceAccountTokenLifecycleDelegate{update: sync}) } func (n *serviceAccountTokenClient2) OnRemove(ctx context.Context, name string, sync ServiceAccountTokenChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *serviceAccountTokenLifecycleDelegate) Remove(obj *ServiceAccountToken) return n.remove(obj) } -func (n *serviceAccountTokenLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *serviceAccountTokenLifecycleDelegate) Updated(obj *ServiceAccountToken) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_service_account_token_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_service_account_token_lifecycle_adapter.go index 370c5c2d..1a938426 100644 --- a/apis/project.cattle.io/v3/zz_generated_service_account_token_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_service_account_token_lifecycle_adapter.go @@ -15,6 +15,16 @@ type serviceAccountTokenLifecycleAdapter struct { lifecycle ServiceAccountTokenLifecycle } +func (w *serviceAccountTokenLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *serviceAccountTokenLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *serviceAccountTokenLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*ServiceAccountToken)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go index a38fb871..aae7298e 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go @@ -342,12 +342,12 @@ func (n *sourceCodeCredentialClient2) Cache() SourceCodeCredentialClientCache { func (n *sourceCodeCredentialClient2) OnCreate(ctx context.Context, name string, sync SourceCodeCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeCredentialLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &sourceCodeCredentialLifecycleDelegate{create: sync}) } func (n *sourceCodeCredentialClient2) OnChange(ctx context.Context, name string, sync SourceCodeCredentialChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeCredentialLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &sourceCodeCredentialLifecycleDelegate{update: sync}) } func (n *sourceCodeCredentialClient2) OnRemove(ctx context.Context, name string, sync SourceCodeCredentialChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *sourceCodeCredentialLifecycleDelegate) Remove(obj *SourceCodeCredential return n.remove(obj) } -func (n *sourceCodeCredentialLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *sourceCodeCredentialLifecycleDelegate) Updated(obj *SourceCodeCredential) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go index d9f76499..383636a7 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_credential_lifecycle_adapter.go @@ -15,6 +15,16 @@ type sourceCodeCredentialLifecycleAdapter struct { lifecycle SourceCodeCredentialLifecycle } +func (w *sourceCodeCredentialLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *sourceCodeCredentialLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *sourceCodeCredentialLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*SourceCodeCredential)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go index 32f1bbd9..0e01d428 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go @@ -342,12 +342,12 @@ func (n *sourceCodeProviderConfigClient2) Cache() SourceCodeProviderConfigClient func (n *sourceCodeProviderConfigClient2) OnCreate(ctx context.Context, name string, sync SourceCodeProviderConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeProviderConfigLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &sourceCodeProviderConfigLifecycleDelegate{create: sync}) } func (n *sourceCodeProviderConfigClient2) OnChange(ctx context.Context, name string, sync SourceCodeProviderConfigChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeProviderConfigLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &sourceCodeProviderConfigLifecycleDelegate{update: sync}) } func (n *sourceCodeProviderConfigClient2) OnRemove(ctx context.Context, name string, sync SourceCodeProviderConfigChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *sourceCodeProviderConfigLifecycleDelegate) Remove(obj *SourceCodeProvid return n.remove(obj) } -func (n *sourceCodeProviderConfigLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *sourceCodeProviderConfigLifecycleDelegate) Updated(obj *SourceCodeProviderConfig) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_lifecycle_adapter.go index e9097cae..8fa6f860 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_lifecycle_adapter.go @@ -15,6 +15,16 @@ type sourceCodeProviderConfigLifecycleAdapter struct { lifecycle SourceCodeProviderConfigLifecycle } +func (w *sourceCodeProviderConfigLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *sourceCodeProviderConfigLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *sourceCodeProviderConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*SourceCodeProviderConfig)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go index f5c819ac..64925ecf 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go @@ -341,12 +341,12 @@ func (n *sourceCodeProviderClient2) Cache() SourceCodeProviderClientCache { func (n *sourceCodeProviderClient2) OnCreate(ctx context.Context, name string, sync SourceCodeProviderChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeProviderLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &sourceCodeProviderLifecycleDelegate{create: sync}) } func (n *sourceCodeProviderClient2) OnChange(ctx context.Context, name string, sync SourceCodeProviderChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeProviderLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &sourceCodeProviderLifecycleDelegate{update: sync}) } func (n *sourceCodeProviderClient2) OnRemove(ctx context.Context, name string, sync SourceCodeProviderChangeHandlerFunc) { @@ -418,10 +418,6 @@ func (n *sourceCodeProviderLifecycleDelegate) Remove(obj *SourceCodeProvider) (r return n.remove(obj) } -func (n *sourceCodeProviderLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *sourceCodeProviderLifecycleDelegate) Updated(obj *SourceCodeProvider) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_lifecycle_adapter.go index e84d5de3..70c2ef5d 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_lifecycle_adapter.go @@ -15,6 +15,16 @@ type sourceCodeProviderLifecycleAdapter struct { lifecycle SourceCodeProviderLifecycle } +func (w *sourceCodeProviderLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *sourceCodeProviderLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *sourceCodeProviderLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*SourceCodeProvider)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go index c2657599..7a8534b8 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go @@ -342,12 +342,12 @@ func (n *sourceCodeRepositoryClient2) Cache() SourceCodeRepositoryClientCache { func (n *sourceCodeRepositoryClient2) OnCreate(ctx context.Context, name string, sync SourceCodeRepositoryChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeRepositoryLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &sourceCodeRepositoryLifecycleDelegate{create: sync}) } func (n *sourceCodeRepositoryClient2) OnChange(ctx context.Context, name string, sync SourceCodeRepositoryChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sourceCodeRepositoryLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &sourceCodeRepositoryLifecycleDelegate{update: sync}) } func (n *sourceCodeRepositoryClient2) OnRemove(ctx context.Context, name string, sync SourceCodeRepositoryChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *sourceCodeRepositoryLifecycleDelegate) Remove(obj *SourceCodeRepository return n.remove(obj) } -func (n *sourceCodeRepositoryLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *sourceCodeRepositoryLifecycleDelegate) Updated(obj *SourceCodeRepository) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go index c7c4c1c8..e8dbc442 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_repository_lifecycle_adapter.go @@ -15,6 +15,16 @@ type sourceCodeRepositoryLifecycleAdapter struct { lifecycle SourceCodeRepositoryLifecycle } +func (w *sourceCodeRepositoryLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *sourceCodeRepositoryLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *sourceCodeRepositoryLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*SourceCodeRepository)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go index 554ccf5e..293d62e3 100644 --- a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go @@ -342,12 +342,12 @@ func (n *sshAuthClient2) Cache() SSHAuthClientCache { func (n *sshAuthClient2) OnCreate(ctx context.Context, name string, sync SSHAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sshAuthLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &sshAuthLifecycleDelegate{create: sync}) } func (n *sshAuthClient2) OnChange(ctx context.Context, name string, sync SSHAuthChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &sshAuthLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &sshAuthLifecycleDelegate{update: sync}) } func (n *sshAuthClient2) OnRemove(ctx context.Context, name string, sync SSHAuthChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *sshAuthLifecycleDelegate) Remove(obj *SSHAuth) (runtime.Object, error) return n.remove(obj) } -func (n *sshAuthLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *sshAuthLifecycleDelegate) Updated(obj *SSHAuth) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_ssh_auth_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_ssh_auth_lifecycle_adapter.go index c428c4c6..e26d80a9 100644 --- a/apis/project.cattle.io/v3/zz_generated_ssh_auth_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_ssh_auth_lifecycle_adapter.go @@ -15,6 +15,16 @@ type sshAuthLifecycleAdapter struct { lifecycle SSHAuthLifecycle } +func (w *sshAuthLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *sshAuthLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *sshAuthLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*SSHAuth)) if o == nil { diff --git a/apis/project.cattle.io/v3/zz_generated_workload_controller.go b/apis/project.cattle.io/v3/zz_generated_workload_controller.go index 3d481b8f..e68bfd07 100644 --- a/apis/project.cattle.io/v3/zz_generated_workload_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_workload_controller.go @@ -342,12 +342,12 @@ func (n *workloadClient2) Cache() WorkloadClientCache { func (n *workloadClient2) OnCreate(ctx context.Context, name string, sync WorkloadChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &workloadLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &workloadLifecycleDelegate{create: sync}) } func (n *workloadClient2) OnChange(ctx context.Context, name string, sync WorkloadChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &workloadLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &workloadLifecycleDelegate{update: sync}) } func (n *workloadClient2) OnRemove(ctx context.Context, name string, sync WorkloadChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *workloadLifecycleDelegate) Remove(obj *Workload) (runtime.Object, error return n.remove(obj) } -func (n *workloadLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *workloadLifecycleDelegate) Updated(obj *Workload) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/project.cattle.io/v3/zz_generated_workload_lifecycle_adapter.go b/apis/project.cattle.io/v3/zz_generated_workload_lifecycle_adapter.go index f13e26dc..050722bb 100644 --- a/apis/project.cattle.io/v3/zz_generated_workload_lifecycle_adapter.go +++ b/apis/project.cattle.io/v3/zz_generated_workload_lifecycle_adapter.go @@ -15,6 +15,16 @@ type workloadLifecycleAdapter struct { lifecycle WorkloadLifecycle } +func (w *workloadLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *workloadLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *workloadLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*Workload)) if o == nil { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go index 2c804fcb..0096fe01 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go @@ -342,12 +342,12 @@ func (n *clusterRoleBindingClient2) Cache() ClusterRoleBindingClientCache { func (n *clusterRoleBindingClient2) OnCreate(ctx context.Context, name string, sync ClusterRoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterRoleBindingLifecycleDelegate{create: sync}) } func (n *clusterRoleBindingClient2) OnChange(ctx context.Context, name string, sync ClusterRoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterRoleBindingLifecycleDelegate{update: sync}) } func (n *clusterRoleBindingClient2) OnRemove(ctx context.Context, name string, sync ClusterRoleBindingChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterRoleBindingLifecycleDelegate) Remove(obj *v1.ClusterRoleBinding) return n.remove(obj) } -func (n *clusterRoleBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterRoleBindingLifecycleDelegate) Updated(obj *v1.ClusterRoleBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_lifecycle_adapter.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_lifecycle_adapter.go index c4a45244..4709ecd5 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_lifecycle_adapter.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_lifecycle_adapter.go @@ -16,6 +16,16 @@ type clusterRoleBindingLifecycleAdapter struct { lifecycle ClusterRoleBindingLifecycle } +func (w *clusterRoleBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterRoleBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterRoleBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ClusterRoleBinding)) if o == nil { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go index 67fd0713..bf063471 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go @@ -342,12 +342,12 @@ func (n *clusterRoleClient2) Cache() ClusterRoleClientCache { func (n *clusterRoleClient2) OnCreate(ctx context.Context, name string, sync ClusterRoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &clusterRoleLifecycleDelegate{create: sync}) } func (n *clusterRoleClient2) OnChange(ctx context.Context, name string, sync ClusterRoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &clusterRoleLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &clusterRoleLifecycleDelegate{update: sync}) } func (n *clusterRoleClient2) OnRemove(ctx context.Context, name string, sync ClusterRoleChangeHandlerFunc) { @@ -419,10 +419,6 @@ func (n *clusterRoleLifecycleDelegate) Remove(obj *v1.ClusterRole) (runtime.Obje return n.remove(obj) } -func (n *clusterRoleLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *clusterRoleLifecycleDelegate) Updated(obj *v1.ClusterRole) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_lifecycle_adapter.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_lifecycle_adapter.go index b35f4799..77195826 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_lifecycle_adapter.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_lifecycle_adapter.go @@ -16,6 +16,16 @@ type clusterRoleLifecycleAdapter struct { lifecycle ClusterRoleLifecycle } +func (w *clusterRoleLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *clusterRoleLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *clusterRoleLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.ClusterRole)) if o == nil { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go index 60d4bf67..57abce0e 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go @@ -343,12 +343,12 @@ func (n *roleBindingClient2) Cache() RoleBindingClientCache { func (n *roleBindingClient2) OnCreate(ctx context.Context, name string, sync RoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleBindingLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &roleBindingLifecycleDelegate{create: sync}) } func (n *roleBindingClient2) OnChange(ctx context.Context, name string, sync RoleBindingChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleBindingLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &roleBindingLifecycleDelegate{update: sync}) } func (n *roleBindingClient2) OnRemove(ctx context.Context, name string, sync RoleBindingChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *roleBindingLifecycleDelegate) Remove(obj *v1.RoleBinding) (runtime.Obje return n.remove(obj) } -func (n *roleBindingLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *roleBindingLifecycleDelegate) Updated(obj *v1.RoleBinding) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_lifecycle_adapter.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_lifecycle_adapter.go index b876ee10..2d88f98e 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_lifecycle_adapter.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_lifecycle_adapter.go @@ -16,6 +16,16 @@ type roleBindingLifecycleAdapter struct { lifecycle RoleBindingLifecycle } +func (w *roleBindingLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *roleBindingLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *roleBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.RoleBinding)) if o == nil { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go index 8af6a228..ed5e546a 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go @@ -343,12 +343,12 @@ func (n *roleClient2) Cache() RoleClientCache { func (n *roleClient2) OnCreate(ctx context.Context, name string, sync RoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleLifecycleDelegate{create: sync}) + n.iface.AddLifecycle(ctx, name+"-create", &roleLifecycleDelegate{create: sync}) } func (n *roleClient2) OnChange(ctx context.Context, name string, sync RoleChangeHandlerFunc) { n.loadController() - n.iface.AddLifecycle(ctx, name, &roleLifecycleDelegate{update: sync}) + n.iface.AddLifecycle(ctx, name+"-change", &roleLifecycleDelegate{update: sync}) } func (n *roleClient2) OnRemove(ctx context.Context, name string, sync RoleChangeHandlerFunc) { @@ -420,10 +420,6 @@ func (n *roleLifecycleDelegate) Remove(obj *v1.Role) (runtime.Object, error) { return n.remove(obj) } -func (n *roleLifecycleDelegate) HasUpdated() bool { - return n.remove != nil -} - func (n *roleLifecycleDelegate) Updated(obj *v1.Role) (runtime.Object, error) { if n.update == nil { return obj, nil diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_lifecycle_adapter.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_lifecycle_adapter.go index f321c19b..d1e11d8f 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_lifecycle_adapter.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_lifecycle_adapter.go @@ -16,6 +16,16 @@ type roleLifecycleAdapter struct { lifecycle RoleLifecycle } +func (w *roleLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *roleLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + func (w *roleLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { o, err := w.lifecycle.Create(obj.(*v1.Role)) if o == nil {