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

refactor(kube-api-rewriter): renaming before refactoring rewrites #153

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

diafour
Copy link
Member

@diafour diafour commented Jun 25, 2024

Description

NOTE: No significant changes in rewriters are made, except simple refactoring in some places:

  • Extract RewriteRoleRule for common code in validating, mutating, clusterrole and role.
  • Support @Root path for all transformers.

Main changes:

  • Move traversing methods to transform package.
  • Move rules related code to rules package.
  • Make rewriters one resource rewriters
  • Move ResourceOrList calls out of rewriters to rule_rewriter.go
  • Fix: enable rewrite for ServiceMonitorList.

Why do we need it, and what problem does it solve?

It is the first step in rewriters code optimization. Open a separate PR to reduce renaming noise in the next PRs.

What is the expected result?

Everything works as before, even bugs.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

NOTE: No significant changes in rewriters are made, except simple refactoring in some places:
- Extract RewriteRoleRule for common code in validating, mutating, clusterrole and role.
- Support @root path for all transformers.

Main changes:
- Move traversing methods to transform package.
- Move rules related code to rules package.
- Make rewriters one resource rewriters
- Move ResourceOrList calls out of rewriters to rule_rewriter.go
- Fix: enable rewrite for ServiceMonitorList.

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant