Documentation ¶
Index ¶
- Variables
- func AssertTrackingObject(gvk schema.GroupVersionKind, namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
- func AssertTrackingSecret(namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
- func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger, ...) reconcilertesting.Factory
- func NewClusterImagePolicy(name string, o ...ClusterImagePolicyOption) *v1alpha1.ClusterImagePolicy
- func NewScheme() *runtime.Scheme
- func ToUnstructured(t *testing.T, objs []runtime.Object) (us []runtime.Object)
- func WithClusterImagePolicyDeletionTimestamp(cip *v1alpha1.ClusterImagePolicy)
- func WithFinalizer(cip *v1alpha1.ClusterImagePolicy)
- type ClusterImagePolicyOption
- type Ctor
- type Listers
- func (l *Listers) GetAllObjects() []runtime.Object
- func (l *Listers) GetClusterImagePolicyLister() cosignlisters.ClusterImagePolicyLister
- func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister
- func (l *Listers) GetCosignObjects() []runtime.Object
- func (l *Listers) GetKubeObjects() []runtime.Object
- func (l *Listers) GetSecretLister() corev1listers.SecretLister
Constants ¶
This section is empty.
Variables ¶
var TrackerKey key = struct{}{}
TrackerKey is used to looking a FakeTracker in a context.Context
Functions ¶
func AssertTrackingObject ¶
func AssertTrackingObject(gvk schema.GroupVersionKind, namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
AssertTrackingObject will ensure the following objects are being tracked
func AssertTrackingSecret ¶
func AssertTrackingSecret(namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
AssertTrackingSecret will ensure the provided Secret is being tracked
func MakeFactory ¶
func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger, privKMSKey *ecdsa.PrivateKey) reconcilertesting.Factory
MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
func NewClusterImagePolicy ¶
func NewClusterImagePolicy(name string, o ...ClusterImagePolicyOption) *v1alpha1.ClusterImagePolicy
NewClusterImagePolicy creates a ClusterImagePolicy with ClusterImagePolicyOptions.
func ToUnstructured ¶
ToUnstructured takes a list of k8s resources and converts them to Unstructured objects. We must pass objects as Unstructured to the dynamic client fake, or it won't handle them properly.
func WithClusterImagePolicyDeletionTimestamp ¶
func WithClusterImagePolicyDeletionTimestamp(cip *v1alpha1.ClusterImagePolicy)
func WithFinalizer ¶
func WithFinalizer(cip *v1alpha1.ClusterImagePolicy)
Types ¶
type ClusterImagePolicyOption ¶
type ClusterImagePolicyOption func(*v1alpha1.ClusterImagePolicy)
ClusterImagePolicyOption enables further configuration of a ClusterImagePolicy.
func WithAuthority ¶
func WithAuthority(a v1alpha1.Authority) ClusterImagePolicyOption
func WithImagePattern ¶
func WithImagePattern(ip v1alpha1.ImagePattern) ClusterImagePolicyOption
type Ctor ¶
type Ctor func(context.Context, *Listers, configmap.Watcher) controller.Reconciler
Ctor functions create a k8s controller with given params.
type Listers ¶
type Listers struct {
// contains filtered or unexported fields
}
func NewListers ¶
func (*Listers) GetAllObjects ¶
func (*Listers) GetClusterImagePolicyLister ¶
func (l *Listers) GetClusterImagePolicyLister() cosignlisters.ClusterImagePolicyLister
func (*Listers) GetConfigMapLister ¶
func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister
func (*Listers) GetCosignObjects ¶
func (*Listers) GetKubeObjects ¶
func (*Listers) GetSecretLister ¶
func (l *Listers) GetSecretLister() corev1listers.SecretLister