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

schedule-migration: fix dns scope && container name #2261

Merged
merged 2 commits into from
Sep 9, 2021
Merged

Conversation

WangXiangUSTC
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC commented Aug 30, 2021

Signed-off-by: xiang xiang13225080@163.com

What problem does this PR solve?

Issue Number: close #2256

Problem Summary:

  1. DNSChaos: 'scope' is obsolete in v2.0
  2. the origin containerName is not deleted in spec, and the containerNames is under a wrong place, below is an example:
apiVersion: chaos-mesh.org/v1alpha1
kind: Schedule
metadata:
  name: container-kill-example
  namespace: chaos-testing
spec:
  schedule: '@every 30s'
  type: PodChaos
  historyLimit: 5
  concurrencyPolicy: Forbid
  podChaos:
    action: container-kill
    mode: one
    containerName: busybox
    selector:
      labelSelectors:
        app: busybox
  containerNames:
  - busybox

What is changed and how it works?

What's Changed:

  1. DNSChaos: when scope is all, transform to pattern *. Otherwise, exit with error
  2. fix wrong containerNames

Related changes

  • PR to update chaos-mesh/website/chaos-mesh/website-zh:
  • Need to update Chaos Dashboard component, related issue:
  • Need to cheery-pick to the release branch

Checklist

Tests

  • Unit test
  • E2E test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Breaking backward compatibility

Release note

Please add a release note.
If you don't think this PR needs a release note then fill it with None.

Signed-off-by: xiang <xiang13225080@163.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 30, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • YangKeao
  • fewdan

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@codecov-commenter
Copy link

Codecov Report

Merging #2261 (a334c2c) into master (7e9ff3f) will decrease coverage by 15.08%.
The diff coverage is 37.48%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2261       +/-   ##
===========================================
- Coverage   55.78%   40.69%   -15.09%     
===========================================
  Files          68      127       +59     
  Lines        4383     8295     +3912     
===========================================
+ Hits         2445     3376      +931     
- Misses       1768     4588     +2820     
- Partials      170      331      +161     
Impacted Files Coverage Δ
api/v1alpha1/awschaos_types.go 0.00% <0.00%> (ø)
api/v1alpha1/dnschaos_type.go 0.00% <0.00%> (ø)
api/v1alpha1/gcpchaos_types.go 0.00% <0.00%> (ø)
api/v1alpha1/httpchaos_types.go 0.00% <0.00%> (ø)
api/v1alpha1/iochaos_types.go 0.00% <0.00%> (-40.00%) ⬇️
api/v1alpha1/jvmchaos_webhook.go 0.00% <0.00%> (ø)
api/v1alpha1/kernelchaos_types.go 0.00% <0.00%> (-20.00%) ⬇️
api/v1alpha1/kinds.go 19.04% <0.00%> (-7.62%) ⬇️
api/v1alpha1/networkchaos_types.go 0.00% <0.00%> (-22.99%) ⬇️
api/v1alpha1/podchaos_types.go 0.00% <0.00%> (-37.15%) ⬇️
... and 187 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25db3b4...a334c2c. Read the comment docs.

Copy link
Member

@fewdan fewdan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@YangKeao
Copy link
Member

YangKeao commented Sep 9, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a334c2c

@ti-srebot
Copy link
Contributor

cherry pick to release-2.0 in PR #2288

ti-chi-bot pushed a commit that referenced this pull request Sep 9, 2021
Signed-off-by: xiang <xiang13225080@163.com>

Co-authored-by: xiang <xiang13225080@163.com>
@g1eny0ung g1eny0ung deleted the migration-fix branch August 4, 2022 08:45
@g1eny0ung g1eny0ung restored the migration-fix branch August 4, 2022 08:45
@g1eny0ung g1eny0ung deleted the migration-fix branch August 4, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration of PodChaos and DNSChaos to v2.0.1
7 participants