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: implicit memory aliasing violation #13

Merged
merged 16 commits into from
Dec 16, 2023

Conversation

b0m313
Copy link
Contributor

@b0m313 b0m313 commented Dec 13, 2023

Description

Fixes #12

Does this PR introduce a breaking change?

Checklist

  • PR title follows the <type>: <description> convention
  • I use conventional commits in my commit messages
  • I have updated the documentation accordingly
  • I Keep It Small and Simple: The smaller the PR is, the easier it is to review and have it merged
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional information for reviewer

Mention if this PR is part of any design or a continuation of previous PRs

  1. Reorganize the project structure in chore: Reorganize project structure to organize folders for operator code.
  2. Create controller code in feat: Update SecurityIntent and Add IntentBinding, defining CRDs for securityintent and securityintentbinding, and managing state for securityintentbinding.
  3. Modifiy Dockerfile, Makefile, and go.mod to match the changed folder structure in fix: invalid folder location
  4. Add watcher code in feat(general): Add intent & intentbinding watcher to detect intents and intent bindings within the general package.
  5. Add a binding mechanism in feat(general): Add binding mechanism to match intents with intentbindings.
  6. Update policy generation in feat(policy,utils): Update policy generation, adding direct creation of Cilium and Kubearmor policies using binding objects.
  7. Add resource cleanup feature in feat(cleanup): Add resource cleanup for intent bindings and associated policies.
  8. Add CRD-specific YAML files in feat: Add CRD-specific yaml to operationalize the securityintentbinding CRD.
  9. Add a network field definition in feat(CRD): Add Network field, which was initially omitted.
  10. Introduce a 'controllers' package in chore(controllers): Add package 'controllers' to rectify an oversight during code restructuring.
  11. Simplified log formats in chore: Simplify log formats to enhance clarity and readability in log outputs.
  12. Update tutorials and YAML documentation in docs: Update Tutorials and yaml to reflect code changes and validated functionality through a series of commands. Confirme that it actually works via make generate -> make install -> make run.

Fixed issues...

  1. Resolve Implicit Memory Aliasing in fix(cleanup): implicit memory aliasing violation, addressing the issue of implicit memory aliasing in loops within the cleanup package. Ensures each iteration of a loop has a unique copy of the iterated object, preventing potential errors in concurrent operations.
  2. Address Unused Constant in fix(policy): Comment out unused Finalizer constant, temporarily disabling the securityIntentFinalizer constant in the policy package. This change removes warnings about the unused variable while keeping it available for potential future use.
  3. Optimize Variable Declaration in fix(policy): Merge variable declaration, streamlining the code by merging the variable declaration with its assignment in the NetworkPolicyController.

@nyrahul
Copy link
Contributor

nyrahul commented Dec 14, 2023

@b0m313 , can you please resolve the conflicts and push the PR? Thanks

@b0m313
Copy link
Contributor Author

b0m313 commented Dec 15, 2023

Hi! @nyrahul , I resolve the conflict, please check it out. Thank u.

@nyrahul nyrahul merged commit c9d97d2 into 5GSEC:main Dec 16, 2023
4 checks passed
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.

2 participants