Skip to content

Pipeline controller deletes PipelineRuns when two cluster contexts share the same cluster #609

@derryos

Description

@derryos

By default, Prow uses the default cluster

We wanted to use multiple build clusters (for various workflows/testing upgrades) so we created cluster-a/cluster-b/cluster-c as well as leaving the 'default'. As we wanted to change the default cluster we use post upgrade, we used specific named clusters as the cluster: variable within our prow pre/post/periodic jobs instead of leaving unnamed (default) but now we have an issue where prow is getting confused between 2 clusters (default and another) with the same kubeconfig.

This is the code that is triggering:
https://github.com/kubernetes-sigs/prow/blob/main/cmd/pipeline/controller.go#L463

Essentially the same cluster context is duplicated with different names and the prowjobs are being deleted as the default cluster and the other cluster are technically the same build cluster, just named differently.

Is there a way to deal with this easily or is code needed to validate that the contexts are for the same cluster but named differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions