mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
This change adds a new import resource which enables exposing Netbird resources as Kubernetes services. This remove the need to add sidecars to every pod. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new `NetworkEgress` custom resource (`netbird.io/v1alpha1`) with CRD, schema validation, and status/conditions. * Extended controller functionality to create egress services and translate egress rules into import `EndpointSlice` resources; egress pods now include a kube-egress-forwarder sidecar. * **Bug Fixes** * Added missing deep-copy and declarative apply support for the new `NetworkEgress` API types. * **Documentation** * Updated README/API reference and added example manifests for `NetworkEgress` (including IP/FQDN target usage). <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Philip Laine <philip.laine@gmail.com>
40 lines
923 B
Go
40 lines
923 B
Go
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package version
|
|
|
|
import (
|
|
"runtime/debug"
|
|
)
|
|
|
|
const (
|
|
NetbirdClientImage = "ghcr.io/netbirdio/netbird:0.72.4@sha256:6c6c20baffae4a3ec50f29ec9361608a420625185505e8cd6f0c44d71c5d4798"
|
|
KubeApiProxyImage = "ghcr.io/netbirdio/netbird-kubeapi-proxy:v0.0.4@sha256:bffa4f093abc19b4934ae37657bac76fa3b390cbd39aadac987634215eb750f5"
|
|
KubeEgressForwarderImage = "ghcr.io/netbirdio/kube-egress-forwarder:v0.0.2@sha256:f3b4637122cbda3c1915d49e6f96edff7e3a3accfceb87b821c829056abe8a6f"
|
|
)
|
|
|
|
func BuildVersion() string {
|
|
bi, ok := debug.ReadBuildInfo()
|
|
if !ok {
|
|
return "unknown"
|
|
}
|
|
|
|
modified := true
|
|
for _, s := range bi.Settings {
|
|
if s.Key == "vcs.modified" {
|
|
if s.Value == "false" {
|
|
modified = false
|
|
}
|
|
break
|
|
}
|
|
}
|
|
|
|
develVersion := "devel"
|
|
if modified {
|
|
return develVersion
|
|
}
|
|
if bi.Main.Version == "" {
|
|
return develVersion
|
|
}
|
|
return bi.Main.Version
|
|
}
|