Documentation ¶
Index ¶
- func AnnotateForRequiredCertRotation(ctx context.Context, k client.Client, name, namespace string) error
- func CheckCertExpiry(ctx context.Context, log logr.Logger, req ctrl.Request, k client.Client, ...) error
- func CreateOrRotateCertificates(ctx context.Context, log logr.Logger, req ctrl.Request, k client.Client, ...) error
- func GetOptions(ctx context.Context, k client.Client, req ctrl.Request) (certrotation.Options, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateForRequiredCertRotation ¶
func AnnotateForRequiredCertRotation(ctx context.Context, k client.Client, name, namespace string) error
AnnotateForRequiredCertRotation adds/updates the `tempo.grafana.com/certRotationRequiredAt` annotation to the named TempoStack if any of the managed client/serving/ca certificates expired. If no TempoStack is found, then skip reconciliation.
func CheckCertExpiry ¶
func CheckCertExpiry(ctx context.Context, log logr.Logger, req ctrl.Request, k client.Client, fg configv1alpha1.FeatureGates) error
CheckCertExpiry handles the case if the TempoStack managed signing CA, client and/or serving certificates expired. Returns true if any of those expired and an error representing the reason of expiry.
func CreateOrRotateCertificates ¶
func CreateOrRotateCertificates(ctx context.Context, log logr.Logger, req ctrl.Request, k client.Client, s *runtime.Scheme, fg configv1alpha1.FeatureGates) error
CreateOrRotateCertificates handles the TempoStack client and serving certificate creation and rotation including the signing CA and a ca bundle or else returns an error. It returns only a degrade-condition-worthy error if building the manifests fails for any reason.
func GetOptions ¶
func GetOptions(ctx context.Context, k client.Client, req ctrl.Request) (certrotation.Options, error)
GetOptions return a certrotation options struct filled with all found client and serving certificate secrets if any found. Return an error only if either the k8s client returns any other error except IsNotFound or if merging options fails.
Types ¶
This section is empty.