-
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 apps.krusie.io/v1alpha1/DaemonSet #3358
add customizations for apps.krusie.io/v1alpha1/DaemonSet #3358
Conversation
ce9584b
to
48c2e6b
Compare
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 #3358 +/- ##
=======================================
Coverage 51.64% 51.64%
=======================================
Files 210 210
Lines 18926 18926
=======================================
Hits 9775 9775
Misses 8620 8620
Partials 531 531
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
status.daemonSetHash = observedObj.status.daemonSetHash | ||
return status | ||
end | ||
healthInterpretation: |
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.
The healthInterpretation
rule for daemonset.apps.kruise.io
is a reference to the code in pkg/resourceinterpreter/default/native/healthy.go corresponding to native daemonset. The idea is changed from "determine what is healthy" to "determine what is unhealthy/illegal". It allows a member cluster to be considered healthy when the pod is not fully ready, and to be aggregated.
63ea28a
to
2e0d448
Compare
The test report based on ### Check the customizations in file
byk@debian:~/go/src/karmada/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/DaemonSet$ karmadactl interpret -f customizations.yaml --check
I0413 23:38:50.698903 2877496 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"}
I0413 23:38:50.699064 2877496 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"}
I0413 23:38:50.708950 2877496 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"}
I0413 23:38:50.709085 2877496 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-daemonset
TARGET: apps.kruise.io/v1alpha1 DaemonSet
RULERS:
Retain: UNSET
InterpretReplica: UNSET
ReviseReplica: UNSET
InterpretStatus: PASS
AggregateStatus: PASS
InterpretHealth: PASS
InterpretDependency: PASS
### Execute the statusReflection rule
byk@debian:~/go/src/karmada/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/DaemonSet$ karmadactl interpret -f customizations.yaml --operation interpretStatus --observed-file testdata/observed-daemonset-nginx.yaml
I0413 23:39:07.022272 2877557 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"}
I0413 23:39:07.022430 2877557 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"}
I0413 23:39:07.032730 2877557 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"}
I0413 23:39:07.033008 2877557 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:
currentNumberScheduled: 1
daemonSetHash: 7dd59cf749
desiredNumberScheduled: 1
numberAvailable: 1
numberMisscheduled: 0
numberReady: 1
observedGeneration: 1
updatedNumberScheduled: 1
### Execute the healthInterpretation rule
byk@debian:~/go/src/karmada/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/DaemonSet$ karmadactl interpret -f customizations.yaml --operation interpretHealth --observed-file testdata/observed-daemonset-nginx.yaml
I0413 23:39:12.897887 2877596 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"}
I0413 23:39:12.898102 2877596 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"}
I0413 23:39:12.913925 2877596 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"}
I0413 23:39:12.914133 2877596 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
byk@debian:~/go/src/karmada/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/DaemonSet$ karmadactl interpret -f customizations.yaml --operation interpretDependency --observed-file testdata/observed-daemonset-nginx.yaml
I0413 23:39:33.320548 2877621 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"}
I0413 23:39:33.320732 2877621 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"}
I0413 23:39:33.332483 2877621 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"}
I0413 23:39:33.332623 2877621 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: ConfigMap
name: my-sample-config
namespace: test-kruise-daemonset
- apiVersion: v1
kind: ConfigMap
name: mysql-config
namespace: test-kruise-daemonset
### Execute the statusAggregation rule
byk@debian:~/go/src/karmada/pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/apps.kruise.io/v1alpha1/DaemonSet$ karmadactl interpret -f customizations.yaml --operation aggregateStatus --observed-file testdata/observed-daemonset-nginx.yaml --status-file testdata/status-file.yaml
I0413 23:40:04.475707 2877671 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"}
I0413 23:40:04.475969 2877671 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"}
I0413 23:40:04.490717 2877671 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"}
I0413 23:40:04.490849 2877671 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: apps.kruise.io/v1alpha1
kind: DaemonSet
metadata:
generation: 1
labels:
app: sample-daemonset
name: sample
namespace: test-kruise-daemonset
spec:
selector:
matchLabels:
app: sample-daemonset
template:
metadata:
labels:
app: sample-daemonset
spec:
containers:
- env:
- name: logData
valueFrom:
configMapKeyRef:
key: log
name: mysql-config
- name: lowerData
valueFrom:
configMapKeyRef:
key: lower
name: mysql-config
image: nginx:alpine
name: nginx
volumes:
- configMap:
name: my-sample-config
name: configmap
status:
currentNumberScheduled: 2
daemonSetHash: 7dd59cf749
desiredNumberScheduled: 2
numberAvailable: 2
numberMisscheduled: 0
numberReady: 2
numberUnavailable: 0
observedGeneration: 1
updatedNumberScheduled: 2
|
Signed-off-by: yike21 <yike21@qq.com>
2e0d448
to
f051591
Compare
/lgtm |
[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
apps.krusie.io/v1alpha1/DaemonSet
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