nephio-project / nephio

Nephio is a Kubernetes-based automation platform for deploying and managing highly distributed, interconnected workloads such as 5G Network Functions, and the underlying infrastructure on which those workloads depend.
Apache License 2.0
93 stars 52 forks source link

Refresh of repositories.config.porch.kpt.dev #727

Open arora-sagar opened 1 month ago

arora-sagar commented 1 month ago

When an upstream repository of repositories.config.porch.kpt.dev is updated then it is not taken into account until we delete the repositories.config.porch.kpt.dev object and re-create it.

For example, there is a package in GitHub-repo-a and I register that repository via

kubectl apply -f - <<EOF
apiVersion: config.porch.kpt.dev/v1alpha1
kind: Repository
metadata:
  name: github-repo-a
  namespace: default
  labels:
    kpt.dev/repository-access: read-only
    kpt.dev/repository-content: external-blueprints
spec:
  content: Package
  deployment: false
  git:
    branch: branch
    directory: /
    repo: https://github.com/randomrepo/github-repo-a
  type: git
EOF

Then deploy package GitHub-repo-a and then delete it, update the upstream repository GitHub-repo-a and create it again. It won't consider the latest commit, it will take the commit when the repository was registered.

Now the question is, is this a bug or that is how it is designed?