Skip to content

Conversation

@allthatjazzleo
Copy link
Contributor

Summary

Adds automatic version labeling to pods by extracting version information from container images and setting it as a Kubernetes label using kube.VersionLabel.

Problem

Previously, pods created by the cosmos-operator lacked version information in their labels, making it difficult for operators and monitoring tools to identify which version of the blockchain software was running in each pod.

Solution

  • Added updatePodVersionLabel() function that extracts version from container image using kube.ParseImageVersion()
  • Integrated version labeling at two key points:
    1. When setting versioned images from chain versions
    2. When overriding images via pod overrides
  • Comprehensive test coverage to ensure version labels are correctly set

Changes Made

  • New function: updatePodVersionLabel() in internal/fullnode/build_pods.go
  • Integration points: Called in pod_builder.go when images are set or overridden
  • Enhanced tests: Added assertions in both build_pods_test.go and pod_builder_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant