From 288bb824aa39097ec42178191ba9b303b8298c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Thu, 19 Aug 2021 22:58:42 +0200 Subject: [PATCH] pkg/k8s: fix resource scope of Kilo CRD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- manifests/crds.yaml | 2 +- pkg/k8s/apis/kilo/v1alpha1/types.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/crds.yaml b/manifests/crds.yaml index ae8b391..132a873 100644 --- a/manifests/crds.yaml +++ b/manifests/crds.yaml @@ -12,7 +12,7 @@ spec: listKind: PeerList plural: peers singular: peer - scope: Namespaced + scope: Cluster versions: - name: v1alpha1 schema: diff --git a/pkg/k8s/apis/kilo/v1alpha1/types.go b/pkg/k8s/apis/kilo/v1alpha1/types.go index b7f2902..e0d29a1 100644 --- a/pkg/k8s/apis/kilo/v1alpha1/types.go +++ b/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 {