intree

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

cert-manager intree

Motivation

As we migrate in-tree issuers out of cert-manager repo, there is a need to avoid repeating the logic of watching for cert-manager Issuers and ClusterIssuers. This is because as we migrate intree issuers we want to maintain backwards compatiblity, which means we need to maintain the same Issuer/ClusterIssuer configuration. This package aims to address that requirement. It consumes the WrapperIssuer interface defined in api/<Version>/issuer_interface.go.

Currently, the intree package allows the caller to watch for two cert-manager resources:

  • Issuer
  • ClusterIssuer

Example

func (s Signer) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {
	return (&controllers.CombinedController{
		IssuerTypes:        intree.Issuers, // Monitors CM Issuer
		ClusterIssuerTypes: intree.ClusterIssuers, // Monitors CM ClusterIssuer

		FieldOwner:       "simpleissuer.testing.cert-manager.io",
		MaxRetryDuration: 1 * time.Minute,

		Sign:          s.Sign,
		Check:         s.Check,
		EventRecorder: mgr.GetEventRecorderFor("simpleissuer.testing.cert-manager.io"),
	}).SetupWithManager(ctx, mgr)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Issuers        []v1alpha1.Issuer = []v1alpha1.Issuer{&CMIssuer{}}
	ClusterIssuers []v1alpha1.Issuer = []v1alpha1.Issuer{&CMClusterIssuer{}}
)

Functions

This section is empty.

Types

type CMClusterIssuer

type CMClusterIssuer struct {
	cmapi.ClusterIssuer
}

+kubebuilder:object:root=true

func (*CMClusterIssuer) DeepCopy

func (in *CMClusterIssuer) DeepCopy() *CMClusterIssuer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CMClusterIssuer.

func (*CMClusterIssuer) DeepCopyInto

func (in *CMClusterIssuer) DeepCopyInto(out *CMClusterIssuer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CMClusterIssuer) DeepCopyObject

func (in *CMClusterIssuer) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CMClusterIssuer) GetConditions

func (i *CMClusterIssuer) GetConditions() (conditions []metav1.Condition)

func (*CMClusterIssuer) GetIssuerTypeIdentifier

func (i *CMClusterIssuer) GetIssuerTypeIdentifier() string

func (*CMClusterIssuer) IssuerSpec

func (i *CMClusterIssuer) IssuerSpec() *cmapi.IssuerSpec

func (*CMClusterIssuer) Unwrap

func (i *CMClusterIssuer) Unwrap() client.Object

type CMGenericIssuer

type CMGenericIssuer interface {
	v1alpha1.WrappedIssuer
	IssuerSpec() *cmapi.IssuerSpec
}

CMGenericIssuer is implemented by both CMIssuer and CMClusterIssuer

type CMIssuer

type CMIssuer struct {
	cmapi.Issuer
}

+kubebuilder:object:root=true

func (*CMIssuer) DeepCopy

func (in *CMIssuer) DeepCopy() *CMIssuer

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CMIssuer.

func (*CMIssuer) DeepCopyInto

func (in *CMIssuer) DeepCopyInto(out *CMIssuer)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CMIssuer) DeepCopyObject

func (in *CMIssuer) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*CMIssuer) GetConditions

func (i *CMIssuer) GetConditions() (conditions []metav1.Condition)

func (*CMIssuer) GetIssuerTypeIdentifier

func (i *CMIssuer) GetIssuerTypeIdentifier() string

func (*CMIssuer) IssuerSpec

func (i *CMIssuer) IssuerSpec() *cmapi.IssuerSpec

func (*CMIssuer) Unwrap

func (i *CMIssuer) Unwrap() client.Object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL