diff --git a/api/v1alpha1/multiclusterservice_types.go b/api/v1alpha1/multiclusterservice_types.go index 9f7d118a..4d96d261 100644 --- a/api/v1alpha1/multiclusterservice_types.go +++ b/api/v1alpha1/multiclusterservice_types.go @@ -72,11 +72,6 @@ type ServiceSpec struct { // TemplateResourceRefs is a list of resources to collect from the management cluster, // the values from which can be used in templates. TemplateResourceRefs []sveltosv1beta1.TemplateResourceRef `json:"templateResourceRefs,omitempty"` - // PolicyRefs is a list of kubernetes resources that need to be deployed in matching clusters. - // These resources may contain static values or leverage Go templates for dynamic customization. - // When expressed as templates, the values are rendered using data from resources - // (like Cluster & TemplateResourceRefs) within the management cluster before deployement. - PolicyRefs []sveltosv1beta1.PolicyRef `json:"policyRefs,omitempty"` // +kubebuilder:default:=100 // +kubebuilder:validation:Minimum=1 diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 057b495b..bedeffaf 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1343,11 +1343,6 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { *out = make([]v1beta1.TemplateResourceRef, len(*in)) copy(*out, *in) } - if in.PolicyRefs != nil { - in, out := &in.PolicyRefs, &out.PolicyRefs - *out = make([]v1beta1.PolicyRef, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. diff --git a/internal/controller/clusterdeployment_controller.go b/internal/controller/clusterdeployment_controller.go index 2513bbfd..67746882 100644 --- a/internal/controller/clusterdeployment_controller.go +++ b/internal/controller/clusterdeployment_controller.go @@ -472,7 +472,6 @@ func (r *ClusterDeploymentReconciler) updateServices(ctx context.Context, mc *hm StopOnConflict: mc.Spec.ServiceSpec.StopOnConflict, Reload: mc.Spec.ServiceSpec.Reload, TemplateResourceRefs: mc.Spec.ServiceSpec.TemplateResourceRefs, - PolicyRefs: mc.Spec.ServiceSpec.PolicyRefs, }); err != nil { return ctrl.Result{}, fmt.Errorf("failed to reconcile Profile: %w", err) } diff --git a/internal/controller/multiclusterservice_controller.go b/internal/controller/multiclusterservice_controller.go index ace30941..99070bb0 100644 --- a/internal/controller/multiclusterservice_controller.go +++ b/internal/controller/multiclusterservice_controller.go @@ -142,7 +142,6 @@ func (r *MultiClusterServiceReconciler) reconcileUpdate(ctx context.Context, mcs StopOnConflict: mcs.Spec.ServiceSpec.StopOnConflict, Reload: mcs.Spec.ServiceSpec.Reload, TemplateResourceRefs: mcs.Spec.ServiceSpec.TemplateResourceRefs, - PolicyRefs: mcs.Spec.ServiceSpec.PolicyRefs, }); err != nil { return ctrl.Result{}, fmt.Errorf("failed to reconcile ClusterProfile: %w", err) } diff --git a/internal/sveltos/profile.go b/internal/sveltos/profile.go index 8e0cb230..1d65d016 100644 --- a/internal/sveltos/profile.go +++ b/internal/sveltos/profile.go @@ -37,7 +37,6 @@ type ReconcileProfileOpts struct { LabelSelector metav1.LabelSelector HelmChartOpts []HelmChartOpts TemplateResourceRefs []sveltosv1beta1.TemplateResourceRef - PolicyRefs []sveltosv1beta1.PolicyRef Priority int32 StopOnConflict bool Reload bool @@ -240,7 +239,6 @@ func GetSpec(opts *ReconcileProfileOpts) (*sveltosv1beta1.Spec, error) { HelmCharts: make([]sveltosv1beta1.HelmChart, 0, len(opts.HelmChartOpts)), Reloader: opts.Reload, TemplateResourceRefs: opts.TemplateResourceRefs, - PolicyRefs: opts.PolicyRefs, } for _, hc := range opts.HelmChartOpts { diff --git a/templates/provider/hmc/templates/crds/hmc.mirantis.com_clusterdeployments.yaml b/templates/provider/hmc/templates/crds/hmc.mirantis.com_clusterdeployments.yaml index 2877f76f..126bf906 100644 --- a/templates/provider/hmc/templates/crds/hmc.mirantis.com_clusterdeployments.yaml +++ b/templates/provider/hmc/templates/crds/hmc.mirantis.com_clusterdeployments.yaml @@ -78,62 +78,6 @@ spec: serviceSpec: description: ServiceSpec is spec related to deployment of services. properties: - policyRefs: - description: |- - PolicyRefs is a list of kubernetes resources that need to be deployed in matching clusters. - These resources may contain static values or leverage Go templates for dynamic customization. - When expressed as templates, the values are rendered using data from resources - (like Cluster & TemplateResourceRefs) within the management cluster before deployement. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: |- - Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array priority: default: 100 description: |- diff --git a/templates/provider/hmc/templates/crds/hmc.mirantis.com_multiclusterservices.yaml b/templates/provider/hmc/templates/crds/hmc.mirantis.com_multiclusterservices.yaml index 17c9f91a..7a4310ef 100644 --- a/templates/provider/hmc/templates/crds/hmc.mirantis.com_multiclusterservices.yaml +++ b/templates/provider/hmc/templates/crds/hmc.mirantis.com_multiclusterservices.yaml @@ -90,62 +90,6 @@ spec: serviceSpec: description: ServiceSpec is spec related to deployment of services. properties: - policyRefs: - description: |- - PolicyRefs is a list of kubernetes resources that need to be deployed in matching clusters. - These resources may contain static values or leverage Go templates for dynamic customization. - When expressed as templates, the values are rendered using data from resources - (like Cluster & TemplateResourceRefs) within the management cluster before deployement. - items: - properties: - deploymentType: - default: Remote - description: |- - DeploymentType indicates whether resources need to be deployed - into the management cluster (local) or the managed cluster (remote) - enum: - - Local - - Remote - type: string - kind: - description: |- - Kind of the resource. Supported kinds are: - - ConfigMap/Secret - - flux GitRepository;OCIRepository;Bucket - enum: - - GitRepository - - OCIRepository - - Bucket - - ConfigMap - - Secret - type: string - name: - description: |- - Name of the referenced resource. - Name can be expressed as a template and instantiate using - - cluster namespace: .Cluster.metadata.namespace - - cluster name: .Cluster.metadata.name - - cluster type: .Cluster.kind - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - For ClusterProfile namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - For Profile namespace must be left empty. Profile namespace will be used. - type: string - path: - description: |- - Path to the directory containing the YAML files. - Defaults to 'None', which translates to the root path of the SourceRef. - Used only for GitRepository;OCIRepository;Bucket - type: string - required: - - kind - - name - type: object - type: array priority: default: 100 description: |-