Răsfoiți Sursa

pkg/k8s: fix resource scope of Kilo CRD

When updating Kilo to the latest version of the CustomResourceDefinition
API, the Kilo Peer CRD was incorrectly scoped as a namespaced resource
due to differences in the ergonomics of the tooling.

This commit fixes the scoping of the Peer CRD to be cluster-wide.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Lucas Servén Marín 4 ani în urmă
părinte
comite
288bb824aa
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 1
      manifests/crds.yaml
  2. 1 0
      pkg/k8s/apis/kilo/v1alpha1/types.go

+ 1 - 1
manifests/crds.yaml

@@ -12,7 +12,7 @@ spec:
     listKind: PeerList
     plural: peers
     singular: peer
-  scope: Namespaced
+  scope: Cluster
   versions:
   - name: v1alpha1
     schema:

+ 1 - 0
pkg/k8s/apis/kilo/v1alpha1/types.go

@@ -48,6 +48,7 @@ var PeerShortNames = []string{"peer"}
 // +genclient:nonNamespaced
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 // +k8s:openapi-gen=true
+// +kubebuilder:resource:scope=Cluster
 
 // Peer is a WireGuard peer that should have access to the VPN.
 type Peer struct {