Update go dependencies
This commit is contained in:
parent
a858c549d9
commit
f3bde94d68
643 changed files with 14296 additions and 19354 deletions
7
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go
generated
vendored
7
vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go
generated
vendored
|
|
@ -16,11 +16,18 @@ limitations under the License.
|
|||
|
||||
package apiextensions
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// SetCRDCondition sets the status condition. It either overwrites the existing one or
|
||||
// creates a new one
|
||||
func SetCRDCondition(crd *CustomResourceDefinition, newCondition CustomResourceDefinitionCondition) {
|
||||
existingCondition := FindCRDCondition(crd, newCondition.Type)
|
||||
if existingCondition == nil {
|
||||
newCondition.LastTransitionTime = metav1.NewTime(time.Now())
|
||||
crd.Status.Conditions = append(crd.Status.Conditions, newCondition)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue