-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add customizations for source.toolkit.fluxcd.io/v1beta2/HelmRepository #3484
add customizations for source.toolkit.fluxcd.io/v1beta2/HelmRepository #3484
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3484 +/- ##
==========================================
+ Coverage 53.61% 53.62% +0.01%
==========================================
Files 210 210
Lines 19182 19182
==========================================
+ Hits 10284 10287 +3
+ Misses 8345 8343 -2
+ Partials 553 552 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
3ea7a59
to
30d4ca4
Compare
The test report base on ### Check the customizations in file
$ karmadactl interpret -f customizations.yaml --check
I0501 18:53:12.946433 1144985 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:12.946616 1144985 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:12.956906 1144985 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:12.957029 1144985 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
-----------------------------------
SOURCE: declarative-configuration-helmrepository
TARGET: source.toolkit.fluxcd.io/v1beta2 HelmRepository
RULERS:
Retain: PASS
InterpretReplica: UNSET
ReviseReplica: UNSET
InterpretStatus: PASS
AggregateStatus: PASS
InterpretHealth: PASS
InterpretDependency: PASS
### Execute the retention rule
$ karmadactl interpret -f customizations.yaml --operation retain --desired-file testdata/desired-helmrepository.yaml --observed-file testdata/observed-helmrepository.yaml
I0501 18:53:27.228812 1145158 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:27.228970 1145158 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:27.238852 1145158 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:27.239414 1145158 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
---
# [1/1] retained:
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: podinfo
namespace: test-helmrepository
spec:
interval: 5m0s
secretRef:
name: fake-secret
suspend: true
url: https://stefanprodan.github.io/podinfo
### Execute the statusReflection rule
$ karmadactl interpret -f customizations.yaml --operation interpretStatus --observed-file testdata/observed-helmrepository.yaml
I0501 18:53:52.960276 1145510 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:52.960431 1145510 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:52.971079 1145510 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:53:52.971191 1145510 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
---
# [1/1] status:
artifact:
digest: sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69
lastUpdateTime: "2023-04-29T09:30:31Z"
path: helmrepository/test-helmrepository/sample/index-61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69.yaml
revision: sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69
size: 42012
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/test-helmrepository/sample/index-61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69.yaml
conditions:
- lastTransitionTime: "2023-04-29T09:30:31Z"
message: 'stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'''
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
- lastTransitionTime: "2023-04-29T09:30:31Z"
message: 'stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'''
observedGeneration: 1
reason: Succeeded
status: "True"
type: ArtifactInStorage
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/test-helmrepository/sample/index.yaml
### Execute the healthInterpretation rule
$ karmadactl interpret -f customizations.yaml --operation interpretHealth --observed-file testdata/observed-helmrepository.yaml
I0501 18:54:15.642907 1145808 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:15.643135 1145808 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:15.656144 1145808 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:15.656310 1145808 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
---
# [1/1] healthy:
true
### Execute the dependencyInterpretation rule
$ karmadactl interpret -f customizations.yaml --operation interpretDependency --observed-file testdata/observed-helmrepository.yaml
I0501 18:54:35.520763 1146063 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:35.520938 1146063 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:35.531258 1146063 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:35.531512 1146063 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
---
# [1/1] dependencies:
- apiVersion: v1
kind: Secret
name: fake-secret
namespace: test-helmrepository
### Execute the statusAggregation rule
$ karmadactl interpret -f customizations.yaml --operation aggregateStatus --observed-file testdata/observed-helmrepository.yaml --status-file testdata/status-file.yaml
I0501 18:54:50.216716 1146292 deploy.go:75] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:50.216905 1146292 enable_option.go:63] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:50.226450 1146292 cmdinit.go:149] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
I0501 18:54:50.226557 1146292 register.go:160] No default release version found. build version: version.Info{GitVersion:"", GitCommit:"c8720e81c7f4badb2a2e07ed7218391b3ea7d912", GitTreeState:"dirty", BuildDate:"2023-04-12T09:43:27Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
---
# [1/1] aggregatedStatus:
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: podinfo
namespace: test-helmrepository
spec:
interval: 5m0s
provider: generic
secretRef:
name: fake-secret
suspend: true
timeout: 60s
url: https://stefanprodan.github.io/podinfo
status:
artifact:
digest: sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69
lastUpdateTime: "2023-04-29T09:30:33Z"
path: helmrepository/test-helmrepository/sample/index-61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69.yaml
revision: sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69
size: 42012
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/test-helmrepository/sample/index-61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69.yaml
conditions:
- lastTransitionTime: "2023-04-29T09:30:31Z"
message: 'member1=stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'', member3=stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'''
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
- lastTransitionTime: "2023-04-29T09:30:31Z"
message: 'member1=stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'', member3=stored artifact: revision ''sha256:61f94c20ee9417f222c3d30672724473ae50d406c8c097d80a8a6263c1384f69'''
observedGeneration: 1
reason: Succeeded
status: "True"
type: ArtifactInStorage
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/test-helmrepository/sample/index.yaml
|
30d4ca4
to
63f228b
Compare
Signed-off-by: yike21 <yike21@qq.com>
63f228b
to
22c8a24
Compare
It works well in my local env. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Poor12 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Add third-party resources source.toolkit.fluxcd.io/v1beta2/HelmRepository into Resource Interpreter framework.
Which issue(s) this PR fixes:
Part of #3331
Special notes for your reviewer:
@Poor12
Does this PR introduce a user-facing change?:
NONE