Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-35196

Insights API - duration attribute validation pattern is not correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.16
    • Insights Operator

      The following Insights APIs use duration attributes:

      • insightsoperator.operator.openshift.io
      • datagathers.insights.openshift.io

      The kubebuilder validation patterns are defined as

      ^0|([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
      

      and

      ^([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
      

      Unfortunately this is not enough and it fails in case of updating the resource e.g with value "2m0s".

      The validation pattern must allow these values.

              tremes1@redhat.com Tomas Remes
              tremes1@redhat.com Tomas Remes
              Joao Bastos Fula Joao Bastos Fula
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: