Documentation ¶
Index ¶
- Variables
- func AssertTrackingConfigMap(namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
- 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 MarkReady(cip *v1alpha1.ClusterImagePolicy)
- func MarkReadyTrustRoot(tr *v1alpha1.TrustRoot)
- func NewClusterImagePolicy(name string, o ...ClusterImagePolicyOption) *v1alpha1.ClusterImagePolicy
- func NewScheme() *runtime.Scheme
- func NewTrustRoot(name string, o ...TrustRootOption) *v1alpha1.TrustRoot
- func ToUnstructured(t *testing.T, objs []runtime.Object) (us []runtime.Object)
- func WithClusterImagePolicyDeletionTimestamp(cip *v1alpha1.ClusterImagePolicy)
- func WithFinalizer(cip *v1alpha1.ClusterImagePolicy)
- func WithInitConditions(cip *v1alpha1.ClusterImagePolicy)
- func WithInitConditionsTrustRoot(tr *v1alpha1.TrustRoot)
- func WithMarkInlineKeysOk(cip *v1alpha1.ClusterImagePolicy)
- func WithMarkInlineKeysOkTrustRoot(tr *v1alpha1.TrustRoot)
- func WithMarkInlinePoliciesOk(cip *v1alpha1.ClusterImagePolicy)
- func WithTrustRootDeletionTimestamp(tr *v1alpha1.TrustRoot)
- func WithTrustRootFinalizer(tr *v1alpha1.TrustRoot)
- type ClusterImagePolicyOption
- func WithAuthority(a v1alpha1.Authority) ClusterImagePolicyOption
- func WithImagePattern(ip v1alpha1.ImagePattern) ClusterImagePolicyOption
- func WithMarkCMUpdateFailed(msg string) ClusterImagePolicyOption
- func WithMarkInlineKeysFailed(msg string) ClusterImagePolicyOption
- func WithMarkInlinePoliciesFailed(msg string) ClusterImagePolicyOption
- func WithMatch(a v1alpha1.MatchResource) ClusterImagePolicyOption
- func WithMode(m string) ClusterImagePolicyOption
- func WithObservedGeneration(gen int64) ClusterImagePolicyOption
- func WithPolicy(p *v1alpha1.Policy) ClusterImagePolicyOption
- func WithResourceVersion(resourceVersion string) ClusterImagePolicyOption
- func WithUID(uid string) ClusterImagePolicyOption
- type Ctor
- type Listers
- func (l *Listers) GetAllObjects() []runtime.Object
- func (l *Listers) GetClusterImagePolicyLister() policylisters.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
- func (l *Listers) GetTrustRootLister() policylisters.TrustRootLister
- type TrustRootOption
- func WithMarkCMUpdateFailedTrustRoot(msg string) TrustRootOption
- func WithMarkInlineKeysFailedTrustRoot(msg string) TrustRootOption
- func WithObservedGenerationTrustRoot(gen int64) TrustRootOption
- func WithRepository(targets string, root, repository []byte) TrustRootOption
- func WithSigstoreKeys(sk map[string]string) TrustRootOption
- func WithTrustRootResourceVersion(resourceVersion string) TrustRootOption
- func WithTrustRootUID(uid string) TrustRootOption
Constants ¶
This section is empty.
Variables ¶
var TrackerKey key = struct{}{}
TrackerKey is used to looking a FakeTracker in a context.Context
Functions ¶
func AssertTrackingConfigMap ¶ added in v0.6.0
func AssertTrackingConfigMap(namespace, name string) func(*testing.T, *reconcilertesting.TableRow)
AssertTrackingConfigMap will ensure the provided ConfigMap is being tracked
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 MarkReady ¶ added in v0.7.0
func MarkReady(cip *v1alpha1.ClusterImagePolicy)
func MarkReadyTrustRoot ¶ added in v0.7.0
func NewClusterImagePolicy ¶
func NewClusterImagePolicy(name string, o ...ClusterImagePolicyOption) *v1alpha1.ClusterImagePolicy
NewClusterImagePolicy creates a ClusterImagePolicy with ClusterImagePolicyOptions.
func NewTrustRoot ¶ added in v0.6.0
func NewTrustRoot(name string, o ...TrustRootOption) *v1alpha1.TrustRoot
NewTrustRoot creates a TrustRoot with TrustRootOptions.
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)
func WithInitConditions ¶ added in v0.7.0
func WithInitConditions(cip *v1alpha1.ClusterImagePolicy)
func WithInitConditionsTrustRoot ¶ added in v0.7.0
func WithMarkInlineKeysOk ¶ added in v0.7.0
func WithMarkInlineKeysOk(cip *v1alpha1.ClusterImagePolicy)
func WithMarkInlineKeysOkTrustRoot ¶ added in v0.7.0
func WithMarkInlinePoliciesOk ¶ added in v0.7.0
func WithMarkInlinePoliciesOk(cip *v1alpha1.ClusterImagePolicy)
func WithTrustRootDeletionTimestamp ¶ added in v0.6.0
func WithTrustRootFinalizer ¶ added in v0.6.0
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
func WithMarkCMUpdateFailed ¶ added in v0.7.0
func WithMarkCMUpdateFailed(msg string) ClusterImagePolicyOption
func WithMarkInlineKeysFailed ¶ added in v0.7.0
func WithMarkInlineKeysFailed(msg string) ClusterImagePolicyOption
func WithMarkInlinePoliciesFailed ¶ added in v0.7.0
func WithMarkInlinePoliciesFailed(msg string) ClusterImagePolicyOption
func WithMatch ¶ added in v0.4.0
func WithMatch(a v1alpha1.MatchResource) ClusterImagePolicyOption
func WithMode ¶ added in v0.3.0
func WithMode(m string) ClusterImagePolicyOption
func WithObservedGeneration ¶ added in v0.7.0
func WithObservedGeneration(gen int64) ClusterImagePolicyOption
func WithPolicy ¶ added in v0.6.0
func WithPolicy(p *v1alpha1.Policy) ClusterImagePolicyOption
func WithResourceVersion ¶ added in v0.4.0
func WithResourceVersion(resourceVersion string) ClusterImagePolicyOption
func WithUID ¶ added in v0.4.0
func WithUID(uid string) 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() policylisters.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
func (*Listers) GetTrustRootLister ¶ added in v0.6.0
func (l *Listers) GetTrustRootLister() policylisters.TrustRootLister
type TrustRootOption ¶ added in v0.6.0
TrustRootOption enables further configuration of a ClusterImagePolicy.
func WithMarkCMUpdateFailedTrustRoot ¶ added in v0.7.0
func WithMarkCMUpdateFailedTrustRoot(msg string) TrustRootOption
func WithMarkInlineKeysFailedTrustRoot ¶ added in v0.7.0
func WithMarkInlineKeysFailedTrustRoot(msg string) TrustRootOption
func WithObservedGenerationTrustRoot ¶ added in v0.7.0
func WithObservedGenerationTrustRoot(gen int64) TrustRootOption
func WithRepository ¶ added in v0.6.0
func WithRepository(targets string, root, repository []byte) TrustRootOption
WithRepository constructs a TrustRootOption which is suitable for reconciler table driven testing.
func WithSigstoreKeys ¶ added in v0.6.0
func WithSigstoreKeys(sk map[string]string) TrustRootOption
WithSigstoreKeys constructs a TrustRootOption which is suitable for reconciler table driven testing. It hardcodes things like organizations/common names, and URI/BaseURLs with predictable values.
func WithTrustRootResourceVersion ¶ added in v0.6.0
func WithTrustRootResourceVersion(resourceVersion string) TrustRootOption
func WithTrustRootUID ¶ added in v0.6.0
func WithTrustRootUID(uid string) TrustRootOption