Skip to content

Commit

Permalink
crd: Added 'tetragon' category for Tetragon CRDs
Browse files Browse the repository at this point in the history
Applied for all user-relevant CRDs. Not for PodInfo.

Signed-off-by: Philip Schmid <[email protected]>
  • Loading branch information
PhilipSchmid authored and lambdanis committed Nov 8, 2024
1 parent 5089dc1 commit 0333520
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: cilium.io
names:
categories:
- tetragon
kind: TracingPolicy
listKind: TracingPolicyList
plural: tracingpolicies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: cilium.io
names:
categories:
- tetragon
kind: TracingPolicyNamespaced
listKind: TracingPolicyNamespacedList
plural: tracingpoliciesnamespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: cilium.io
names:
categories:
- tetragon
kind: TracingPolicy
listKind: TracingPolicyList
plural: tracingpolicies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: cilium.io
names:
categories:
- tetragon
kind: TracingPolicyNamespaced
listKind: TracingPolicyNamespacedList
plural: tracingpoliciesnamespaced
Expand Down
4 changes: 2 additions & 2 deletions pkg/k8s/apis/cilium.io/v1alpha1/tracing_policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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={tgtp}
// +kubebuilder:resource:categories={tetragon},singular="tracingpolicy",path="tracingpolicies",scope="Cluster",shortName={tgtp}
type TracingPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Expand All @@ -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={tgtpn}
// +kubebuilder:resource:categories={tetragon},singular="tracingpolicynamespaced",path="tracingpoliciesnamespaced",scope="Namespaced",shortName={tgtpn}
type TracingPolicyNamespaced struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Expand Down
1 change: 1 addition & 0 deletions pkg/k8s/crdutils/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func constructV1CRD(
Plural: template.Spec.Names.Plural,
ShortNames: template.Spec.Names.ShortNames,
Singular: template.Spec.Names.Singular,
Categories: template.Spec.Names.Categories,
},
Scope: template.Spec.Scope,
Versions: template.Spec.Versions,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0333520

Please sign in to comment.