Skip to content

Read component version from configmap instead of CRD label #413

@sm43

Description

@sm43

In the recent refactoring while starting the controller we read the version of component from CRD label
but we also have a config map added to all components which has the version of that component.
The configmap was added so that client like tkn can read the version of component.

In Operator we can do the same instead of reading from CRD we should read from configmap

from controller we make a call

releaseVersion, err := common.FetchVersionFromCRD(manifest, releaseLabel)

and the func is implemented

func FetchVersionFromCRD(manifest mf.Manifest, releaseLabel string) (string, error) {

Update the func FetchVersionFromCRD to have param for configmap name
and the func would find the version from that configmap and return it

for pipelines the configmap is pipelines-info https://github.com/tektoncd/pipeline/blob/main/config/config-info.yaml
similarly they re present for other components too

/kind feature
/good-first-issue
/help-wanted

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions