Commit 4db50cb
authored
(feat) support remote YAML sources in PolicyRefs (#1721)
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
```1 parent 967860f commit 4db50cb
14 files changed
Lines changed: 1169 additions & 77 deletions
File tree
- api/v1beta1
- config/crd/bases
- controllers
- manifest
- test/fv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
| 621 | + | |
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
624 | 626 | | |
625 | | - | |
626 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
627 | 630 | | |
628 | 631 | | |
629 | 632 | | |
630 | 633 | | |
| 634 | + | |
631 | 635 | | |
632 | | - | |
| 636 | + | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
| |||
671 | 676 | | |
672 | 677 | | |
673 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
674 | 713 | | |
675 | 714 | | |
676 | 715 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 52 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
980 | 981 | | |
981 | 982 | | |
982 | 983 | | |
| |||
988 | 989 | | |
989 | 990 | | |
990 | 991 | | |
991 | | - | |
| 992 | + | |
992 | 993 | | |
993 | 994 | | |
994 | 995 | | |
| |||
997 | 998 | | |
998 | 999 | | |
999 | 1000 | | |
| 1001 | + | |
1000 | 1002 | | |
1001 | 1003 | | |
1002 | 1004 | | |
| |||
1011 | 1013 | | |
1012 | 1014 | | |
1013 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1014 | 1062 | | |
1015 | 1063 | | |
1016 | 1064 | | |
| |||
1034 | 1082 | | |
1035 | 1083 | | |
1036 | 1084 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1041 | 1089 | | |
1042 | 1090 | | |
1043 | 1091 | | |
| |||
0 commit comments