currrently we reference schema files in
|
-schema-location "https://raw.githubusercontent.com/suxess-it/kubriX/${GITHUB_HEAD_REF}/kubeconform-schemas/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" \ |
and set the branch to the current branch of the pipeline. However, we hardcoded the repo to kubriX. The result in kubriX-prime is, that kube-conform searches for a kubriX-prime branch (e.g.
from-upstream) in the kubriX repo, which of course doesn't exist.
The solution would be to replace kubriX with the variable ${GITHUB_REPOSITORY}, however kube-conform cannot authenticate against private repos, so referencing to kubriX-prime would work then. details see yannh/kubeconform#243
So this ends in just one possible solution: hardcode also the branch to main, so the pipeline always uses the schemas from repo kubriX in branch main. The consequence is: when missing schemas for new CRDs need to get added, they need to get added first to main, before a pipeline in a feature branch succeeds. However, this is really only needed when new CRDs are added or CRDs get changed, which is not so often the case, I guess.
In parallel, the feature for private repos should hopefully get developed.
currrently we reference schema files in
kubriX/.github/kubeconform.sh
Line 29 in 488f24b
from-upstream) in the kubriX repo, which of course doesn't exist.The solution would be to replace
kubriXwith the variable${GITHUB_REPOSITORY}, however kube-conform cannot authenticate against private repos, so referencing to kubriX-prime would work then. details see yannh/kubeconform#243So this ends in just one possible solution: hardcode also the branch to
main, so the pipeline always uses the schemas from repokubriXin branchmain. The consequence is: when missing schemas for new CRDs need to get added, they need to get added first to main, before a pipeline in a feature branch succeeds. However, this is really only needed when new CRDs are added or CRDs get changed, which is not so often the case, I guess.In parallel, the feature for private repos should hopefully get developed.