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

Enable reading workflows from multiple namespaces in tink-server #969

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

willemm
Copy link

@willemm willemm commented Aug 1, 2024

Description

Removes the default setting where not specifying the kubernetes-namespace defaults it to whatever namespace the controller is running in, and changes the workflowID to namespace/name so it can find the workflows

Why is this needed

tinkerbell/cluster-api-provider-tinkerbell#385

With this change, you can create hardware and workflow resources in different namespaces.

Fixes: #

How Has This Been Tested?

We have a cluster-api setup where we're adding some bare metal nodes to a cluster.
With this change, the workflows that previously only worked from the tink-system namespace now also work from a different namespace. I also tested the old working setup and that still works as well.
The change is minimal, so it shouldn't impact much.
I haven't tested if the --kube-namespace setting would restrict it to one namespace again.

How are existing users impacted? What migration steps/scripts do we need?

No migration steps are needed, unless users have multiple instances of tink-server running in different namespaces, or have another reason why they specifically don't want resources in a different namespace to be picked up.

This could probably be avoided by having the helm chart add the kube-namespace argument to the deployment and have it pull the value from the downward api somehow, but it seems to me that having it default to looking at all namespaces would be preferrable for most users.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 28.04%. Comparing base (a3d4371) to head (d5737e5).
Report is 11 commits behind head on main.

Files Patch % Lines
internal/server/kubernetes_api_workflow.go 0.00% 6 Missing ⚠️
internal/server/kubernetes_api.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #969      +/-   ##
==========================================
+ Coverage   28.00%   28.04%   +0.04%     
==========================================
  Files          70       70              
  Lines        3489     3484       -5     
==========================================
  Hits          977      977              
+ Misses       2450     2445       -5     
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Aug 13, 2024
Willem Monsuwe and others added 3 commits August 13, 2024 09:07
- also change msg for clarity in test below (avoid duplicates)

Signed-off-by: Ricardo Pardini <[email protected]>
@mergify mergify bot merged commit 3d8f7d2 into tinkerbell:main Aug 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants