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

[Project] Filter invalid labels if creating project from leader request #3168

Merged

Conversation

TomerShor
Copy link
Contributor

@TomerShor TomerShor commented Feb 15, 2024

When a new project is created in the leader, it sends a POST request to Nuclio to create the project, instead of relying on Nuclio's synchronization mechanism.
Since currently the leaders allow for project labels that are invalid in k8s, we want to just ignore those labels when we receive a create project request from the leader.

Note: these labels are already filtered in the synchronization mechanism (see #2794).

In addition, some more improvements regarding this flow:

  • Move label filtering to the common k8s module.
  • Validate project labels to get a better traceback and failing early, instead of failing on the actual CRD creation.
  • Differentiate the Creating projects logs a bit for a better debugging experience.

Copy link
Contributor

@quaark quaark left a comment

Choose a reason for hiding this comment

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

LGTM

@TomerShor TomerShor merged commit 4d67f0d into nuclio:development Feb 15, 2024
11 checks passed
@TomerShor TomerShor deleted the bugfix/project-sync-filter-labels branch February 15, 2024 11:05
TomerShor added a commit to TomerShor/nuclio that referenced this pull request Feb 18, 2024
…st (nuclio#3168)

# Conflicts:
#	pkg/common/k8s.go
#	pkg/platform/abstract/platform.go
#	pkg/platform/kube/test/platform_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants