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

feat(k8s): copy node topology labels #9690

Merged
merged 5 commits into from Mar 21, 2024
Merged

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Mar 21, 2024

Checklist prior to review

I've decided not to react on the Node change event so far, we can introduce it and react on the update of the node's labels but my thinking was that mostly nodes have labels set during provisioning.

  • Link to relevant issue as well as docs and UI issues -- fix: Propagate k8s node topology related labels to Dataplane #9242
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as an image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi requested a review from a team as a code owner March 21, 2024 14:35
@lukidzi lukidzi requested review from jijiechen, jakubdyszkiewicz and bartsmykla and removed request for a team March 21, 2024 14:35
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Nice. I'd also add a random label to pkg/plugins/runtime/k8s/controllers/testdata/26.node.yaml just to see that we don't copy unnecessary labels

@lukidzi
Copy link
Contributor Author

lukidzi commented Mar 21, 2024

Test is failing but it's not related to the change:

github.com/kumahq/kuma/pkg/mads/server/server_test.go:97
  Timeline >>
  2024-03-21T16:59:42Z	INFO	mads-server	MADS v1 is enabled
  2024-03-21T16:59:42Z	INFO	mads-server	starting server	{"tls": false, "interface": ":39829"}
  [FAILED] in [It] - github.com/kumahq/kuma/pkg/mads/server/server_test.go:124 @ 03/21/24 16:59:42.213
  2024-03-21T16:59:42Z	INFO	mads-server	stopping gracefully
  2024-03-21T16:59:42Z	INFO	mads-server	shutting down server	{"tls": false, "interface": ":39829"}
  << Timeline
  [FAILED] Unexpected error:
      <*url.Error | 0xc0009c56b0>: 
      Post "http://127.0.0.1:39829/v3/discovery:monitoringassignments": dial tcp 127.0.0.1:39829: connect: connection refused
      {
          Op: "Post",
          URL: "http://127.0.0.1:39829/v3/discovery:monitoringassignments",
          Err: <*net.OpError | 0xc000a18000>{
              Op: "dial",
              Net: "tcp",
              Source: nil,
              Addr: <*net.TCPAddr | 0xc0009c5230>{
                  IP: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1],
                  Port: 39829,
                  Zone: "",
              },
              Err: <*os.SyscallError | 0xc000833660>{
                  Syscall: "connect",
                  Err: <syscall.Errno>0x6f,
              },
          },
      }
  occurred
  In [It] at: github.com/kumahq/kuma/pkg/mads/server/server_test.go:124 @ 03/21/24 16:59:42.213
------------------------------
Summarizing 1 Failure:
  [FAIL] MADS Server [It] should serve HTTP/1.1 requests
  github.com/kumahq/kuma/pkg/mads/server/server_test.go:124
Ran 1 of 1 Specs in 0.008 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 0 Skipped
--- FAIL: TestMADSServer (0.01s)
FAIL
FAIL	github.com/kumahq/kuma/pkg/mads/server	0.464s

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi merged commit 4a54f52 into kumahq:master Mar 21, 2024
15 checks passed
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.

Propagate k8s node topology related labels to Dataplane
2 participants