-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch refactors CRD handling. It introduces a new package (crdutils) that includes a CRD type, meant to hold all the information for registering a CRD. Registration code is moved into crdutils, and the caller just needs to specify the CRD objects to register. Signed-off-by: Kornilios Kourtis <[email protected]>
- Loading branch information
Showing
11 changed files
with
548 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright Authors of Tetragon | ||
|
||
package client | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/cilium/tetragon/pkg/k8s/apis/cilium.io/v1alpha1" | ||
crdutils "github.com/cilium/tetragon/pkg/k8s/crdutils" | ||
) | ||
|
||
var ( | ||
//go:embed crds/v1alpha1/cilium.io_tracingpolicies.yaml | ||
crdsv1Alpha1TracingPolicies []byte | ||
|
||
TracingPolicyCRD = crdutils.NewCRDBytes( | ||
v1alpha1.TPCRDName, | ||
v1alpha1.TPName, | ||
crdsv1Alpha1TracingPolicies) | ||
|
||
//go:embed crds/v1alpha1/cilium.io_tracingpoliciesnamespaced.yaml | ||
crdsv1Alpha1TracingPoliciesNamespaced []byte | ||
|
||
TracingPolicyNamespacedCRD = crdutils.NewCRDBytes( | ||
v1alpha1.TPNamespacedCRDName, | ||
v1alpha1.TPNamespacedName, | ||
crdsv1Alpha1TracingPoliciesNamespaced) | ||
|
||
//go:embed crds/v1alpha1/cilium.io_podinfo.yaml | ||
crdsv1Alpha1PodInfo []byte | ||
|
||
PodInfoCRD = crdutils.NewCRDBytes( | ||
v1alpha1.PICRDName, | ||
v1alpha1.PIName, | ||
crdsv1Alpha1PodInfo) | ||
|
||
AllCRDs = []crdutils.CRD{ | ||
TracingPolicyCRD, | ||
TracingPolicyNamespacedCRD, | ||
PodInfoCRD, | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.