Skip to content
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 an example for examples/karmadactlinterpret/README.md #3412

Merged

Conversation

yike21
Copy link
Member

@yike21 yike21 commented Apr 15, 2023

What type of PR is this?
/kind documentation

What this PR does / why we need it:
If the documents are updated, users can more easily find the karmadactl interpret --operation ReviseReplica section.
And it updates the example resourceinterpretercustomization with kube lib for building dependencyInterpretation lua.

Which issue(s) this PR fixes:
Part of #3401

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
NONE


@karmada-bot karmada-bot added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 15, 2023
@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2023

Codecov Report

Merging #3412 (c138113) into master (4552a19) will not change coverage.
The diff coverage is n/a.

📣 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    #3412   +/-   ##
=======================================
  Coverage   51.79%   51.79%           
=======================================
  Files         210      210           
  Lines       18926    18926           
=======================================
  Hits         9803     9803           
  Misses       8581     8581           
  Partials      542      542           
Flag Coverage Δ
unittests 51.79% <ø> (ø)

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.

@yike21 yike21 force-pushed the update-document-for-karmadactlinterpret branch from e554260 to 5360ee6 Compare April 15, 2023 12:25
@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 15, 2023
@yike21
Copy link
Member Author

yike21 commented Apr 15, 2023

The test report for the changed command line example is below:
Note that karmadactl needs to be based on the latest kube library, so reproducing the test results needs make karmadactl.

byk@debian:~/go/src/karmada/examples/karmadactlinterpret$ karmadactl interpret -f resourceinterpretercustomization.yaml --observed-file observed-deploy-nginx.yaml --operation InterpretReplica
I0415 20:25:56.432665 3100367 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"}
I0415 20:25:56.432877 3100367 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"}
I0415 20:25:56.446111 3100367 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"}
I0415 20:25:56.446283 3100367 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/2] replica:
3
---
# [2/2] requires:
nodeClaim:
    nodeSelector:
        foo: bar
resourceRequest:
    cpu: 100m
byk@debian:~/go/src/karmada/examples/karmadactlinterpret$ karmadactl interpret -f resourceinterpretercustomization.yaml --desired-replica 4 --observed-file observed-deploy-nginx.yaml --operation ReviseReplica
I0415 20:26:29.702143 3100535 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"}
I0415 20:26:29.702302 3100535 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"}
I0415 20:26:29.711703 3100535 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"}
I0415 20:26:29.711807 3100535 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] revised:
apiVersion: apps/v1
kind: Deployment
metadata:
    labels:
        app: nginx
    name: nginx
spec:
    paused: true
    replicas: 4
    selector:
        matchLabels:
            app: nginx
    template:
        metadata:
            labels:
                app: nginx
        spec:
            containers:
                - image: nginx
                  name: nginx
                  resources:
                    limits:
                        cpu: 100m
            nodeSelector:
                foo: bar
status:
    availableReplicas: 2
    observedGeneration: 1
    readyReplicas: 2
    replicas: 2
    updatedReplicas: 2
byk@debian:~/go/src/karmada/examples/karmadactlinterpret$ karmadactl interpret -f resourceinterpretercustomization.yaml --desired-file desired-deploy-nginx.yaml --operation InterpretDependency
I0415 20:26:39.412179 3100610 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"}
I0415 20:26:39.412294 3100610 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"}
I0415 20:26:39.419204 3100610 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"}
I0415 20:26:39.419301 3100610 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: ServiceAccount
  name: test-sa
  namespace: default

@Poor12
Copy link
Member

Poor12 commented Apr 17, 2023

Occasional E2E error tracked by #3381.
/cc @RainbowMango to retest.

update the example resourceinterpretercustomization with kube lib for building dependencyInterpretation

Signed-off-by: yike21 <yike21@qq.com>
@yike21 yike21 force-pushed the update-document-for-karmadactlinterpret branch from 5360ee6 to c138113 Compare April 17, 2023 05:12
@Poor12
Copy link
Member

Poor12 commented Apr 17, 2023

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2023
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@karmada-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2023
@karmada-bot karmada-bot merged commit 6687479 into karmada-io:master Apr 17, 2023
@yike21 yike21 deleted the update-document-for-karmadactlinterpret branch April 17, 2023 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants