8000 [Controller] Enrich probes during populate deployment container by weilerN · Pull Request #3653 · nuclio/nuclio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Controller] Enrich probes during populate deployment container #3653

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

Merged
merged 4 commits into from
Jun 3, 2025

Conversation

weilerN
Copy link
Collaborator
@weilerN weilerN commented Jun 1, 2025

Motivation

Described in the ticket - https://iguazio.atlassian.net/browse/NUC-447

Root Cause

  1. Function created with controller version < 1.14.5 (i.e. - the function doesn't have spec.ReadinessProbe).
  2. Upgrading controller's version
  3. When the controller reach the populateDeployment it tries to reach the spec.ReadinessProbe, which is nil

Description

In this PR, the code changes are basically adding the probes enrichment the same way that were done here.
This enrichment ensures backward compatibility for functions created with controller versions < v1.14.5.

Affected Areas

Nuclio-controller

Testing

  • unit test coverage
  • Manual test of the fix

Changes Made

  • Added the enrichment logic to the controller's population logic

Additional Notes

It seems that every controller upgrade triggers an unnecessary CreateOrUpdate call per function.
This doesn't affect running pods, as the final K8s request is ignored when the deployment hasn't changed.
Further investigation is needed.

@weilerN weilerN requested review from rokatyy and TomerShor June 1, 2025 10:12
@weilerN weilerN marked this pull request as ready for review June 1, 2025 11:44
Copy link
Contributor
@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

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

Minor comment

Comment on lines 2507 to 2508
// enrichment ensures backward compatibility for functions created with controller versions < v1.14.5, where probes may be nil
common.EnrichProbe(&function.Spec.LivenessProbe, defaultPlatformConfiguration.Kube.DefaultLivenessProbe)
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid duplicating the comment, and do the enrichment for both probes one after the other (meaning, move this to line 2494)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed here - f433791

Copy link
Contributor
@rokatyy rokatyy left a comment

Choose a reason for hiding this comment

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

I agree with @TomerShor comment about moving probes enrichment up to have it togeth 8000 er and only then set the values.

Otherwise, looks good to me!

@weilerN weilerN requested a review from TomerShor June 3, 2025 07:18
@TomerShor TomerShor merged commit 0c3f3ff into nuclio:development Jun 3, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully mergin 3984 g this pull request may close these issues.

3 participants
0