Skip to content

Enhancement: gitrepository custom resources add duplicate check #440

Open
@JaneLiuL

Description

@JaneLiuL

We have two files in the cluster, as below, They are store in the same folder but with different files for manual error.
Then we found, flux don't have any check for it, it only show one of them which makes a terriable error in our cluster: it delete the branch v2 resources...
So crazy.

apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
  name: jane
  namespace: platform
spec:
  interval: 1m
  url: xxx.git
  secretRef:
    name: git-secret
  ref:
    branch: v2
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
  name: jane
  namespace: platform
spec:
  interval: 1m
  url: xxx.git
  secretRef:
    name: git-secret
  ref:
    branch: central
---

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions