Skip to content

Implement parsing of certificate validity duration and renewal grace period from service labels #9

Open
@simu

Description

@simu

Currently, both the certificate validity duration and the renewal grace period are hard-coded in the controller. We should implement optional service labels which users can set to customize the validity duration and renewal grace period for their service certificates.

Current implementation:

func certDurationFromSvc(svc *corev1.Service) (*metav1.Duration, error) {
// TODO: annotation/label on svc
d, err := time.ParseDuration("2160h")
if err != nil {
return nil, err
}
return &metav1.Duration{Duration: d}, nil
}
func certRenewBeforeFromSvc(svc *corev1.Service) (*metav1.Duration, error) {
// TODO: annotation/label on svc
d, err := time.ParseDuration("360h")
if err != nil {
return nil, err
}
return &metav1.Duration{Duration: d}, nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions