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

Automatically delete old pr and tr on dogfooding #442

Merged
merged 1 commit into from
Jun 25, 2020

Commits on Jun 24, 2020

  1. Automatically delete old pr and tr on dogfooding

    Add a new trigger to the tekoncd event listener, for cleanup.
    The triggers runs tkn pr|tr delete --all with a --keep param,
    to keep the latest N runs.
    
    Add a cluster role and a service account bound to it in the
    default and tektonci namespaces. The cluster role gives
    permission to list and delete prs and trs.
    
    Add a cluster resource that uses the new service account.
    This is used by the cleanup task to direct tkn to the
    dogfooding cluster.
    
    Add a new cronjob base for cleanup jobs, and a two jobs
    based out of it, to cleanup in the default and tektonci
    namespaces on the dogfooding cluster,
    
    Once this is in place, it will be easy to add more cronjobs
    to cleanup other namespaces / clusters if needed.
    It will also be possiblo iterate on the cleanup task adding
    more features and nobs to it.
    
    The secret used by the pipeline resources must be created
    manually once this is provisioned for it to work.
    
    Fixes tektoncd#439
    afrittoli committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    f5afe27 View commit details
    Browse the repository at this point in the history