Skip to content

[pipeline] kube-conform doesn't work in kubriX-prime #1801

Description

@jkleinlercher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions