Skip to content

Commit

Permalink
crd: Added 'tetragon' category for Tetragon CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Schmid <[email protected]>
  • Loading branch information
PhilipSchmid committed Nov 4, 2024
1 parent 954d963 commit ba788ec
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 6 deletions.
2 changes: 2 additions & 0 deletions install/kubernetes/tetragon/crds-yaml/cilium.io_podinfo.yaml
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: PodInfo
listKind: PodInfoList
plural: podinfo
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
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: PodInfo
listKind: PodInfoList
plural: podinfo
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
2 changes: 1 addition & 1 deletion pkg/k8s/apis/cilium.io/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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={tgpi}
// +kubebuilder:resource:categories={tetragon},singular="podinfo",path="podinfo",scope="Namespaced",shortName={tgpi}

// PodInfo is the Scheme for the Podinfo API
type PodInfo struct {
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.

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 ba788ec

Please sign in to comment.