Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-6832

Operator Validating Webhook Requires Pruner In TektonConfig Spec

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      When Builds for OpenShift is installed from OperatorHub, it installs the OpenShift Pipelines operator in the namespace that Builds for OpenShift is installed in.
      After installation, the OpenShift Pipelines operator is unable to update the `TektonConfig` object due to a failure in the validating webhook.

      Workaround: Edit the created `TektonConfig` object (`config`) and set the .spec.pruner.keep value to a relatively high number (ex: 1000):

      oc edit tektonconfigs config
      ...
      spec:
        ...
        pruner:
          disabled: false
          keep: 1000
      ...
      

      Prerequisites (if any, like setup, operators/versions):

      1. Builds for OpenShift 1.2.0
      2. OpenShift 4.17.z (found on ROSA)

      Steps to Reproduce

      1. Install Builds for OpenShift 1.2 from OperatorHub.
      2. Check if the operator deploys Tekton in the openshift-pipelines namespace.

       

      Actual results:

      Tekton fails to deploy, error message in the openshift-pipelines operator logs:

      {"level":"info","timestamp":"2024-11-25T18:36:53.401Z","logger":"tekton-operator-lifecycle.event-broadcaster","caller":"record/event.go:364","msg":"Event(v1.ObjectReference{Kind:\"TektonConfig\", Namespace:\"\", Name:\"config\", UID:\"de70e9b6-ec63-4b25-b377-add833640a29\", APIVersion:\"operator.tekton.dev/v1alpha1\", ResourceVersion:\"17433\", FieldPath:\"\"}): type: 'Warning' reason: 'UpdateFailed' Failed to update status for \"config\": admission webhook \"validation.webhook.operator.tekton.dev\" denied the request: validation failed: expected exactly one, got neither: spec.pruner.keep, spec.pruner.keep-since\nmissing field(s): spec.pruner.resources","commit":"391a4f0","knative.dev/pod":"openshift-pipelines-operator-648cb677d9-vv4fc"}
      

      Expected results:

      Tekton deploys successfully

      Reproducibility (Always/Intermittent/Only Once):

      Almost always.

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Observed with OpenShift Pipelines 1.16.1 on ROSA 4.17.4

      Additional info (Such as Logs, Screenshots, etc):

       

              rh-ee-prbindal Pramod Bindal
              adkaplan@redhat.com Adam Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: