From 030b91deca8fa527204773df5eb8038d5c0e5053 Mon Sep 17 00:00:00 2001 From: surrealwolf Date: Fri, 26 Jun 2026 05:29:32 +0000 Subject: [PATCH 1/3] Align operator with production Envoy Gateway exposure pattern Replace LoadBalancer Services with the prd-apps game-servers model: ClusterIP backend services, Gateway, EnvoyProxy, TCPRoute, and UDPRoute. Resource naming matches the live windrose-server deployment while keeping the official windroseserver/windroseserver Linux image and mount paths. --- Dockerfile | 2 +- README.md | 66 +++-- api/v1alpha1/windroseserver_types.go | 62 ++++- api/v1alpha1/zz_generated.deepcopy.go | 33 ++- cmd/main.go | 6 + ...windrose.dataknife.ai_windroseservers.yaml | 86 ++++-- config/rbac/role.yaml | 26 ++ .../windrose_v1alpha1_windroseserver.yaml | 13 +- go.mod | 83 +++--- go.sum | 204 +++++++------- internal/controller/constants.go | 22 +- internal/controller/envoy_gateway.go | 261 ++++++++++++++++++ internal/controller/helpers.go | 101 ++++++- internal/controller/helpers_test.go | 26 ++ .../controller/windroseserver_controller.go | 112 ++++---- 15 files changed, 821 insertions(+), 282 deletions(-) create mode 100644 internal/controller/envoy_gateway.go diff --git a/Dockerfile b/Dockerfile index 008649c..7af72ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.24 AS builder +FROM golang:1.25 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/README.md b/README.md index 5029b3f..395c1d6 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,45 @@ Kubernetes operator for [Windrose](https://playwindrose.com) dedicated game servers using the official Linux container image [`windroseserver/windroseserver`](https://hub.docker.com/r/windroseserver/windroseserver). -This project complements [windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s), which packages a Wine-based server image. The operator targets the native Linux image published by the Windrose team. +This project complements [windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s), which packages a Wine-based server image. The operator targets the native Linux image published by the Windrose team and matches the **Envoy Gateway** exposure pattern used on DataKnife `prd-apps` clusters. ## Features - Declarative `WindroseServer` custom resource -- Manages Deployment, Service, PVC, and `ServerDescription.json` ConfigMap -- Direct IP connection mode enabled by default (required for Kubernetes) +- **Envoy Gateway** exposure via Gateway + EnvoyProxy + TCPRoute/UDPRoute (matches production `game-servers` namespace) +- Official `windroseserver/windroseserver` image with correct mount paths +- ClusterIP backend services (`{name}` and `{name}-envoy`) - Persistent world saves on a PVC -- Resource defaults aligned with Windrose hardware guidance (4-player profile) +- `ServerDescription.json` managed via ConfigMap + +## Architecture + +``` +Clients → Kube-VIP IP (spec.gateway.address) + ↓ + {base}-gateway (Envoy Gateway) + ↓ + TCPRoute / UDPRoute → {name}-envoy (ClusterIP) + ↓ + {name} Deployment (windroseserver/windroseserver) +``` + +For a CR named `windrose-server`, resource names match the existing production layout: + +| Resource | Name | +|----------|------| +| Gateway | `windrose-gateway` | +| EnvoyProxy | `game-windrose-kubevip` | +| TCPRoute | `windrose-game-tcp` | +| UDPRoute | `windrose-game-udp` | +| Backend Service | `windrose-server-envoy` | ## Prerequisites - Kubernetes 1.28+ +- [Envoy Gateway](https://gateway.envoyproxy.io/) with `GatewayClass` `envoy` - A StorageClass for persistent volumes (35 Gi minimum recommended) -- LoadBalancer or NodePort support for exposing game traffic (TCP + UDP on the same port) +- A dedicated Kube-VIP / MetalLB IP per server (`spec.gateway.address`) ## Quick start @@ -26,7 +50,7 @@ Install the CRD and operator: kubectl apply -k config/default ``` -Create a server: +Create a server (adjust the gateway IP and storage class for your cluster): ```shell kubectl apply -f config/samples/windrose_v1alpha1_windroseserver.yaml @@ -35,24 +59,22 @@ kubectl apply -f config/samples/windrose_v1alpha1_windroseserver.yaml Watch status: ```shell -kubectl get windroseserver my-windrose-server -w +kubectl get windroseserver windrose-server -n game-servers -w ``` -Connect in-game with **Play → Connect to Server** using the LoadBalancer address and port from `.status.connectionAddress` and `.status.connectionPort` when `useDirectConnection: true`. +Connect in-game with **Play → Connect to Server** using `.status.connectionAddress` and `.status.connectionPort`. ## WindroseServer spec | Field | Default | Description | |-------|---------|-------------| | `serverImage` | `windroseserver/windroseserver:latest` | Official Linux server image | -| `useDirectConnection` | `true` | Direct IP connections (recommended on Kubernetes) | +| `gateway.address` | *(required)* | External IP (e.g. `192.168.14.186`) | +| `gateway.className` | `envoy` | GatewayClass name | +| `useDirectConnection` | `true` | Direct IP connections | | `directConnectionServerPort` | `7777` | Game port (TCP + UDP) | -| `serverName` | | Display name in the server browser | -| `password` | | Optional server password | -| `maxPlayerCount` | `4` | Maximum simultaneous players | -| `userSelectedRegion` | | `SEA`, `CIS`, or `EU`; empty auto-selects | | `storageSize` | `35Gi` | PVC size for world saves | -| `serviceType` | `LoadBalancer` | `LoadBalancer`, `NodePort`, or `ClusterIP` | +| `storageClassName` | | StorageClass for saves PVC | Settings map to [`ServerDescription.json`](https://playwindrose.com/dedicated-server-guide) fields. World configuration (`WorldDescription.json`) is created by the server on first boot and stored on the PVC. @@ -68,16 +90,6 @@ docker run --user ue_user --name WindroseServer \ windroseserver/windroseserver:latest ``` -## Hardware guidance - -| Players | CPU | RAM | Storage | -|---------|-----|-----|---------| -| 2 | 2 cores @ 3.2 GHz | 8 GB | 35 GB SSD | -| 4 | 2 cores @ 3.2 GHz | 12 GB | 35 GB SSD | -| 10 | 2 cores @ 3.2 GHz | 16 GB | 35 GB SSD | - -Adjust `spec.resources` on the `WindroseServer` CR for larger player counts. - ## Development ```shell @@ -86,12 +98,6 @@ make test make run ``` -Build the operator image: - -```shell -make docker-build IMG=harbor.dataknife.net/library/windrose-operator:latest -``` - ## Related projects - [DataKnifeAI/windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s) — Wine-based Windrose server image and Kustomize manifests diff --git a/api/v1alpha1/windroseserver_types.go b/api/v1alpha1/windroseserver_types.go index c002b29..55b20c2 100644 --- a/api/v1alpha1/windroseserver_types.go +++ b/api/v1alpha1/windroseserver_types.go @@ -11,6 +11,37 @@ const ( PhaseFailed = "Failed" ) +// GatewayConfig configures Envoy Gateway exposure for direct game connections. +// This matches the prd-apps game-servers pattern: Gateway + EnvoyProxy + TCPRoute/UDPRoute +// fronting ClusterIP backend services. +type GatewayConfig struct { + // Address is the external IP assigned to this server (Kube-VIP or MetalLB). + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([0-9]{1,3}\.){3}[0-9]{1,3}$` + Address string `json:"address"` + + // ClassName is the GatewayClass used for the Envoy Gateway controller. + // +kubebuilder:default="envoy" + // +optional + ClassName string `json:"className,omitempty"` + + // GatewayName overrides the Gateway resource name. + // Default: {base-name}-gateway where base-name strips a trailing "-server" suffix. + // +optional + GatewayName string `json:"gatewayName,omitempty"` + + // EnvoyProxyName overrides the EnvoyProxy resource name. + // Default: game-{base-name}-kubevip. + // +optional + EnvoyProxyName string `json:"envoyProxyName,omitempty"` + + // ExternalTrafficPolicy for the Envoy LoadBalancer service. + // +kubebuilder:validation:Enum=Cluster;Local + // +kubebuilder:default=Cluster + // +optional + ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"` +} + // WindroseServerSpec defines the desired state of a Windrose dedicated game server. // Settings map to ServerDescription.json fields documented at // https://playwindrose.com/dedicated-server-guide and the official Docker image @@ -21,13 +52,29 @@ type WindroseServerSpec struct { // +optional ServerImage string `json:"serverImage,omitempty"` + // ImagePullPolicy for the game server container. + // +kubebuilder:default=IfNotPresent + // +optional + ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` + + // ImagePullSecrets for private registries. + // +optional + ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + + // NodeSelector pins the game server pod to specific nodes. + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // Gateway configures Envoy Gateway exposure (required). + Gateway GatewayConfig `json:"gateway"` + // InviteCode is used when UseDirectConnection is false. Minimum 6 characters. // +kubebuilder:validation:MinLength=6 // +kubebuilder:validation:MaxLength=32 // +optional InviteCode string `json:"inviteCode,omitempty"` - // UseDirectConnection enables direct IP connections (recommended for Kubernetes). + // UseDirectConnection enables direct IP connections (required for Kubernetes). // +kubebuilder:default=true // +optional UseDirectConnection *bool `json:"useDirectConnection,omitempty"` @@ -87,18 +134,6 @@ type WindroseServerSpec struct { // Resources for the game server container. Defaults match Windrose docs for 4 players. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` - - // ServiceType exposes the game port outside the cluster. - // +kubebuilder:validation:Enum=LoadBalancer;NodePort;ClusterIP - // +kubebuilder:default=LoadBalancer - // +optional - ServiceType corev1.ServiceType `json:"serviceType,omitempty"` - - // NodePort is used when ServiceType is NodePort. Must be in range 30000-32767 when set. - // +kubebuilder:validation:Minimum=30000 - // +kubebuilder:validation:Maximum=32767 - // +optional - NodePort int32 `json:"nodePort,omitempty"` } // WindroseServerStatus defines the observed state of WindroseServer. @@ -137,6 +172,7 @@ type WindroseServerStatus struct { // +kubebuilder:resource:shortName=ws // +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` // +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` +// +kubebuilder:printcolumn:name="Address",type=string,JSONPath=`.status.connectionAddress` // +kubebuilder:printcolumn:name="Port",type=integer,JSONPath=`.status.connectionPort` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 03b0f43..3678ff8 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -21,10 +21,26 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfig. +func (in *GatewayConfig) DeepCopy() *GatewayConfig { + if in == nil { + return nil + } + out := new(GatewayConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WindroseServer) DeepCopyInto(out *WindroseServer) { *out = *in @@ -87,6 +103,19 @@ func (in *WindroseServerList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WindroseServerSpec) DeepCopyInto(out *WindroseServerSpec) { *out = *in + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]v1.LocalObjectReference, len(*in)) + copy(*out, *in) + } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + out.Gateway = in.Gateway if in.UseDirectConnection != nil { in, out := &in.UseDirectConnection, &out.UseDirectConnection *out = new(bool) @@ -115,7 +144,7 @@ func (in *WindroseServerStatus) DeepCopyInto(out *WindroseServerStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) + *out = make([]metav1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/cmd/main.go b/cmd/main.go index b0027c3..3b21f38 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -13,7 +13,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" + gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" "github.com/DataKnifeAI/windrose-operator/internal/controller" ) @@ -26,6 +29,9 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(windrosev1alpha1.AddToScheme(scheme)) + utilruntime.Must(gatewayv1.Install(scheme)) + utilruntime.Must(gatewayv1alpha2.Install(scheme)) + utilruntime.Must(egv1a1.AddToScheme(scheme)) } func main() { diff --git a/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml b/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml index 7503b5a..e3dabf7 100644 --- a/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml +++ b/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml @@ -23,6 +23,9 @@ spec: - jsonPath: .status.ready name: Ready type: boolean + - jsonPath: .status.connectionAddress + name: Address + type: string - jsonPath: .status.connectionPort name: Port type: integer @@ -76,6 +79,63 @@ spec: maximum: 65535 minimum: 1024 type: integer + gateway: + description: Gateway configures Envoy Gateway exposure (required). + properties: + address: + description: Address is the external IP assigned to this server + (Kube-VIP or MetalLB). + pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}$ + type: string + className: + default: envoy + description: ClassName is the GatewayClass used for the Envoy + Gateway controller. + type: string + envoyProxyName: + description: |- + EnvoyProxyName overrides the EnvoyProxy resource name. + Default: game-{base-name}-kubevip. + type: string + externalTrafficPolicy: + default: Cluster + description: ExternalTrafficPolicy for the Envoy LoadBalancer + service. + enum: + - Cluster + - Local + type: string + gatewayName: + description: |- + GatewayName overrides the Gateway resource name. + Default: {base-name}-gateway where base-name strips a trailing "-server" suffix. + type: string + required: + - address + type: object + imagePullPolicy: + default: IfNotPresent + description: ImagePullPolicy for the game server container. + type: string + imagePullSecrets: + description: ImagePullSecrets for private registries. + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + type: array inviteCode: description: InviteCode is used when UseDirectConnection is false. Minimum 6 characters. @@ -90,13 +150,11 @@ spec: maximum: 32 minimum: 1 type: integer - nodePort: - description: NodePort is used when ServiceType is NodePort. Must be - in range 30000-32767 when set. - format: int32 - maximum: 32767 - minimum: 30000 - type: integer + nodeSelector: + additionalProperties: + type: string + description: NodeSelector pins the game server pod to specific nodes. + type: object p2pProxyAddress: default: 127.0.0.1 description: P2pProxyAddress is the IP address for listening sockets @@ -115,7 +173,7 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the + This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. @@ -175,14 +233,6 @@ spec: description: ServerName is shown in the server browser when invite codes look similar. type: string - serviceType: - default: LoadBalancer - description: ServiceType exposes the game port outside the cluster. - enum: - - LoadBalancer - - NodePort - - ClusterIP - type: string storageClassName: description: StorageClassName selects the StorageClass for persistent saves. @@ -193,7 +243,7 @@ spec: type: string useDirectConnection: default: true - description: UseDirectConnection enables direct IP connections (recommended + description: UseDirectConnection enables direct IP connections (required for Kubernetes). type: boolean userSelectedRegion: @@ -206,6 +256,8 @@ spec: - EU - "" type: string + required: + - gateway type: object status: description: WindroseServerStatus defines the observed state of WindroseServer. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ea75e39..efa69bb 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -37,6 +37,32 @@ rules: - patch - update - watch +- apiGroups: + - gateway.envoyproxy.io + resources: + - envoyproxies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - gateway.networking.k8s.io + resources: + - gateways + - tcproutes + - udproutes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - windrose.dataknife.ai resources: diff --git a/config/samples/windrose_v1alpha1_windroseserver.yaml b/config/samples/windrose_v1alpha1_windroseserver.yaml index 9a70bde..343805e 100644 --- a/config/samples/windrose_v1alpha1_windroseserver.yaml +++ b/config/samples/windrose_v1alpha1_windroseserver.yaml @@ -1,14 +1,21 @@ apiVersion: windrose.dataknife.ai/v1alpha1 kind: WindroseServer metadata: - name: my-windrose-server - namespace: default + name: windrose-server + namespace: game-servers spec: serverImage: windroseserver/windroseserver:latest + gateway: + address: 192.168.14.186 + className: envoy useDirectConnection: true directConnectionServerPort: 7777 + directConnectionProxyAddress: 0.0.0.0 serverName: DataKnife Windrose maxPlayerCount: 4 userSelectedRegion: EU storageSize: 35Gi - serviceType: LoadBalancer + storageClassName: truenas-csi-nfs + nodeSelector: + kubernetes.io/os: linux + kubernetes.io/arch: amd64 diff --git a/go.mod b/go.mod index 5c170fd..485ec00 100644 --- a/go.mod +++ b/go.mod @@ -1,65 +1,72 @@ module github.com/DataKnifeAI/windrose-operator -go 1.24.0 +go 1.25.3 require ( - k8s.io/api v0.33.0 - k8s.io/apimachinery v0.33.0 - k8s.io/client-go v0.33.0 - sigs.k8s.io/controller-runtime v0.21.0 + github.com/envoyproxy/gateway v1.6.1 + k8s.io/api v0.34.1 + k8s.io/apimachinery v0.34.1 + k8s.io/client-go v0.34.1 + k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d + sigs.k8s.io/controller-runtime v0.22.3 + sigs.k8s.io/gateway-api v1.4.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect + github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/jsonreference v0.21.2 // indirect + github.com/go-openapi/swag v0.23.1 // indirect + github.com/go-openapi/swag/jsonname v0.25.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.22.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.62.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - github.com/spf13/pflag v1.0.5 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.67.1 // indirect + github.com/prometheus/procfs v0.17.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect github.com/x448/float16 v0.8.4 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - golang.org/x/time v0.9.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/protobuf v1.36.5 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/oauth2 v0.31.0 // indirect + golang.org/x/sync v0.17.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/term v0.36.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/time v0.12.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect + google.golang.org/protobuf v1.36.10 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.33.0 // indirect + k8s.io/apiextensions-apiserver v0.34.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect - k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 2473156..b76d769 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,50 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/gateway v1.6.1 h1:Etp7MR3Nix72EM8bmHWxCW3329oFRTlyvFiDQGXDvdw= +github.com/envoyproxy/gateway v1.6.1/go.mod h1:F3Spa//JPyvpg8XXa5ZAvbrG8KdjObBpPYWVVHT9Hv8= +github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= +github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= +github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= +github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= +github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= +github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= +github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+HgUZiTeSoiuFspbMg1ge+eFj18= +github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -54,67 +53,66 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= +github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= -github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= -github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= +github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= +github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= +github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= +github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= +github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -124,74 +122,74 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= +golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= +golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= +golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= -gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= +gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU= -k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM= -k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs= -k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc= -k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ= -k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98= -k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg= +k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM= +k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= +k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI= +k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc= +k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= +k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY= +k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= -k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= -sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3 h1:liMHz39T5dJO1aOKHLvwaCjDbf07wVh6yaUlTpunnkE= +k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTijTq8Y= +sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= +sigs.k8s.io/gateway-api v1.4.0 h1:ZwlNM6zOHq0h3WUX2gfByPs2yAEsy/EenYJB78jpQfQ= +sigs.k8s.io/gateway-api v1.4.0/go.mod h1:AR5RSqciWP98OPckEjOjh2XJhAe2Na4LHyXD2FUY7Qk= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/controller/constants.go b/internal/controller/constants.go index 99e6da0..9892ba7 100644 --- a/internal/controller/constants.go +++ b/internal/controller/constants.go @@ -3,16 +3,20 @@ package controller const ( finalizerName = "windrose.dataknife.ai/finalizer" - defaultServerImage = "windroseserver/windroseserver:latest" - defaultDirectConnectionPort int32 = 7777 - defaultMaxPlayers int32 = 4 - defaultStorageSize = "35Gi" - defaultDirectConnectionProxyAddress = "0.0.0.0" - defaultP2PProxyAddress = "127.0.0.1" + defaultServerImage = "windroseserver/windroseserver:latest" + defaultGatewayClassName = "envoy" + defaultDirectConnectionPort int32 = 7777 + defaultMaxPlayers int32 = 4 + defaultStorageSize = "35Gi" + defaultDirectConnectionProxyAddress = "0.0.0.0" + defaultP2PProxyAddress = "127.0.0.1" containerUser = int64(1000) - savedMountPath = "/home/ue_user/app/R5/Saved" - serverDescriptionMountPath = "/home/ue_user/app/R5/ServerDescription.json" - serverDescriptionConfigKey = "ServerDescription.json" + savedMountPath = "/home/ue_user/app/R5/Saved" + serverDescriptionMountPath = "/home/ue_user/app/R5/ServerDescription.json" + serverDescriptionConfigKey = "ServerDescription.json" + + gatewayListenerGameTCP = "game-tcp" + gatewayListenerGameUDP = "game-udp" ) diff --git a/internal/controller/envoy_gateway.go b/internal/controller/envoy_gateway.go new file mode 100644 index 0000000..a8943bf --- /dev/null +++ b/internal/controller/envoy_gateway.go @@ -0,0 +1,261 @@ +package controller + +import ( + "context" + "fmt" + + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" + windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/ptr" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" + gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +func (r *WindroseServerReconciler) reconcileEnvoyGateway( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + names derivedNames, +) error { + if server.Spec.Gateway.Address == "" { + return fmt.Errorf("spec.gateway.address is required") + } + + if err := r.reconcileEnvoyProxy(ctx, server, names); err != nil { + return err + } + if err := r.reconcileGateway(ctx, server, names); err != nil { + return err + } + if err := r.reconcileTCPRoute(ctx, server, names); err != nil { + return err + } + if err := r.reconcileUDPRoute(ctx, server, names); err != nil { + return err + } + return nil +} + +func (r *WindroseServerReconciler) reconcileEnvoyProxy( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + names derivedNames, +) error { + envoyProxy := &egv1a1.EnvoyProxy{ + ObjectMeta: metav1.ObjectMeta{ + Name: names.envoyProxyName, + Namespace: server.Namespace, + }, + } + + op, err := controllerutil.CreateOrUpdate(ctx, r.Client, envoyProxy, func() error { + if err := controllerutil.SetControllerReference(server, envoyProxy, r.Scheme); err != nil { + return err + } + envoyProxy.Labels = gatewayLabels(server.Name) + policy := envoyExternalTrafficPolicy(server.Spec) + envoyProxy.Spec = egv1a1.EnvoyProxySpec{ + Logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.ProxyLogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelWarn, + }, + }, + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.EnvoyProxyProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: ptr.To(egv1a1.ServiceTypeLoadBalancer), + LoadBalancerIP: ptr.To(server.Spec.Gateway.Address), + ExternalTrafficPolicy: ptr.To(policy), + }, + }, + }, + } + return nil + }) + if err != nil { + return fmt.Errorf("reconcile EnvoyProxy: %w", err) + } + logf.FromContext(ctx).V(1).Info("reconciled EnvoyProxy", "operation", op, "name", names.envoyProxyName) + return nil +} + +func (r *WindroseServerReconciler) reconcileGateway( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + names derivedNames, +) error { + port := directConnectionPort(server.Spec) + gateway := &gatewayv1.Gateway{ + ObjectMeta: metav1.ObjectMeta{ + Name: names.gatewayName, + Namespace: server.Namespace, + }, + } + + op, err := controllerutil.CreateOrUpdate(ctx, r.Client, gateway, func() error { + if err := controllerutil.SetControllerReference(server, gateway, r.Scheme); err != nil { + return err + } + gateway.Labels = gatewayLabels(server.Name) + gateway.Spec = gatewayv1.GatewaySpec{ + GatewayClassName: gatewayv1.ObjectName(gatewayClassName(server.Spec)), + Addresses: []gatewayv1.GatewaySpecAddress{ + { + Type: ptr.To(gatewayv1.IPAddressType), + Value: server.Spec.Gateway.Address, + }, + }, + Infrastructure: &gatewayv1.GatewayInfrastructure{ + ParametersRef: &gatewayv1.LocalParametersReference{ + Group: gatewayv1.Group(egv1a1.GroupVersion.Group), + Kind: gatewayv1.Kind("EnvoyProxy"), + Name: names.envoyProxyName, + }, + }, + Listeners: []gatewayv1.Listener{ + { + Name: gatewayv1.SectionName(gatewayListenerGameTCP), + Port: gatewayv1.PortNumber(port), + Protocol: gatewayv1.TCPProtocolType, + AllowedRoutes: &gatewayv1.AllowedRoutes{ + Namespaces: &gatewayv1.RouteNamespaces{ + From: ptr.To(gatewayv1.NamespacesFromSame), + }, + }, + }, + { + Name: gatewayv1.SectionName(gatewayListenerGameUDP), + Port: gatewayv1.PortNumber(port), + Protocol: gatewayv1.UDPProtocolType, + AllowedRoutes: &gatewayv1.AllowedRoutes{ + Namespaces: &gatewayv1.RouteNamespaces{ + From: ptr.To(gatewayv1.NamespacesFromSame), + }, + }, + }, + }, + } + return nil + }) + if err != nil { + return fmt.Errorf("reconcile Gateway: %w", err) + } + logf.FromContext(ctx).V(1).Info("reconciled Gateway", "operation", op, "name", names.gatewayName) + return nil +} + +func (r *WindroseServerReconciler) reconcileTCPRoute( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + names derivedNames, +) error { + port := directConnectionPort(server.Spec) + tcpRoute := &gatewayv1alpha2.TCPRoute{ + ObjectMeta: metav1.ObjectMeta{ + Name: names.tcpRouteName, + Namespace: server.Namespace, + }, + } + + op, err := controllerutil.CreateOrUpdate(ctx, r.Client, tcpRoute, func() error { + if err := controllerutil.SetControllerReference(server, tcpRoute, r.Scheme); err != nil { + return err + } + tcpRoute.Labels = gatewayLabels(server.Name) + tcpRoute.Spec = gatewayv1alpha2.TCPRouteSpec{ + CommonRouteSpec: gatewayv1.CommonRouteSpec{ + ParentRefs: []gatewayv1.ParentReference{ + { + Name: gatewayv1.ObjectName(names.gatewayName), + Namespace: ptr.To(gatewayv1.Namespace(server.Namespace)), + SectionName: ptr.To(gatewayv1.SectionName(gatewayListenerGameTCP)), + }, + }, + }, + Rules: []gatewayv1alpha2.TCPRouteRule{ + { + BackendRefs: []gatewayv1alpha2.BackendRef{ + { + BackendObjectReference: gatewayv1.BackendObjectReference{ + Name: gatewayv1.ObjectName(names.envoyService), + Port: ptr.To(gatewayv1.PortNumber(port)), + }, + }, + }, + }, + }, + } + return nil + }) + if err != nil { + return fmt.Errorf("reconcile TCPRoute: %w", err) + } + logf.FromContext(ctx).V(1).Info("reconciled TCPRoute", "operation", op, "name", names.tcpRouteName) + return nil +} + +func (r *WindroseServerReconciler) reconcileUDPRoute( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + names derivedNames, +) error { + port := directConnectionPort(server.Spec) + udpRoute := &gatewayv1alpha2.UDPRoute{ + ObjectMeta: metav1.ObjectMeta{ + Name: names.udpRouteName, + Namespace: server.Namespace, + }, + } + + op, err := controllerutil.CreateOrUpdate(ctx, r.Client, udpRoute, func() error { + if err := controllerutil.SetControllerReference(server, udpRoute, r.Scheme); err != nil { + return err + } + udpRoute.Labels = gatewayLabels(server.Name) + udpRoute.Spec = gatewayv1alpha2.UDPRouteSpec{ + CommonRouteSpec: gatewayv1.CommonRouteSpec{ + ParentRefs: []gatewayv1.ParentReference{ + { + Name: gatewayv1.ObjectName(names.gatewayName), + Namespace: ptr.To(gatewayv1.Namespace(server.Namespace)), + SectionName: ptr.To(gatewayv1.SectionName(gatewayListenerGameUDP)), + }, + }, + }, + Rules: []gatewayv1alpha2.UDPRouteRule{ + { + BackendRefs: []gatewayv1alpha2.BackendRef{ + { + BackendObjectReference: gatewayv1.BackendObjectReference{ + Name: gatewayv1.ObjectName(names.envoyService), + Port: ptr.To(gatewayv1.PortNumber(port)), + }, + }, + }, + }, + }, + } + return nil + }) + if err != nil { + return fmt.Errorf("reconcile UDPRoute: %w", err) + } + logf.FromContext(ctx).V(1).Info("reconciled UDPRoute", "operation", op, "name", names.udpRouteName) + return nil +} + +func gatewayLabels(instanceName string) map[string]string { + labels := serverLabels(instanceName) + labels["app.kubernetes.io/component"] = "envoy-gateway" + return labels +} + +func connectionAddressFromGateway(server *windrosev1alpha1.WindroseServer, gateway *gatewayv1.Gateway) string { + if gateway != nil && len(gateway.Status.Addresses) > 0 { + return gateway.Status.Addresses[0].Value + } + return server.Spec.Gateway.Address +} diff --git a/internal/controller/helpers.go b/internal/controller/helpers.go index e314a34..2bb7cf9 100644 --- a/internal/controller/helpers.go +++ b/internal/controller/helpers.go @@ -2,10 +2,14 @@ package controller import ( "encoding/json" + "strings" windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/util/intstr" + + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) type serverDescriptionFile struct { @@ -27,6 +31,18 @@ type serverDescriptionPersistent struct { AutoLoadLatestBackupIfHasBroken bool `json:"AutoLoadLatestBackupIfHasBroken"` } +type derivedNames struct { + pvcName string + configMapName string + deploymentName string + serviceName string + envoyService string + gatewayName string + envoyProxyName string + tcpRouteName string + udpRouteName string +} + func boolValue(value *bool, fallback bool) bool { if value == nil { return fallback @@ -34,6 +50,35 @@ func boolValue(value *bool, fallback bool) bool { return *value } +func gatewayBaseName(name string) string { + if strings.HasSuffix(name, "-server") { + return strings.TrimSuffix(name, "-server") + } + return name +} + +func deriveNames(server *windrosev1alpha1.WindroseServer) derivedNames { + base := gatewayBaseName(server.Name) + names := derivedNames{ + pvcName: server.Name + "-files", + configMapName: server.Name + "-config", + deploymentName: server.Name, + serviceName: server.Name, + envoyService: server.Name + "-envoy", + gatewayName: base + "-gateway", + envoyProxyName: "game-" + base + "-kubevip", + tcpRouteName: base + "-game-tcp", + udpRouteName: base + "-game-udp", + } + if server.Spec.Gateway.GatewayName != "" { + names.gatewayName = server.Spec.Gateway.GatewayName + } + if server.Spec.Gateway.EnvoyProxyName != "" { + names.envoyProxyName = server.Spec.Gateway.EnvoyProxyName + } + return names +} + func serverImage(spec windrosev1alpha1.WindroseServerSpec) string { if spec.ServerImage != "" { return spec.ServerImage @@ -41,6 +86,34 @@ func serverImage(spec windrosev1alpha1.WindroseServerSpec) string { return defaultServerImage } +func imagePullPolicy(spec windrosev1alpha1.WindroseServerSpec) corev1.PullPolicy { + if spec.ImagePullPolicy != "" { + return spec.ImagePullPolicy + } + return corev1.PullIfNotPresent +} + +func gatewayClassName(spec windrosev1alpha1.WindroseServerSpec) string { + if spec.Gateway.ClassName != "" { + return spec.Gateway.ClassName + } + return defaultGatewayClassName +} + +func externalTrafficPolicy(spec windrosev1alpha1.WindroseServerSpec) corev1.ServiceExternalTrafficPolicy { + if spec.Gateway.ExternalTrafficPolicy != "" { + return spec.Gateway.ExternalTrafficPolicy + } + return corev1.ServiceExternalTrafficPolicyCluster +} + +func envoyExternalTrafficPolicy(spec windrosev1alpha1.WindroseServerSpec) egv1a1.ServiceExternalTrafficPolicy { + if externalTrafficPolicy(spec) == corev1.ServiceExternalTrafficPolicyLocal { + return egv1a1.ServiceExternalTrafficPolicyLocal + } + return egv1a1.ServiceExternalTrafficPolicyCluster +} + func directConnectionPort(spec windrosev1alpha1.WindroseServerSpec) int32 { if spec.DirectConnectionServerPort != 0 { return spec.DirectConnectionServerPort @@ -62,13 +135,6 @@ func storageSize(spec windrosev1alpha1.WindroseServerSpec) string { return defaultStorageSize } -func serviceType(spec windrosev1alpha1.WindroseServerSpec) corev1.ServiceType { - if spec.ServiceType != "" { - return spec.ServiceType - } - return corev1.ServiceTypeLoadBalancer -} - func directConnectionProxyAddress(spec windrosev1alpha1.WindroseServerSpec) string { if spec.DirectConnectionProxyAddress != "" { return spec.DirectConnectionProxyAddress @@ -124,10 +190,23 @@ func buildServerDescription(spec windrosev1alpha1.WindroseServerSpec) ([]byte, e return json.MarshalIndent(doc, "", " ") } -func resourceNames(name string) (pvcName, configMapName, deploymentName, serviceName string) { - return name + "-saves", name + "-config", name, name -} - func resourceQuantity(value string) resource.Quantity { return resource.MustParse(value) } + +func gameServicePorts(port int32) []corev1.ServicePort { + return []corev1.ServicePort{ + { + Name: "game-tcp", + Port: port, + TargetPort: intstr.FromInt32(port), + Protocol: corev1.ProtocolTCP, + }, + { + Name: "game-udp", + Port: port, + TargetPort: intstr.FromInt32(port), + Protocol: corev1.ProtocolUDP, + }, + } +} diff --git a/internal/controller/helpers_test.go b/internal/controller/helpers_test.go index dfb891c..221ce85 100644 --- a/internal/controller/helpers_test.go +++ b/internal/controller/helpers_test.go @@ -4,11 +4,13 @@ import ( "testing" windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestBuildServerDescriptionDirectConnection(t *testing.T) { useDirect := true spec := windrosev1alpha1.WindroseServerSpec{ + Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, ServerName: "Test Server", MaxPlayerCount: 6, UseDirectConnection: &useDirect, @@ -34,6 +36,30 @@ func TestBuildServerDescriptionDirectConnection(t *testing.T) { } } +func TestDeriveNamesWindroseServer(t *testing.T) { + server := &windrosev1alpha1.WindroseServer{ + ObjectMeta: metav1.ObjectMeta{Name: "windrose-server"}, + Spec: windrosev1alpha1.WindroseServerSpec{ + Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, + }, + } + + names := deriveNames(server) + checks := map[string]string{ + names.pvcName: "windrose-server-files", + names.envoyService: "windrose-server-envoy", + names.gatewayName: "windrose-gateway", + names.envoyProxyName: "game-windrose-kubevip", + names.tcpRouteName: "windrose-game-tcp", + names.udpRouteName: "windrose-game-udp", + } + for got, want := range checks { + if got != want { + t.Fatalf("deriveNames() = %q, want %q", got, want) + } + } +} + func contains(haystack, needle string) bool { return len(needle) == 0 || (len(haystack) >= len(needle) && indexOf(haystack, needle) >= 0) } diff --git a/internal/controller/windroseserver_controller.go b/internal/controller/windroseserver_controller.go index 1ec7dee..acdb33e 100644 --- a/internal/controller/windroseserver_controller.go +++ b/internal/controller/windroseserver_controller.go @@ -12,12 +12,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" logf "sigs.k8s.io/controller-runtime/pkg/log" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" + gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" ) @@ -34,6 +36,10 @@ type WindroseServerReconciler struct { // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=tcproutes,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=udproutes,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=gateway.envoyproxy.io,resources=envoyproxies,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch func (r *WindroseServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -63,28 +69,34 @@ func (r *WindroseServerReconciler) Reconcile(ctx context.Context, req ctrl.Reque return ctrl.Result{}, nil } - pvcName, configMapName, deploymentName, serviceName := resourceNames(server.Name) + names := deriveNames(server) - if err := r.reconcilePVC(ctx, server, pvcName); err != nil { + if err := r.reconcilePVC(ctx, server, names.pvcName); err != nil { return r.failStatus(ctx, server, err) } - if err := r.reconcileConfigMap(ctx, server, configMapName); err != nil { + if err := r.reconcileConfigMap(ctx, server, names.configMapName); err != nil { return r.failStatus(ctx, server, err) } - if err := r.reconcileDeployment(ctx, server, pvcName, configMapName, deploymentName); err != nil { + if err := r.reconcileDeployment(ctx, server, names); err != nil { return r.failStatus(ctx, server, err) } - if err := r.reconcileService(ctx, server, serviceName); err != nil { + if err := r.reconcileClusterIPService(ctx, server, names.serviceName, serverLabels(server.Name)); err != nil { + return r.failStatus(ctx, server, err) + } + if err := r.reconcileClusterIPService(ctx, server, names.envoyService, envoyBackendLabels(server.Name)); err != nil { + return r.failStatus(ctx, server, err) + } + if err := r.reconcileEnvoyGateway(ctx, server, names); err != nil { return r.failStatus(ctx, server, err) } deployment := &appsv1.Deployment{} - if err := r.Get(ctx, types.NamespacedName{Name: deploymentName, Namespace: server.Namespace}, deployment); err != nil { + if err := r.Get(ctx, types.NamespacedName{Name: names.deploymentName, Namespace: server.Namespace}, deployment); err != nil { return r.failStatus(ctx, server, err) } - service := &corev1.Service{} - if err := r.Get(ctx, types.NamespacedName{Name: serviceName, Namespace: server.Namespace}, service); err != nil { + gateway := &gatewayv1.Gateway{} + if err := r.Get(ctx, types.NamespacedName{Name: names.gatewayName, Namespace: server.Namespace}, gateway); err != nil { return r.failStatus(ctx, server, err) } @@ -100,7 +112,7 @@ func (r *WindroseServerReconciler) Reconcile(ctx context.Context, req ctrl.Reque server.Status.Ready = ready server.Status.InviteCode = server.Spec.InviteCode server.Status.ConnectionPort = directConnectionPort(server.Spec) - server.Status.ConnectionAddress = connectionAddress(service) + server.Status.ConnectionAddress = connectionAddressFromGateway(server, gateway) server.Status.Message = message meta.SetStatusCondition(&server.Status.Conditions, metav1.Condition{ Type: "Ready", @@ -188,7 +200,7 @@ func (r *WindroseServerReconciler) reconcileConfigMap(ctx context.Context, serve func (r *WindroseServerReconciler) reconcileDeployment( ctx context.Context, server *windrosev1alpha1.WindroseServer, - pvcName, configMapName, name string, + names derivedNames, ) error { port := directConnectionPort(server.Spec) replicas := int32(1) @@ -197,7 +209,7 @@ func (r *WindroseServerReconciler) reconcileDeployment( deployment := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - Name: name, + Name: names.deploymentName, Namespace: server.Namespace, }, } @@ -214,7 +226,8 @@ func (r *WindroseServerReconciler) reconcileDeployment( MatchLabels: serverLabels(server.Name), } deployment.Spec.Template.ObjectMeta.Labels = serverLabels(server.Name) - deployment.Spec.Template.Spec = corev1.PodSpec{ + + podSpec := corev1.PodSpec{ SecurityContext: &corev1.PodSecurityContext{ FSGroup: &runAsUser, }, @@ -223,7 +236,7 @@ func (r *WindroseServerReconciler) reconcileDeployment( { Name: "windrose", Image: serverImage(server.Spec), - ImagePullPolicy: corev1.PullIfNotPresent, + ImagePullPolicy: imagePullPolicy(server.Spec), SecurityContext: &corev1.SecurityContext{ RunAsUser: &runAsUser, RunAsNonRoot: &runAsNonRoot, @@ -249,7 +262,7 @@ func (r *WindroseServerReconciler) reconcileDeployment( Name: "saves", VolumeSource: corev1.VolumeSource{ PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{ - ClaimName: pvcName, + ClaimName: names.pvcName, }, }, }, @@ -257,24 +270,37 @@ func (r *WindroseServerReconciler) reconcileDeployment( Name: "server-description", VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: configMapName}, + LocalObjectReference: corev1.LocalObjectReference{Name: names.configMapName}, }, }, }, }, } + + if len(server.Spec.ImagePullSecrets) > 0 { + podSpec.ImagePullSecrets = server.Spec.ImagePullSecrets + } + if len(server.Spec.NodeSelector) > 0 { + podSpec.NodeSelector = server.Spec.NodeSelector + } + + deployment.Spec.Template.Spec = podSpec return nil }) if err != nil { return fmt.Errorf("reconcile Deployment: %w", err) } - logf.FromContext(ctx).V(1).Info("reconciled Deployment", "operation", op, "name", name) + logf.FromContext(ctx).V(1).Info("reconciled Deployment", "operation", op, "name", names.deploymentName) return nil } -func (r *WindroseServerReconciler) reconcileService(ctx context.Context, server *windrosev1alpha1.WindroseServer, name string) error { +func (r *WindroseServerReconciler) reconcileClusterIPService( + ctx context.Context, + server *windrosev1alpha1.WindroseServer, + name string, + labels map[string]string, +) error { port := directConnectionPort(server.Spec) - svcType := serviceType(server.Spec) service := &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -288,32 +314,14 @@ func (r *WindroseServerReconciler) reconcileService(ctx context.Context, server return err } - service.Labels = serverLabels(server.Name) - service.Spec.Type = svcType + service.Labels = labels + service.Spec.Type = corev1.ServiceTypeClusterIP service.Spec.Selector = serverLabels(server.Name) - service.Spec.Ports = []corev1.ServicePort{ - { - Name: "game-tcp", - Port: port, - TargetPort: intstr.FromInt32(port), - Protocol: corev1.ProtocolTCP, - }, - { - Name: "game-udp", - Port: port, - TargetPort: intstr.FromInt32(port), - Protocol: corev1.ProtocolUDP, - }, - } - - if svcType == corev1.ServiceTypeNodePort && server.Spec.NodePort != 0 { - service.Spec.Ports[0].NodePort = server.Spec.NodePort - service.Spec.Ports[1].NodePort = server.Spec.NodePort - } + service.Spec.Ports = gameServicePorts(port) return nil }) if err != nil { - return fmt.Errorf("reconcile Service: %w", err) + return fmt.Errorf("reconcile Service %s: %w", name, err) } logf.FromContext(ctx).V(1).Info("reconciled Service", "operation", op, "name", name) return nil @@ -344,6 +352,10 @@ func (r *WindroseServerReconciler) SetupWithManager(mgr ctrl.Manager) error { Owns(&corev1.Service{}). Owns(&corev1.PersistentVolumeClaim{}). Owns(&corev1.ConfigMap{}). + Owns(&gatewayv1.Gateway{}). + Owns(&gatewayv1alpha2.TCPRoute{}). + Owns(&gatewayv1alpha2.UDPRoute{}). + Owns(&egv1a1.EnvoyProxy{}). Complete(r) } @@ -355,20 +367,10 @@ func serverLabels(name string) map[string]string { } } -func connectionAddress(service *corev1.Service) string { - if service.Spec.Type == corev1.ServiceTypeLoadBalancer && len(service.Status.LoadBalancer.Ingress) > 0 { - ingress := service.Status.LoadBalancer.Ingress[0] - if ingress.IP != "" { - return ingress.IP - } - if ingress.Hostname != "" { - return ingress.Hostname - } - } - if service.Spec.Type == corev1.ServiceTypeNodePort && len(service.Spec.Ports) > 0 { - return "" - } - return service.Spec.ClusterIP +func envoyBackendLabels(instanceName string) map[string]string { + labels := serverLabels(instanceName) + labels["app.kubernetes.io/component"] = "envoy-backend" + return labels } func conditionStatus(ready bool) metav1.ConditionStatus { From eee803f017de4058292640bb2e93d9fc522fa003 Mon Sep 17 00:00:00 2001 From: surrealwolf Date: Fri, 26 Jun 2026 05:33:23 +0000 Subject: [PATCH 2/3] Auto-select pod resources from maxPlayerCount with override Derive CPU and memory requests/limits from Windrose hardware tiers when spec.resources is unset. Setting spec.resources bypasses auto-selection. --- README.md | 26 ++++++++++ api/v1alpha1/windroseserver_types.go | 4 +- ...windrose.dataknife.ai_windroseservers.yaml | 10 ++-- internal/controller/helpers.go | 25 ++++++++-- internal/controller/helpers_test.go | 49 ++++++++++++++++++- 5 files changed, 104 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 395c1d6..540399b 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,32 @@ Connect in-game with **Play → Connect to Server** using `.status.connectionAdd | `directConnectionServerPort` | `7777` | Game port (TCP + UDP) | | `storageSize` | `35Gi` | PVC size for world saves | | `storageClassName` | | StorageClass for saves PVC | +| `maxPlayerCount` | `4` | Max players; also selects pod resources when `resources` is unset | +| `resources` | auto | Override pod CPU/memory (see table below) | + +### Auto-selected pod resources + +When `spec.resources` is omitted, CPU and memory are derived from `maxPlayerCount` using [Windrose hardware guidance](https://playwindrose.com/dedicated-server-guide): + +| Players | CPU request | Memory request | CPU limit | Memory limit | +|---------|-------------|----------------|-----------|--------------| +| 1–2 | 2 | 8Gi | 4 | 10Gi | +| 3–4 | 2 | 12Gi | 4 | 16Gi | +| 5–32 | 2 | 16Gi | 4 | 16Gi | + +To override, set `spec.resources` explicitly: + +```yaml +spec: + maxPlayerCount: 10 + resources: + requests: + cpu: "2" + memory: 16Gi + limits: + cpu: "4" + memory: 20Gi +``` Settings map to [`ServerDescription.json`](https://playwindrose.com/dedicated-server-guide) fields. World configuration (`WorldDescription.json`) is created by the server on first boot and stored on the PVC. diff --git a/api/v1alpha1/windroseserver_types.go b/api/v1alpha1/windroseserver_types.go index 55b20c2..268a77a 100644 --- a/api/v1alpha1/windroseserver_types.go +++ b/api/v1alpha1/windroseserver_types.go @@ -100,6 +100,7 @@ type WindroseServerSpec struct { Password string `json:"password,omitempty"` // MaxPlayerCount is the maximum number of simultaneous players. + // When spec.resources is unset, pod CPU/memory are auto-selected from this value. // +kubebuilder:default=4 // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=32 @@ -131,7 +132,8 @@ type WindroseServerSpec struct { // +optional StorageClassName string `json:"storageClassName,omitempty"` - // Resources for the game server container. Defaults match Windrose docs for 4 players. + // Resources for the game server container. + // When set, overrides auto-selection based on maxPlayerCount. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` } diff --git a/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml b/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml index e3dabf7..1e55321 100644 --- a/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml +++ b/config/crd/bases/windrose.dataknife.ai_windroseservers.yaml @@ -144,8 +144,9 @@ spec: type: string maxPlayerCount: default: 4 - description: MaxPlayerCount is the maximum number of simultaneous - players. + description: |- + MaxPlayerCount is the maximum number of simultaneous players. + When spec.resources is unset, pod CPU/memory are auto-selected from this value. format: int32 maximum: 32 minimum: 1 @@ -165,8 +166,9 @@ spec: a public server. type: string resources: - description: Resources for the game server container. Defaults match - Windrose docs for 4 players. + description: |- + Resources for the game server container. + When set, overrides auto-selection based on maxPlayerCount. properties: claims: description: |- diff --git a/internal/controller/helpers.go b/internal/controller/helpers.go index 2bb7cf9..2678cbd 100644 --- a/internal/controller/helpers.go +++ b/internal/controller/helpers.go @@ -153,14 +153,31 @@ func defaultResources(spec windrosev1alpha1.WindroseServerSpec) corev1.ResourceR if spec.Resources.Requests != nil || spec.Resources.Limits != nil { return spec.Resources } + return resourcesForPlayerCount(maxPlayers(spec)) +} + +// resourcesForPlayerCount returns CPU/memory based on Windrose dedicated server hardware guidance. +// See https://playwindrose.com/dedicated-server-guide +func resourcesForPlayerCount(count int32) corev1.ResourceRequirements { + switch { + case count <= 2: + return podResources("2", "8Gi", "4", "10Gi") + case count <= 4: + return podResources("2", "12Gi", "4", "16Gi") + default: + return podResources("2", "16Gi", "4", "16Gi") + } +} + +func podResources(cpuRequest, memRequest, cpuLimit, memLimit string) corev1.ResourceRequirements { return corev1.ResourceRequirements{ Requests: corev1.ResourceList{ - corev1.ResourceCPU: resourceQuantity("2"), - corev1.ResourceMemory: resourceQuantity("12Gi"), + corev1.ResourceCPU: resourceQuantity(cpuRequest), + corev1.ResourceMemory: resourceQuantity(memRequest), }, Limits: corev1.ResourceList{ - corev1.ResourceCPU: resourceQuantity("4"), - corev1.ResourceMemory: resourceQuantity("16Gi"), + corev1.ResourceCPU: resourceQuantity(cpuLimit), + corev1.ResourceMemory: resourceQuantity(memLimit), }, } } diff --git a/internal/controller/helpers_test.go b/internal/controller/helpers_test.go index 221ce85..ebbf4d3 100644 --- a/internal/controller/helpers_test.go +++ b/internal/controller/helpers_test.go @@ -4,13 +4,14 @@ import ( "testing" windrosev1alpha1 "github.com/DataKnifeAI/windrose-operator/api/v1alpha1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestBuildServerDescriptionDirectConnection(t *testing.T) { useDirect := true spec := windrosev1alpha1.WindroseServerSpec{ - Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, + Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, ServerName: "Test Server", MaxPlayerCount: 6, UseDirectConnection: &useDirect, @@ -36,6 +37,52 @@ func TestBuildServerDescriptionDirectConnection(t *testing.T) { } } +func TestResourcesForPlayerCount(t *testing.T) { + tests := []struct { + players int32 + memReq string + memLimit string + }{ + {players: 2, memReq: "8Gi", memLimit: "10Gi"}, + {players: 4, memReq: "12Gi", memLimit: "16Gi"}, + {players: 10, memReq: "16Gi", memLimit: "16Gi"}, + } + + for _, tt := range tests { + resources := resourcesForPlayerCount(tt.players) + if got := resources.Requests.Memory().String(); got != tt.memReq { + t.Fatalf("players=%d memory request = %s, want %s", tt.players, got, tt.memReq) + } + if got := resources.Limits.Memory().String(); got != tt.memLimit { + t.Fatalf("players=%d memory limit = %s, want %s", tt.players, got, tt.memLimit) + } + } +} + +func TestDefaultResourcesAutoSelectAndOverride(t *testing.T) { + auto := defaultResources(windrosev1alpha1.WindroseServerSpec{ + Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, + MaxPlayerCount: 2, + }) + if got := auto.Requests.Memory().String(); got != "8Gi" { + t.Fatalf("auto-selected memory = %s, want 8Gi", got) + } + + override := defaultResources(windrosev1alpha1.WindroseServerSpec{ + Gateway: windrosev1alpha1.GatewayConfig{Address: "192.168.14.186"}, + MaxPlayerCount: 2, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resourceQuantity("1"), + corev1.ResourceMemory: resourceQuantity("4Gi"), + }, + }, + }) + if got := override.Requests.Memory().String(); got != "4Gi" { + t.Fatalf("override memory = %s, want 4Gi", got) + } +} + func TestDeriveNamesWindroseServer(t *testing.T) { server := &windrosev1alpha1.WindroseServer{ ObjectMeta: metav1.ObjectMeta{Name: "windrose-server"}, From ddc26de0531dded4db9405f836665ec3b7426d77 Mon Sep 17 00:00:00 2001 From: surrealwolf Date: Fri, 26 Jun 2026 05:34:18 +0000 Subject: [PATCH 3/3] Revise README for accuracy and completeness Document the full spec, managed resources, naming conventions, status fields, resource auto-selection, and comparison with windrose-server-k8s. --- README.md | 184 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 142 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 540399b..c33bd63 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,67 @@ # Windrose Operator -Kubernetes operator for [Windrose](https://playwindrose.com) dedicated game servers using the official Linux container image [`windroseserver/windroseserver`](https://hub.docker.com/r/windroseserver/windroseserver). +Kubernetes operator for [Windrose](https://playwindrose.com) dedicated game servers using the official Linux image [`windroseserver/windroseserver`](https://hub.docker.com/r/windroseserver/windroseserver). -This project complements [windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s), which packages a Wine-based server image. The operator targets the native Linux image published by the Windrose team and matches the **Envoy Gateway** exposure pattern used on DataKnife `prd-apps` clusters. +This project complements [windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s), which packages a Wine-based server image and static Kustomize manifests. The operator: + +- Runs the **native Linux** image from the Windrose team (not the Wine fork) +- Manages servers declaratively via a `WindroseServer` custom resource +- Matches the **Envoy Gateway** exposure pattern used in DataKnife `prd-apps` (`game-servers` namespace) + +## Comparison + +| | windrose-operator | windrose-server-k8s | +|--|---------------------|---------------------| +| Image | `windroseserver/windroseserver` | Harbor Wine image (`indifferentbroccoli` fork) | +| Deployment | Operator-managed CR | Kustomize manifests | +| External access | Envoy Gateway (TCPRoute/UDPRoute) | Envoy Gateway (manual manifests today) | +| Config | `ServerDescription.json` ConfigMap | Env vars + generated JSON on disk | +| Mount path | `/home/ue_user/app/R5/...` | `/home/steam/server-files/...` | ## Features -- Declarative `WindroseServer` custom resource -- **Envoy Gateway** exposure via Gateway + EnvoyProxy + TCPRoute/UDPRoute (matches production `game-servers` namespace) -- Official `windroseserver/windroseserver` image with correct mount paths +- `WindroseServer` CRD with status (phase, ready, connection address/port) +- Envoy Gateway exposure: Gateway, EnvoyProxy, TCPRoute, UDPRoute - ClusterIP backend services (`{name}` and `{name}-envoy`) -- Persistent world saves on a PVC -- `ServerDescription.json` managed via ConfigMap +- PVC for world saves, ConfigMap for `ServerDescription.json` +- Pod resources auto-selected from `maxPlayerCount` (override supported) ## Architecture ``` -Clients → Kube-VIP IP (spec.gateway.address) +Clients → spec.gateway.address (Kube-VIP / MetalLB) + ↓ + {base}-gateway (GatewayClass: envoy) ↓ - {base}-gateway (Envoy Gateway) + TCPRoute / UDPRoute → {name}-envoy (ClusterIP) ↓ - TCPRoute / UDPRoute → {name}-envoy (ClusterIP) + {name} Deployment (windroseserver/windroseserver) ↓ - {name} Deployment (windroseserver/windroseserver) + PVC + ServerDescription.json (ConfigMap) ``` -For a CR named `windrose-server`, resource names match the existing production layout: +Each `WindroseServer` reconciles these Kubernetes resources: -| Resource | Name | -|----------|------| +| Kind | Default name (CR: `windrose-server`) | +|------|--------------------------------------| +| Deployment | `windrose-server` | +| PersistentVolumeClaim | `windrose-server-files` | +| ConfigMap | `windrose-server-config` | +| Service (ClusterIP) | `windrose-server` | +| Service (Envoy backend) | `windrose-server-envoy` | | Gateway | `windrose-gateway` | | EnvoyProxy | `game-windrose-kubevip` | | TCPRoute | `windrose-game-tcp` | | UDPRoute | `windrose-game-udp` | -| Backend Service | `windrose-server-envoy` | + +Gateway-related names strip a trailing `-server` suffix from the CR name before applying the patterns above. Override with `spec.gateway.gatewayName` or `spec.gateway.envoyProxyName`. ## Prerequisites - Kubernetes 1.28+ -- [Envoy Gateway](https://gateway.envoyproxy.io/) with `GatewayClass` `envoy` -- A StorageClass for persistent volumes (35 Gi minimum recommended) -- A dedicated Kube-VIP / MetalLB IP per server (`spec.gateway.address`) +- [Envoy Gateway](https://gateway.envoyproxy.io/) installed with a `GatewayClass` named `envoy` +- A StorageClass for persistent volumes (35 Gi minimum per Windrose guidance) +- One dedicated external IP per server (`spec.gateway.address`), typically from Kube-VIP or MetalLB ## Quick start @@ -50,37 +71,102 @@ Install the CRD and operator: kubectl apply -k config/default ``` -Create a server (adjust the gateway IP and storage class for your cluster): +Create a server (adjust IP, namespace, and storage class for your cluster): ```shell kubectl apply -f config/samples/windrose_v1alpha1_windroseserver.yaml ``` -Watch status: +Check status: ```shell -kubectl get windroseserver windrose-server -n game-servers -w +kubectl get windroseserver -n game-servers +kubectl describe windroseserver windrose-server -n game-servers +``` + +Connect in-game via **Play → Connect to Server** using: + +- Address: `.status.connectionAddress` (falls back to `spec.gateway.address`) +- Port: `.status.connectionPort` (defaults to `7777`) + +## Example + +```yaml +apiVersion: windrose.dataknife.ai/v1alpha1 +kind: WindroseServer +metadata: + name: windrose-server + namespace: game-servers +spec: + serverImage: windroseserver/windroseserver:latest + gateway: + address: 192.168.14.186 + className: envoy + useDirectConnection: true + directConnectionServerPort: 7777 + directConnectionProxyAddress: 0.0.0.0 + serverName: My Windrose Server + maxPlayerCount: 4 + userSelectedRegion: EU + storageSize: 35Gi + storageClassName: truenas-csi-nfs + nodeSelector: + kubernetes.io/os: linux + kubernetes.io/arch: amd64 ``` -Connect in-game with **Play → Connect to Server** using `.status.connectionAddress` and `.status.connectionPort`. +## Spec reference -## WindroseServer spec +### Gateway (required) | Field | Default | Description | |-------|---------|-------------| -| `serverImage` | `windroseserver/windroseserver:latest` | Official Linux server image | -| `gateway.address` | *(required)* | External IP (e.g. `192.168.14.186`) | +| `gateway.address` | *(required)* | External IP for this server (e.g. `192.168.14.186`) | | `gateway.className` | `envoy` | GatewayClass name | -| `useDirectConnection` | `true` | Direct IP connections | -| `directConnectionServerPort` | `7777` | Game port (TCP + UDP) | -| `storageSize` | `35Gi` | PVC size for world saves | -| `storageClassName` | | StorageClass for saves PVC | -| `maxPlayerCount` | `4` | Max players; also selects pod resources when `resources` is unset | -| `resources` | auto | Override pod CPU/memory (see table below) | +| `gateway.gatewayName` | `{base}-gateway` | Override Gateway resource name | +| `gateway.envoyProxyName` | `game-{base}-kubevip` | Override EnvoyProxy resource name | +| `gateway.externalTrafficPolicy` | `Cluster` | Envoy LoadBalancer traffic policy | + +### Server image + +| Field | Default | Description | +|-------|---------|-------------| +| `serverImage` | `windroseserver/windroseserver:latest` | Official Linux server image | +| `imagePullPolicy` | `IfNotPresent` | Container pull policy | +| `imagePullSecrets` | | Pull secrets for private registries | +| `nodeSelector` | | Pin the pod to specific nodes | + +### Game settings + +These fields are written to `ServerDescription.json`. See the [dedicated server guide](https://playwindrose.com/dedicated-server-guide) for semantics. + +| Field | Default | Description | +|-------|---------|-------------| +| `useDirectConnection` | `true` | Direct IP connections (required for Kubernetes) | +| `directConnectionServerPort` | `7777` | Game port exposed via TCP and UDP | +| `directConnectionProxyAddress` | `0.0.0.0` | Bind address inside the container | +| `serverName` | | Display name in the server browser | +| `password` | | Server password (empty = public) | +| `maxPlayerCount` | `4` | Max simultaneous players (1–32) | +| `userSelectedRegion` | | `SEA`, `CIS`, or `EU`; empty = auto-detect | +| `inviteCode` | | Invite code when `useDirectConnection` is `false` | +| `p2pProxyAddress` | `127.0.0.1` | P2P proxy address for invite-code mode | +| `autoLoadLatestBackupIfHasBroken` | `true` | Restore broken saves from backups on launch | + +Direct IP and invite-code modes are mutually exclusive in Windrose. Kubernetes deployments should use direct connection. -### Auto-selected pod resources +### Storage -When `spec.resources` is omitted, CPU and memory are derived from `maxPlayerCount` using [Windrose hardware guidance](https://playwindrose.com/dedicated-server-guide): +| Field | Default | Description | +|-------|---------|-------------| +| `storageSize` | `35Gi` | PVC capacity for world saves | +| `storageClassName` | | StorageClass for the saves PVC | + +Saves are mounted at `/home/ue_user/app/R5/Saved`. `WorldDescription.json` is created by the server on first boot and stored on the PVC. + +### Pod resources + +When `spec.resources` is **omitted**, CPU and memory are derived from `maxPlayerCount` using [Windrose hardware guidance](https://playwindrose.com/dedicated-server-guide): | Players | CPU request | Memory request | CPU limit | Memory limit | |---------|-------------|----------------|-----------|--------------| @@ -88,25 +174,35 @@ When `spec.resources` is omitted, CPU and memory are derived from `maxPlayerCoun | 3–4 | 2 | 12Gi | 4 | 16Gi | | 5–32 | 2 | 16Gi | 4 | 16Gi | -To override, set `spec.resources` explicitly: +When `spec.resources` is **set** (requests or limits), it fully overrides auto-selection: ```yaml spec: maxPlayerCount: 10 resources: requests: - cpu: "2" - memory: 16Gi + cpu: 250m + memory: 2Gi limits: cpu: "4" - memory: 20Gi + memory: 10Gi ``` -Settings map to [`ServerDescription.json`](https://playwindrose.com/dedicated-server-guide) fields. World configuration (`WorldDescription.json`) is created by the server on first boot and stored on the PVC. +## Status + +| Field | Description | +|-------|-------------| +| `phase` | `Pending`, `Running`, or `Failed` | +| `ready` | `true` when the game server pod is ready | +| `connectionAddress` | IP clients connect to | +| `connectionPort` | Port clients connect to | +| `message` | Human-readable detail | + +Short name: `kubectl get ws` ## Official Docker image layout -The operator mounts resources the same way as the upstream Docker instructions: +The operator mirrors the upstream Docker run invocation: ```shell docker run --user ue_user --name WindroseServer \ @@ -118,15 +214,19 @@ docker run --user ue_user --name WindroseServer \ ## Development +Requires Go 1.25+. + ```shell -make generate manifests +make generate manifests # CRD, RBAC, deepcopy make test -make run +make build # bin/manager +make run # local controller +make docker-build IMG=harbor.dataknife.net/library/windrose-operator:latest ``` ## Related projects -- [DataKnifeAI/windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s) — Wine-based Windrose server image and Kustomize manifests +- [DataKnifeAI/windrose-server-k8s](https://github.com/DataKnifeAI/windrose-server-k8s) — Wine-based image and Kustomize manifests - [Windrose Dedicated Server Guide](https://playwindrose.com/dedicated-server-guide) - [windroseserver/windroseserver on Docker Hub](https://hub.docker.com/r/windroseserver/windroseserver)