Skip to content

Commit

Permalink
Removed PolicyRefs
Browse files Browse the repository at this point in the history
  • Loading branch information
wahabmk committed Jan 6, 2025
1 parent 86099a9 commit 31c8236
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 126 deletions.
5 changes: 0 additions & 5 deletions api/v1alpha1/multiclusterservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/controller/clusterdeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
1 change: 0 additions & 1 deletion internal/controller/multiclusterservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 0 additions & 2 deletions internal/sveltos/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ type ReconcileProfileOpts struct {
LabelSelector metav1.LabelSelector
HelmChartOpts []HelmChartOpts
TemplateResourceRefs []sveltosv1beta1.TemplateResourceRef
PolicyRefs []sveltosv1beta1.PolicyRef
Priority int32
StopOnConflict bool
Reload bool
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down

0 comments on commit 31c8236

Please sign in to comment.