1121 Commits

Author SHA1 Message Date
Aaron U'Ren
a57a2261c6 feat(cni): add binaries to host when missing 2024-01-31 14:40:45 -06:00
Aaron U'Ren
98eea791d1 doc(user-guide.md): add info about traffic policies 2024-01-24 09:05:24 -08:00
Aaron U'Ren
fcd21b4759 feat: fully support service traffic policies
Adds support for spec.internalTrafficPolicy and fixes support for
spec.externalTrafficPolicy so that it only effects external traffic.

Keeps existing support for kube-router.io/service-local annotation which
overrides both to local when set to true. Any other value in this
annotation is ignored.
2024-01-24 09:05:24 -08:00
Aaron U'Ren
84042603b0 feat: increase unit test coverage
Prepare for upcoming changes by increasing unit test coverage to ensure
that we correctly handle different boundary conditions when we change
how service local / traffic policies work.
2024-01-24 09:05:24 -08:00
Aaron U'Ren
24505f03ae fact(service_endpoints_sync.go): standardize error handling 2024-01-24 09:05:24 -08:00
Aaron U'Ren
d3cf4d13a7 feat(NSC): add / clarify log messages 2024-01-24 09:05:24 -08:00
Aaron U'Ren
d757f49d55 feat(NSC): honor headless label
Abide the service.kubernetes.io/headless label as defined by the
upstream standard.

Resolves the failing e2e test:
should implement service.kubernetes.io/headless
2024-01-05 10:27:23 -06:00
Aaron U'Ren
8afdee87d9 fact(NSC): differentiate headless services
Differentiate headless services from ClusterIP being none, in
preparation for handling the service.kubernetes.io/headless label. One
might thing that handling these is similar, which it sort of is and sort
of isn't. ClusterIP is an immutable field, whereas labels are mutable.
This changes our handling of ClusterIP none-ness from the presence of
the headless label.

When we consider what to do with ClusterIP being none, that is
fundamentally different, because once it is None, the k8s API guarantees
that the service won't ever change.

Whereas the label can be added and removed.
2024-01-05 10:27:23 -06:00
Aaron U'Ren
30d37695d6 fact(NSC): update Errorf syntax 2024-01-05 10:27:23 -06:00
Aaron U'Ren
a0fe844a93 feat(NSC): honor service-proxy-name label
Abide the service.kubernetes.io/service-proxy-name label as defined by
the upstream standard here:
https://github.com/kubernetes-sigs/kpng/blob/master/doc/service-proxy.md#ignored-servicesendpoints

Resolves the failing e2e test:
should implement service.kubernetes.io/service-proxy-name

Fixes: #979
2024-01-05 10:27:23 -06:00
Aaron U'Ren
ced5102d99 feat(NSC): add IPVS service timeouts
This is a feature that has been requested a few times over the years and
would bring us closer to feature parity with other k8s network
implementations for service proxy.
2023-12-26 14:26:11 -06:00
dependabot[bot]
47290a7e61 build(deps): bump k8s.io/client-go from 0.28.3 to 0.28.4
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.3 to 0.28.4.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.3...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:17:49 +01:00
dependabot[bot]
27f2283baf build(deps): bump k8s.io/cri-api from 0.28.3 to 0.28.4
Bumps [k8s.io/cri-api](https://github.com/kubernetes/cri-api) from 0.28.3 to 0.28.4.
- [Commits](https://github.com/kubernetes/cri-api/compare/v0.28.3...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/cri-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:03:44 +01:00
dependabot[bot]
a6de8cb9ab build(deps): bump github.com/aws/aws-sdk-go from 1.48.10 to 1.48.16
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.48.10 to 1.48.16.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG_PENDING.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.48.10...v1.48.16)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:03:29 +01:00
Aaron U'Ren
eb462bae08 feat(linux_networking.go): add more error info
Direct people to a potentially missing hostPID attribute in their
kube-router deployment if they are getting a no such file or directory
message.
2023-12-08 17:01:48 -06:00
Aaron U'Ren
eb2628874c fix(manifests): add hostPID for hairpin
This is needed because #1582 which was recently merged relies upon
finding the correct veth interface via /proc/<pid> which isn't available
unless kube-router is in the same process namespace.

hostPID and hostIPC was always required for DSR functionality, but now
hostPID is needed for hairpin to be available.
2023-12-08 17:01:48 -06:00
Aaron U'Ren
aebaa48ea1 fix(NSC): handle endpoint slice ready nil
In some cases it is possible for Endpoint.Conditions.Ready to be nil
during the early stages of initialization. When this happens it causes
kube-router to segfault. This fix tests for nil before testing for
Ready.
2023-12-08 14:38:50 -06:00
Aaron U'Ren
0f3714b9b7 fix(hairpin): set hairpin_mode for veth iface
It used to be that the kubelet handled setting hairpin mode for us:
https://github.com/kubernetes/kubernetes/pull/13628

Then this functionality moved to the dockershim:
https://github.com/kubernetes/kubernetes/pull/62212

Then the functionality was removed entirely:
https://github.com/kubernetes/kubernetes/commit/83265c9171f

Unfortunately, it was lost that we ever depended on this in order for
our hairpin implementation to work, if we ever knew it at all.
Additionally, I suspect that containerd and cri-o implementations never
worked correctly with hairpinning.

Without this, the NAT rules that we implement for hairpinning don't work
correctly. Because hairpin_mode isn't implemented on the virtual
interface of the container on the host, the packet bubbles up to the
kube-bridge. At some point in the traffic flow, the route back to the
pod gets resolved to the mac address inside the container, at that
point, the packet's source mac and destination mac don't match the
kube-bridge interface and the packet is black-holed.

This can also be fixed by putting the kube-bridge interface into
promiscuous mode so that it accepts all mac addresses, but I think that
going back to the original functionality of enabling hairpin_mode on the
veth interface of the container is likely the lesser of two evils here
as putting the kube-bridge interface into promiscuous mode will likely
have unintentional consequences.
2023-12-07 12:44:51 -06:00
dependabot[bot]
3ea293d5e4 build(deps): bump github.com/aws/aws-sdk-go from 1.47.9 to 1.48.10
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.47.9 to 1.48.10.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.47.9...v1.48.10)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 14:44:14 +01:00
dependabot[bot]
4b863e90be build(deps): bump k8s.io/api from 0.28.3 to 0.28.4
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.28.3 to 0.28.4.
- [Commits](https://github.com/kubernetes/api/compare/v0.28.3...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 13:31:43 +01:00
dependabot[bot]
f575d31831 build(deps): bump github.com/osrg/gobgp/v3 from 3.20.0 to 3.21.0
Bumps [github.com/osrg/gobgp/v3](https://github.com/osrg/gobgp) from 3.20.0 to 3.21.0.
- [Release notes](https://github.com/osrg/gobgp/releases)
- [Changelog](https://github.com/osrg/gobgp/blob/master/.goreleaser.yml)
- [Commits](https://github.com/osrg/gobgp/compare/v3.20.0...v3.21.0)

---
updated-dependencies:
- dependency-name: github.com/osrg/gobgp/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 10:46:46 +01:00
dependabot[bot]
724588c6ba build(deps): bump golang.org/x/net from 0.18.0 to 0.19.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/net/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 10:46:27 +01:00
dependabot[bot]
448f8b6fe3 build(deps): bump github.com/aws/aws-sdk-go from 1.45.24 to 1.47.9
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.45.24 to 1.47.9.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.45.24...v1.47.9)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 14:55:27 +01:00
dependabot[bot]
0209ac5671 build(deps): bump google.golang.org/grpc from 1.58.3 to 1.59.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.3 to 1.59.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.3...v1.59.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 14:55:18 +01:00
dependabot[bot]
b00a997eca build(deps): bump github.com/onsi/gomega from 1.29.0 to 1.30.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 14:31:58 +01:00
dependabot[bot]
595d3e466c build(deps): bump golang.org/x/net from 0.17.0 to 0.18.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 14:31:47 +01:00
Jason Piper
fcf0ad913d prometheus metrics: add option to specify listen address
In the situation that you have multiple interfaces/IP addresses,
we want to be able to specify which one we want to expose the
prometheus metrics on.
2023-11-05 18:49:13 -06:00
dependabot[bot]
961c63b0fb build(deps): bump github.com/onsi/gomega from 1.27.10 to 1.29.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.10 to 1.29.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.27.10...v1.29.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 16:18:01 +01:00
dependabot[bot]
b13cedc524 build(deps): bump k8s.io/client-go from 0.28.2 to 0.28.3
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.2 to 0.28.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.2...v0.28.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 16:17:47 +01:00
dependabot[bot]
49314ab6eb build(deps): bump k8s.io/cri-api from 0.28.2 to 0.28.3
Bumps [k8s.io/cri-api](https://github.com/kubernetes/cri-api) from 0.28.2 to 0.28.3.
- [Commits](https://github.com/kubernetes/cri-api/compare/v0.28.2...v0.28.3)

---
updated-dependencies:
- dependency-name: k8s.io/cri-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 11:25:55 +01:00
dependabot[bot]
e0861fc949 build(deps): bump github.com/osrg/gobgp/v3 from 3.19.0 to 3.20.0
Bumps [github.com/osrg/gobgp/v3](https://github.com/osrg/gobgp) from 3.19.0 to 3.20.0.
- [Release notes](https://github.com/osrg/gobgp/releases)
- [Changelog](https://github.com/osrg/gobgp/blob/master/.goreleaser.yml)
- [Commits](https://github.com/osrg/gobgp/compare/v3.19.0...v3.20.0)

---
updated-dependencies:
- dependency-name: github.com/osrg/gobgp/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 11:25:43 +01:00
dependabot[bot]
44d8108818 build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.6+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v24.0.6...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 18:24:11 +01:00
Martin -nexus- Mlynář
66890d5f12 feat: Disable binding overlay tunnels to specific device 2023-10-30 08:05:26 -05:00
dependabot[bot]
f41defcea7 build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.2...v1.58.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 15:17:00 +02:00
Aaron U'Ren
9d6b647457
doc(user-guide): remove bootkube, add k3s
Bootkube has been deprecated upstream, so its likely a lot less relevant
than it used to be when this doc was created.

Add that k3s uses our network policy implementation.
2023-10-21 18:15:43 -05:00
Aaron U'Ren
e8be179e05
doc(RELEASE.md): add more information 2023-10-20 08:56:40 -05:00
Aaron U'Ren
a00778e788
feat(.goreleaser.yml): add prerelease and header to release 2023-10-20 08:30:23 -05:00
Aaron U'Ren
eb30de9183 lint: add markdownlint to linting 2023-10-19 18:22:35 -05:00
Aaron U'Ren
dad4991d85 doc: update and format all documentation 2023-10-19 18:22:35 -05:00
Aaron U'Ren
644268961a doc(user-guide.md): update formatting 2023-10-19 16:51:21 -05:00
Aaron U'Ren
dbd741a5b4 doc(introduction.md): update and format 2023-10-19 16:51:21 -05:00
Aaron U'Ren
43791045b6 doc(generic.md): update and format
Fixes: #1546
2023-10-19 16:51:21 -05:00
Aaron U'Ren
1957907b67 doc(kubeadm.md): update and format 2023-10-19 16:51:21 -05:00
Aaron U'Ren
95ac4b5a3e feat(version): add version message mechanism
This gives us an easy to use way to communicate with users for specific
version periods.

Fixes: #1555
2023-10-19 16:51:21 -05:00
Aaron U'Ren
4cd6d94826 fix(NSC): only run for enabled families
Don't run iptables or ipset logic for disabled families

Fixes #1558
2023-10-19 16:51:21 -05:00
dependabot[bot]
55f7eda797 build(deps): bump golang.org/x/net from 0.16.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 17:21:44 +02:00
Aaron U'Ren
190db3eff4 fix(Makefile): version and build date for v2 2023-10-13 16:46:21 -05:00
Aaron U'Ren
34dd6409ee
doc(ipv6): update for v2.0.0 release 2023-10-07 15:24:01 -05:00
Aaron U'Ren
1c89be8712 feat(go): upgrade 1.20.7 -> 1.20.9
Includes comment warnings about inconsistent v1.21.X functionality
v2.0.0
2023-10-07 14:20:28 -05:00
Aaron U'Ren
3db03ccf56 feat(dep): upgrade all dependencies 2023-10-07 14:20:28 -05:00