-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(kubernetes): Add support for excluding event loading on manifest… #3796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great change, thanks for this! I added a few inline comments---the biggest being that I think this will be simpler if we just support a single version of each call on the interface:
getManifest
which requires passing ininlcudeEvents
(as you've done, so just removing the old signature and updating the one place it's used)getClusterAndSortAscending
which never returns events
clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/ManifestProvider.java
Outdated
Show resolved
Hide resolved
clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/ManifestProvider.java
Show resolved
Hide resolved
...nnaker/clouddriver/kubernetes/v2/caching/view/provider/KubernetesV2LiveManifestProvider.java
Outdated
Show resolved
Hide resolved
.../spinnaker/clouddriver/kubernetes/v2/caching/view/provider/KubernetesV2ManifestProvider.java
Outdated
Show resolved
Hide resolved
...er-web/src/main/groovy/com/netflix/spinnaker/clouddriver/controllers/ManifestController.java
Show resolved
Hide resolved
Thanks for the review Eric! Addressed your comments, I agree with simplifying the number of APIs - I was just initially a little worried and wanted to do it in a super passive way so I didn't inadvertently break anything. Only thing I wanted to be sure of was the change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Yes, that's exactly what I meant for getDynamicManifestFromCluster
. I'm not sure I see a use case for us ever needing events from that function, so it seems easier to just remove them entirely and if such a use case does arise whoever needs them can add a boolean to that function too.
#2997) * feat(kubernetes): Skip loading events for manifest retrieval in WaitForManifestStableTask * Account for changes from spinnaker/clouddriver#3796
…s retrieval
This change allows optionally skipping kubernetes event retrieval when retrieving manifests.
When live manifest mode is enabled, scenarios that result in a lot of manifests being loaded will put a lot of extra pressure on the kubernetes API server due to event loading.
Specifically, we ran into this scenario when we had a lot of deployment pipelines running concurrently, and each deployment involved a decent number of manifests (~30). In Orca, the WaitForManifestStableTask (when live manifest mode is enabled) iterates through the manifests involved in the deployment and calls the retrieve manifest API for each one, which causes a lot of full event loads to occur, which tanks (in our case) the kubernetes API server. However, WaitForManifestStableTask does not actually need any event information to do its job, so in that particular case we can skip loading events entirely.
See spinnaker/orca#2997 for the corresponding Orca change.