Documentation ¶
Index ¶
- Constants
- Variables
- func CertificateHasCondition(crt *cmapi.Certificate, c cmapi.CertificateCondition) bool
- func IssuerHasCondition(i cmapi.GenericIssuer, c cmapi.IssuerCondition) bool
- func NameForIssuer(i cmapi.GenericIssuer) (string, error)
- func SetCertificateCondition(crt *cmapi.Certificate, conditionType cmapi.CertificateConditionType, ...)
- func SetIssuerCondition(i cmapi.GenericIssuer, conditionType cmapi.IssuerConditionType, ...)
Constants ¶
const ( // IssuerACME is the name of the ACME issuer IssuerACME string = "acme" // IssuerCA is the name of the simple issuer IssuerCA string = "ca" // IssuerVault is the name of the Vault issuer IssuerVault string = "vault" // IssuerSelfSigned is a self signing issuer IssuerSelfSigned string = "selfsigned" )
Variables ¶
var Clock clock.Clock = clock.RealClock{}
Clock is defined as a package var so it can be stubbed out during tests.
Functions ¶
func CertificateHasCondition ¶
func CertificateHasCondition(crt *cmapi.Certificate, c cmapi.CertificateCondition) bool
CertificateHasCondition will return true if the given Certificate has a condition matching the provided CertificateCondition. Only the Type and Status field will be used in the comparison, meaning that this function will return 'true' even if the Reason, Message and LastTransitionTime fields do not match.
func IssuerHasCondition ¶
func IssuerHasCondition(i cmapi.GenericIssuer, c cmapi.IssuerCondition) bool
IssuerHasCondition will return true if the given GenericIssuer has a condition matching the provided IssuerCondition. Only the Type and Status field will be used in the comparison, meaning that this function will return 'true' even if the Reason, Message and LastTransitionTime fields do not match.
func NameForIssuer ¶
func NameForIssuer(i cmapi.GenericIssuer) (string, error)
NameForIssuer determines the name of the Issuer implementation given an Issuer resource.
func SetCertificateCondition ¶
func SetCertificateCondition(crt *cmapi.Certificate, conditionType cmapi.CertificateConditionType, status cmapi.ConditionStatus, reason, message string)
SetCertificateCondition will set a 'condition' on the given Certificate.
- If no condition of the same type already exists, the condition will be inserted with the LastTransitionTime set to the current time.
- If a condition of the same type and state already exists, the condition will be updated but the LastTransitionTime will not be modified.
- If a condition of the same type and different state already exists, the condition will be updated and the LastTransitionTime set to the current time.
func SetIssuerCondition ¶
func SetIssuerCondition(i cmapi.GenericIssuer, conditionType cmapi.IssuerConditionType, status cmapi.ConditionStatus, reason, message string)
SetIssuerCondition will set a 'condition' on the given GenericIssuer.
- If no condition of the same type already exists, the condition will be inserted with the LastTransitionTime set to the current time.
- If a condition of the same type and state already exists, the condition will be updated but the LastTransitionTime will not be modified.
- If a condition of the same type and different state already exists, the condition will be updated and the LastTransitionTime set to the current time.
This function works with both Issuer and ClusterIssuer resources.
Types ¶
This section is empty.