Skip to content

Conversation

@msvik
Copy link
Owner

@msvik msvik commented Mar 25, 2021

Reason for Change:

Issue Fixed:

Requirements:

Notes:

@msvik msvik merged commit 8584bf4 into master Mar 25, 2021
msvik pushed a commit that referenced this pull request Apr 15, 2022
…ure#836)

* Junguk cho pod controller support (#1)

* code layout to support pod controller in npm

* filter events if they do not need to handle and clean up business logic

* put lock when it needs to access shared resource
use namespace/name as key
clean up functions

* - use pod key instead of uid.
- remove unnecessary error check

* use namespace prefix in pod namespace. add log messages to know what events happens.

* move event logs with more contexts in needsync func

* Put returning an error in a right place

* Return if the RV of both pod obj are the same. Proactively start cleaning up pod when the pod is deleted.

* first version of podController UT

* add ipset management in pod controller unit test

* Make methods flexible for ipset store and restore operation

* clean up functions and variables

Co-authored-by: Junguk Cho <jungukcho@microsoft.com>

* correct and clean functions and error messages. Return errors from appendNamedPortIpsets function to retry syncPod operation

* Check npmPod exists in cleanUpDeletedPod function. Use GetIPSetListFromLabels in syncAddedPod and cleanUpDeletedPod functions. Correct error messages, functions, etc

* Clean up podController code. Make podController UT more flexible.

* clean up appendNamedPortIpsets to improve readibility

* minor update (v1 -> corev1) for consistency

* clean up syncPod code to compare last applied states and new pod's states

* add validation for casting old pod. correct log message

* delete unneeded codes

* minor fix: correct comments and removed unneeded variables

* add pre-filter codes to avoid unnecessary reconcile process in updatePod event

* correct a comment

* check workqueue length to validate case where it does not need to reconcile in unit test
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.

3 participants