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

Pruner doesn't validate resource types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • Pipelines 1.6
    • Pipelines 1.6
    • Operator
    • None
    • False
    • False

      Expected behavior

      It's only possible to prune pipeline runs and task runs

      Actual behavior

      Generated cron job tries to delete whatever resource type that user puts into Tekton config which will fail when cron job runs.

      Steps to reproduce

      1. Install Pipelines 1.6
      2. Add the following configuration to tekton config (oc edit tektonconfig config)
      3. Verify the content of cron job in openshift-pipelines namespace

      pruner:
          keep: 20
          resources:
          - pipelinerun
          - taskrun
          - foo
          - bar
          schedule: '* * * * *'
      

      Cron job contains similar commands:

      args:
              - >-
                tkn pipelinerun delete --keep=20 -n=catalog1 -f ; tkn taskrun
                delete --keep=20 -n=catalog1 -f ; tkn foo delete --keep=20
                -n=catalog1 -f ; tkn bar delete --keep=20 -n=catalog1 -f ; 
      

            pradkuma PRADEEP KUMAR (Inactive)
            ppitonak Pavol Pitoňák
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: