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

Webhook service missing and tekton resources create/delete/update failing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • Pipelines 1.6.2
    • None
    • Operator
    • None
    • Pipelines Sprint 212, Pipelines Sprint 213

      This was reported on slack

      https://coreos.slack.com/archives/CSPS1077U/p1639584730229000

      webhook service was missing from cluster

      ```
      $ oc delete pipelinerun --all -n product-catalog-cicd
      Error from server (InternalError): Internal error occurred: failed calling webhook "validation.webhook.pipeline.tekton.dev": Post "
      https://tekton-pipelines-webhook.openshift-pipelines.svc:443/resource-validation?timeout=10s
      ": service "tekton-pipelines-webhook" not found
      Error from server (InternalError): Internal error occurred: failed calling webhook "validation.webhook.pipeline.tekton.dev": Post "
      https://tekton-pipelines-webhook.openshift-pipelines.svc:443/resource-validation?timeout=10s
      ": service "tekton-pipelines-webhook" not found
      ```

      How to test the fix 🧑‍💻

      1. Install operator latest build
      2. Ensure that the installation is successful

      $ oc get tektonconfig config
      NAME READY REASON
      config True

      we test this fix by ensuring 3 things:
      a. pipelines configMap(s) eg: config-defaults can be edited when even when webhook pod is down (scaled to 0)
      b. config-defaults can be deleted and we can scale webhook back to 1
      c. scaling the deployment should recreate the config-defaults configMap

      3. scale down Pipelines webhook deployment

      $ oc scale deployment -n openshift-pipelines tekton-pipelines-webhook --replicas=0

      4. try editing any value in `config-defaults` configMap (whatever we try to change will not be applied so feel free to change any values eg: change 'default-service-account' from 'pipeline' to 'my-new-service-account'

      $ oc edit configmap -n openshift-pipelines config-defaults

      5. delete config-defaults configmap

      $ oc delete configmap -n openshift-pipelines config-defaults

       

      6. scale pipelines webhook deplolyment back to 1

      $ oc scale deployment -n openshift-pipelines tekton-pipelines-webhook --replicas=1

      {{}}
      {{}}

       

      7. ensure that  pipelines webhook deplolyment back to 1

      $ oc get deployment -n openshift-pipelines tekton-pipelines-webhook
      {{NAME                       READY   UP-TO-DATE   AVAILABLE   AGE }}
      tekton-pipelines-webhook   1/1     1            1           69m

      8. ensure that the config-defaults configMap is recreated

      {{$ oc get configmap -n openshift-pipelines config-defaults }}
      {{NAME              DATA   AGE }}
      config-defaults   2      20s

       

              rh-ee-nikthoma Nikhil Thomas
              smukhade Shivam Mukhade (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: