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

Fix/daemonset psp #3350

Closed

Conversation

stephen-harris
Copy link
Contributor

@stephen-harris stephen-harris commented Jun 10, 2022

What problem does this PR solve?

Close #3321

What's changed and how it works?

Relaxed the allowedHostPaths to allow the entire socket path directory to be mounted and to always allow /lib/modules to be mounted, as these are required by the chaos-daemon daemonset.

Related changes

  • Need to update chaos-mesh/website
  • Need to update Dashboard UI
  • Need to cheery-pick to release branches
    • release-2.2
    • release-2.1

Checklist

CHANGELOG

  • I have updated the CHANGELOG.md
  • I have labeled this PR with "no-need-update-changelog"

Tests

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

Side effects

  • Breaking backward compatibility

Release note

Please add a release note.

You can safely ignore this section if you don't think this PR needs a release note.

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 10, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • STRRL

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.

@ti-chi-bot
Copy link
Member

Welcome @stephen-harris!

It looks like this is your first PR to chaos-mesh/chaos-mesh 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to chaos-mesh/chaos-mesh. 😃

Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
@STRRL
Copy link
Member

STRRL commented Jun 13, 2022

Welcome @stephen-harris ! Thanks for your contribution!

Copy link
Member

@STRRL STRRL left a comment

Choose a reason for hiding this comment

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

LGTM!

@STRRL
Copy link
Member

STRRL commented Jun 13, 2022

/cc @xlgao-zju @YangKeao

@ti-chi-bot
Copy link
Member

@STRRL: GitHub didn't allow me to request PR reviews from the following users: xlgao-zju.

Note that only chaos-mesh members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @xlgao-zju @YangKeao

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/test-infra repository.

@@ -88,15 +88,15 @@ spec:
- IPC_LOCK
{{- end }}
allowedHostPaths:
- pathPrefix: {{ .Values.chaosDaemon.socketPath }}
- pathPrefix: {{ .Values.chaosDaemon.socketPath | dir }}
Copy link
Member

Choose a reason for hiding this comment

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

it would be better if we set allowedHostPaths according to this block of code:

https://github.com/chaos-mesh/chaos-mesh/blob/master/helm/chaos-mesh/templates/chaos-daemon-daemonset.yaml#L187-L200

Copy link
Member

Choose a reason for hiding this comment

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

Hi @stephen-harris , please take a look ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xlgao-zju I've moved the logic to a helper and used it in both the daemonset and psp

YangKeao and others added 6 commits June 23, 2022 16:28
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
…os-mesh#3359)

* add a comment to the flag size of memory size in the dashboard

Signed-off-by: FingerLeader <wanxfinger@gmail.com>

* update CHANGELOG.md

Signed-off-by: FingerLeader <wanxfinger@gmail.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
* update api

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

* generate byteman rule file for mysql

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

* minor fix

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

* add integration test

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

* fix ci

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

* address comment

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

* update comment

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

Co-authored-by: Zhou Zhiqiang <im@strrl.dev>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
* chore: artifact hub annotations

Signed-off-by: STRRL <im@strrl.dev>

* chore: append changelog

Signed-off-by: STRRL <im@strrl.dev>

* chore: also append maintainers and license

Signed-off-by: STRRL <im@strrl.dev>

Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: STRRL <im@strrl.dev>

Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
DaivikDave and others added 5 commits June 23, 2022 16:29
* removed global log from pkg/dashboard/store

Signed-off-by: Daivik <daivikdave229@gmail.com>

* Add logger to pkg/dashboard/store

Signed-off-by: Daivik <daivikdave229@gmail.com>

* chore: update changelog chaos-mesh#2880

Signed-off-by: Daivik <daivikdave229@gmail.com>

Co-authored-by: STRRL <im@strrl.dev>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: xianglingao <xianglingao@tencent.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
* renamed all occurances of chaos testing to chaos-mesh

Signed-off-by: kkulgawczuk <29754364+krystian-kulgawczuk@users.noreply.github.com>

* added namespace refactore to changed section

Signed-off-by: kkulgawczuk <29754364+krystian-kulgawczuk@users.noreply.github.com>

* rename namespace in hidden directories

Signed-off-by: kkulgawczuk <29754364+krystian-kulgawczuk@users.noreply.github.com>

* chore: update snap file

Signed-off-by: STRRL <im@strrl.dev>

Co-authored-by: STRRL <im@strrl.dev>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
* remove not used globalCacheReader

Signed-off-by: nio <nioshield@gmail.com>

* remove not used globalCacheReader

Signed-off-by: nio <nioshield@gmail.com>

* fix changlog error

Signed-off-by: nio <nioshield@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
Signed-off-by: Stephen Harris <stephen.harris1@kaluza.com>
@ti-chi-bot
Copy link
Member

@stephen-harris: PR needs rebase.

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/test-infra repository.

@stephen-harris
Copy link
Contributor Author

Going to re-open this PR since I've messed up the branch

@stephen-harris
Copy link
Contributor Author

#3390

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.

Pod Security Policy doesn't match Chaos Deamon's requirements