From 8e995945e0f7695fd0310e630d55849d807b1051 Mon Sep 17 00:00:00 2001 From: Philip Schmid Date: Fri, 1 Nov 2024 10:01:01 +0100 Subject: [PATCH] crd: Added shortnames for Tetragon CRDs Signed-off-by: Philip Schmid --- install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml | 2 ++ .../tetragon/crds-yaml/cilium.io_tracingpolicies.yaml | 2 ++ .../crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml | 2 ++ .../cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml | 2 ++ .../client/crds/v1alpha1/cilium.io_tracingpolicies.yaml | 2 ++ .../crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml | 2 ++ pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go | 4 ++-- pkg/k8s/apis/cilium.io/v1alpha1/types.go | 2 +- .../cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml | 2 ++ .../client/crds/v1alpha1/cilium.io_tracingpolicies.yaml | 2 ++ .../crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml | 2 ++ .../pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go | 4 ++-- .../cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go | 2 +- 13 files changed, 24 insertions(+), 6 deletions(-) diff --git a/install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml b/install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml index 80b95737864..c25ffa2646f 100644 --- a/install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml +++ b/install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml @@ -11,6 +11,8 @@ spec: kind: PodInfo listKind: PodInfoList plural: podinfo + shortNames: + - pi singular: podinfo scope: Namespaced versions: diff --git a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml index 6506281dac0..d1430576d66 100644 --- a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml +++ b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpolicies.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicy listKind: TracingPolicyList plural: tracingpolicies + shortNames: + - tp singular: tracingpolicy scope: Cluster versions: diff --git a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml index 544d33e731f..33f4be2dcc2 100644 --- a/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml +++ b/install/kubernetes/tetragon/crds-yaml/cilium.io_tracingpoliciesnamespaced.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicyNamespaced listKind: TracingPolicyNamespacedList plural: tracingpoliciesnamespaced + shortNames: + - tpn singular: tracingpolicynamespaced scope: Namespaced versions: diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml index 80b95737864..c25ffa2646f 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml @@ -11,6 +11,8 @@ spec: kind: PodInfo listKind: PodInfoList plural: podinfo + shortNames: + - pi singular: podinfo scope: Namespaced versions: diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index 6506281dac0..d1430576d66 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicy listKind: TracingPolicyList plural: tracingpolicies + shortNames: + - tp singular: tracingpolicy scope: Cluster versions: diff --git a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index 544d33e731f..33f4be2dcc2 100644 --- a/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicyNamespaced listKind: TracingPolicyNamespacedList plural: tracingpoliciesnamespaced + shortNames: + - tpn singular: tracingpolicynamespaced scope: Namespaced versions: diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go b/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go index 69cfc633a80..c244775fc22 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go @@ -37,7 +37,7 @@ const ( // +genclient:noStatus // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="tracingpolicy",path="tracingpolicies",scope="Cluster",shortName={} +// +kubebuilder:resource:singular="tracingpolicy",path="tracingpolicies",scope="Cluster",shortName={tp} type TracingPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` @@ -48,7 +48,7 @@ type TracingPolicy struct { // +genclient // +genclient:noStatus // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="tracingpolicynamespaced",path="tracingpoliciesnamespaced",scope="Namespaced",shortName={} +// +kubebuilder:resource:singular="tracingpolicynamespaced",path="tracingpoliciesnamespaced",scope="Namespaced",shortName={tpn} type TracingPolicyNamespaced struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/types.go b/pkg/k8s/apis/cilium.io/v1alpha1/types.go index 801d7016341..f062ab20e8e 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/types.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/types.go @@ -384,7 +384,7 @@ type WorkloadObjectMeta struct { // +genclient // +kubebuilder:object:root=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="podinfo",path="podinfo",scope="Namespaced",shortName={} +// +kubebuilder:resource:singular="podinfo",path="podinfo",scope="Namespaced",shortName={pi} // PodInfo is the Scheme for the Podinfo API type PodInfo struct { diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml index 80b95737864..c25ffa2646f 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_podinfo.yaml @@ -11,6 +11,8 @@ spec: kind: PodInfo listKind: PodInfoList plural: podinfo + shortNames: + - pi singular: podinfo scope: Namespaced versions: diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml index 6506281dac0..d1430576d66 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpolicies.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicy listKind: TracingPolicyList plural: tracingpolicies + shortNames: + - tp singular: tracingpolicy scope: Cluster versions: diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml index 544d33e731f..33f4be2dcc2 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/client/crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml @@ -11,6 +11,8 @@ spec: kind: TracingPolicyNamespaced listKind: TracingPolicyNamespacedList plural: tracingpoliciesnamespaced + shortNames: + - tpn singular: tracingpolicynamespaced scope: Namespaced versions: diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go index 69cfc633a80..c244775fc22 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go @@ -37,7 +37,7 @@ const ( // +genclient:noStatus // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="tracingpolicy",path="tracingpolicies",scope="Cluster",shortName={} +// +kubebuilder:resource:singular="tracingpolicy",path="tracingpolicies",scope="Cluster",shortName={tp} type TracingPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` @@ -48,7 +48,7 @@ type TracingPolicy struct { // +genclient // +genclient:noStatus // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="tracingpolicynamespaced",path="tracingpoliciesnamespaced",scope="Namespaced",shortName={} +// +kubebuilder:resource:singular="tracingpolicynamespaced",path="tracingpoliciesnamespaced",scope="Namespaced",shortName={tpn} type TracingPolicyNamespaced struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` diff --git a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go index 801d7016341..f062ab20e8e 100644 --- a/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go +++ b/vendor/github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1/types.go @@ -384,7 +384,7 @@ type WorkloadObjectMeta struct { // +genclient // +kubebuilder:object:root=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:singular="podinfo",path="podinfo",scope="Namespaced",shortName={} +// +kubebuilder:resource:singular="podinfo",path="podinfo",scope="Namespaced",shortName={pi} // PodInfo is the Scheme for the Podinfo API type PodInfo struct {