Skip to content

(feat) support remote YAML sources in PolicyRefs#1721

Open
gianlucam76 wants to merge 1 commit intoprojectsveltos:mainfrom
gianlucam76:remote-url
Open

(feat) support remote YAML sources in PolicyRefs#1721
gianlucam76 wants to merge 1 commit intoprojectsveltos:mainfrom
gianlucam76:remote-url

Conversation

@gianlucam76
Copy link
Copy Markdown
Member

@gianlucam76 gianlucam76 commented Apr 16, 2026

Add a url field to PolicyRef so ClusterProfile/Profile can reference YAML content served over HTTP/HTTPS, bypassing the ~1 MB ConfigMap size limit.

When url is set, Sveltos fetches the content on every reconciliation and redeploys if the hash has changed. A periodic requeue (default 5 minutes, configurable via interval) drives change detection without requiring a Kubernetes watch event.

Optional auth is supported via a secretRef pointing to a Secret with token, username+password or caFile keys. Set template: true to have the fetched content treated as a Go template, equivalent to the projectsveltos.io/template annotation on a ConfigMap.

  policyRefs:                                                                                                                                                                                                                                                                                                                                       
    - deploymentType: Remote                                                                                                                                                                                                                                                                                                                        
      remoteURL:                                                                                                                                                                                                                                                                                                                                    
        interval: 1h0m0s                                                                                                                                                                                                                                                                                                                            
        url: https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml 

Fixes 704
Fixes #576

Add a url field to PolicyRef so ClusterProfile/Profile can reference YAML content
served over HTTP/HTTPS, bypassing the ~1 MB ConfigMap size limit.

When url is set, Sveltos fetches the content on every reconciliation and redeploys
if the hash has changed. A periodic requeue (default 5 minutes, configurable via interval)
drives change detection without requiring a Kubernetes watch event.

Optional auth is supported via a secretRef pointing to a Secret with token, username+password
or caFile keys. Set template: true to have the fetched content treated as a Go template,
equivalent to the projectsveltos.io/template annotation on a ConfigMap.

```yaml
  policyRefs:
    - deploymentType: Remote
      remoteURL:
        interval: 1h0m0s
        url: https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support Remote YAML Sources in ClusterProfile FEATURE REQUEST: support for external yaml files

1 participant