-
Notifications
You must be signed in to change notification settings - Fork 917
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
Align federated GitRepository's observedGeneration semantics with its native #5086
Conversation
Signed-off-by: yike21 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5086 +/- ##
=========================================
Coverage ? 28.21%
=========================================
Files ? 632
Lines ? 43551
Branches ? 0
=========================================
Hits ? 12289
Misses ? 30365
Partials ? 897
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Use karmadactl interpret to view test results: ## Execute the statusAggregation rule
$ karmadactl interpret -f customizations.yaml --operation aggregateStatus --desired-file testdata/desired-gitrepository.yaml --status-file testdata/status-file.yaml
---
# [1/1] aggregatedStatus:
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
generation: 1
name: sample
namespace: test-gitrepository
spec:
interval: 30s
ref:
branch: master
url: https://github.com/stefanprodan/podinfo
status:
artifact:
digest: sha256:a375b2ca68275734e3850d3c80e0bc20c1d7a4daa1a9717056d5c0c563ea0719
lastUpdateTime: "2023-05-01T10:17:08Z"
path: gitrepository/test-gitrepository/sample/0647aea75b85755411b007a290b9321668370be5.tar.gz
revision: master@sha1:0647aea75b85755411b007a290b9321668370be5
size: 83516
url: http://source-controller.flux-system.svc.cluster.local./gitrepository/test-gitrepository/sample/0647aea75b85755411b007a290b9321668370be5.tar.gz
conditions:
- lastTransitionTime: "2023-05-01T10:17:09Z"
message: member1=stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5', member3=stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5'
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
- lastTransitionTime: "2023-05-01T10:17:09Z"
message: member1=stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5', member3=stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5'
observedGeneration: 1
reason: Succeeded
status: "True"
type: ArtifactInStorage
observedGeneration: 1
## Execute the statusReflection rule
$ karmadactl interpret -f customizations.yaml --operation interpretStatus --observed-file testdata/observed-gitrepository.yaml
---
# [1/1] status:
artifact:
digest: sha256:a375b2ca68275734e3850d3c80e0bc20c1d7a4daa1a9717056d5c0c563ea0719
lastUpdateTime: "2023-05-01T10:17:09Z"
path: gitrepository/test-gitrepository/sample/0647aea75b85755411b007a290b9321668370be5.tar.gz
revision: master@sha1:0647aea75b85755411b007a290b9321668370be5
size: 83516
url: http://source-controller.flux-system.svc.cluster.local./gitrepository/test-gitrepository/sample/0647aea75b85755411b007a290b9321668370be5.tar.gz
conditions:
- lastTransitionTime: "2023-05-01T10:17:09Z"
message: stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5'
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
- lastTransitionTime: "2023-05-01T10:17:09Z"
message: stored artifact for revision 'master@sha1:0647aea75b85755411b007a290b9321668370be5'
observedGeneration: 1
reason: Succeeded
status: "True"
type: ArtifactInStorage
generation: 1
observedGeneration: 1
resourceTemplateGeneration: 1
|
/lgtm |
@veophi: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 feature
What this PR does / why we need it:
Part of #4870
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE