kpt icon indicating copy to clipboard operation
kpt copied to clipboard

Allow to use kpt to maintain GitHub workflows centrally

Open mgoltzsche opened this issue 2 years ago • 1 comments

Problem

I am using kpt (1.0.0-beta.25) to maintain Kubernetes application blueprints that include GitHub Actions workflows (see example). I would like to maintain those workflows centrally and apply workflow changes to the consuming repositories along with the other changes (e.g. within Makefile) but kpt does not fully support that: while kpt pkg get copies the .github/workflows/*.yml files, kpt pkg update does not update them when they are registered within the .krmignore file apparently. (I have to register GitHub workflows within the .krmignore file to prevent them from breaking KRM functions.) To put it differently: the behaviour of kpt pkg get and kpt pkg update is inconsistent.

Proposed solution approach

kpt pkg update should apply changes from an upstream repository also to files that should be ignored by KRM functions or rather that are registered within the .krmignore file.

mgoltzsche avatar Feb 06 '23 23:02 mgoltzsche

Thanks for sharing the use-case. This use-case is interesting.

We definitely need to improve handling of non-KRM objects across our workflows. wrt kpt pkg update, we will have to support some form of mixed update strategy where using structured KRM merge for KRM objects and text-based merge for non-KRM objects.

droot avatar Feb 07 '23 17:02 droot