csr

package
v0.52.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonApproved = "AutoApproved"
)

Variables

View Source
var (
	ErrNodeCertificateNotFound = errors.New("node certificate not found")
)

Functions

func WatchCastAINodeCSRs added in v0.41.9

func WatchCastAINodeCSRs(ctx context.Context, log logrus.FieldLogger, client kubernetes.Interface, c chan *Certificate)

Types

type ApprovalManager added in v0.51.0

type ApprovalManager struct {
	// contains filtered or unexported fields
}

func NewApprovalManager added in v0.51.0

func NewApprovalManager(log logrus.FieldLogger, clientset kubernetes.Interface) *ApprovalManager

func (*ApprovalManager) Start added in v0.51.0

func (h *ApprovalManager) Start(ctx context.Context)

func (*ApprovalManager) Stop added in v0.51.0

func (h *ApprovalManager) Stop(ctx context.Context)

type Certificate

type Certificate struct {
	Name           string
	RequestingUser string
	// contains filtered or unexported fields
}

Certificate wraps v1 and v1beta1 csr.

func GetCertificateByNodeName

func GetCertificateByNodeName(ctx context.Context, client kubernetes.Interface, nodeName string) (*Certificate, error)

GetCertificateByNodeName lists all csr objects and parses request pem encoded cert to find it by node name.

func (*Certificate) ApproveCertificate added in v0.41.9

func (c *Certificate) ApproveCertificate(ctx context.Context, client kubernetes.Interface) (*Certificate, error)

ApproveCertificate approves csr.

func (*Certificate) Approved

func (c *Certificate) Approved() bool

func (*Certificate) DeleteCertificate added in v0.41.9

func (c *Certificate) DeleteCertificate(ctx context.Context, client kubernetes.Interface) error

DeleteCertificate deletes csr.

func (*Certificate) NewCSR added in v0.41.9

func (c *Certificate) NewCSR(ctx context.Context, client kubernetes.Interface) (*Certificate, error)

NewCSR creates new csr.

func (*Certificate) Validate

func (c *Certificate) Validate() error

Jump to

Keyboard shortcuts

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