@@ -47,13 +47,14 @@ func IssuerHasCondition(i cmapi.GenericIssuer, c cmapi.IssuerCondition) bool {
47
47
}
48
48
49
49
// SetIssuerCondition will set a 'condition' on the given GenericIssuer.
50
- // - If no condition of the same type already exists, the condition will be
51
- // inserted with the LastTransitionTime set to the current time.
52
- // - If a condition of the same type and state already exists, the condition
53
- // will be updated but the LastTransitionTime will not be modified.
54
- // - If a condition of the same type and different state already exists, the
55
- // condition will be updated and the LastTransitionTime set to the current
56
- // time.
50
+ // - If no condition of the same type already exists, the condition will be
51
+ // inserted with the LastTransitionTime set to the current time.
52
+ // - If a condition of the same type and state already exists, the condition
53
+ // will be updated but the LastTransitionTime will not be modified.
54
+ // - If a condition of the same type and different state already exists, the
55
+ // condition will be updated and the LastTransitionTime set to the current
56
+ // time.
57
+ //
57
58
// This function works with both Issuer and ClusterIssuer resources.
58
59
func SetIssuerCondition (i cmapi.GenericIssuer , observedGeneration int64 , conditionType cmapi.IssuerConditionType , status cmmeta.ConditionStatus , reason , message string ) {
59
60
newCondition := cmapi.IssuerCondition {
@@ -151,13 +152,14 @@ func GetCertificateRequestCondition(req *cmapi.CertificateRequest, conditionType
151
152
}
152
153
153
154
// SetCertificateCondition will set a 'condition' on the given Certificate.
154
- // - If no condition of the same type already exists, the condition will be
155
- // inserted with the LastTransitionTime set to the current time.
156
- // - If a condition of the same type and state already exists, the condition
157
- // will be updated but the LastTransitionTime will not be modified.
158
- // - If a condition of the same type and different state already exists, the
159
- // condition will be updated with the LastTransitionTime set to the current
160
- // time.
155
+ // - If no condition of the same type already exists, the condition will be
156
+ // inserted with the LastTransitionTime set to the current time.
157
+ // - If a condition of the same type and state already exists, the condition
158
+ // will be updated but the LastTransitionTime will not be modified.
159
+ // - If a condition of the same type and different state already exists, the
160
+ // condition will be updated with the LastTransitionTime set to the current
161
+ // time.
162
+ //
161
163
// The given ObservedGeneration will always set on the condition, whether the
162
164
// lastTransitionTime is modified or not.
163
165
func SetCertificateCondition (crt * cmapi.Certificate , observedGeneration int64 , conditionType cmapi.CertificateConditionType ,
@@ -217,13 +219,13 @@ func RemoveCertificateCondition(crt *cmapi.Certificate, conditionType cmapi.Cert
217
219
}
218
220
219
221
// SetCertificateRequestCondition will set a 'condition' on the given CertificateRequest.
220
- // - If no condition of the same type already exists, the condition will be
221
- // inserted with the LastTransitionTime set to the current time.
222
- // - If a condition of the same type and state already exists, the condition
223
- // will be updated but the LastTransitionTime will not be modified.
224
- // - If a condition of the same type and different state already exists, the
225
- // condition will be updated and the LastTransitionTime set to the current
226
- // time.
222
+ // - If no condition of the same type already exists, the condition will be
223
+ // inserted with the LastTransitionTime set to the current time.
224
+ // - If a condition of the same type and state already exists, the condition
225
+ // will be updated but the LastTransitionTime will not be modified.
226
+ // - If a condition of the same type and different state already exists, the
227
+ // condition will be updated and the LastTransitionTime set to the current
228
+ // time.
227
229
func SetCertificateRequestCondition (cr * cmapi.CertificateRequest , conditionType cmapi.CertificateRequestConditionType , status cmmeta.ConditionStatus , reason , message string ) {
228
230
newCondition := cmapi.CertificateRequestCondition {
229
231
Type : conditionType ,
@@ -283,7 +285,7 @@ func CertificateRequestHasCondition(cr *cmapi.CertificateRequest, c cmapi.Certif
283
285
}
284
286
285
287
// This returns the status reason of a CertificateRequest. The order of reason
286
- // hierarchy is 'Failed' -> 'Ready' -> 'Pending' -> ''
288
+ // hierarchy is 'Failed' -> 'Ready' -> 'Pending' -> ”
287
289
func CertificateRequestReadyReason (cr * cmapi.CertificateRequest ) string {
288
290
for _ , reason := range []string {
289
291
cmapi .CertificateRequestReasonFailed ,
0 commit comments