Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit Pattern to validate Duration fields #1690

Commits on Feb 15, 2022

  1. Explicit Pattern to validate Duration fields

    Due to a difference in how apiserver validates `Format=duration` vs how
    apimachinery unmarshals `metav1.Duration`, using that format can allow
    users to blow up some of our controllers if they provide certain values
    for Duration fields (specifically: containing `d` or `w` units).
    Upstream issues have been opened against both sides of this discrepancy:
    - kubernetes/apimachinery#131
    - kubernetes/apiextensions-apiserver#56
    
    In the meantime, work around the problem by using an explicit regex
    instead of the built in format validator.
    
    (cherry picked from commit 665b268)
    
    Conflicts:
    	apis/hive/v1/clusterpool_types.go
    	config/crds/hive.openshift.io_clusterpools.yaml
    	hack/app-sre/saas-template.yaml
    	vendor/github.com/openshift/hive/apis/hive/v1/clusterpool_types.go
    
    These were due to the ResumeTimeout field added to ClusterPool since
    2.4.
    
    HIVE-1760
    2uasimojo committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    8bec000 View commit details
    Browse the repository at this point in the history