medik8s / node-maintenance-operator

Kubernetes Operator to manage node maintenance through NodeMaintenance custom resources
https://www.medik8s.io/maintenance-node/
Apache License 2.0
27 stars 14 forks source link

Fix Fetching Go version in Dockerfile #134

Closed razo7 closed 1 week ago

razo7 commented 1 week ago

Why we need this PR

The Dockerfile currently installs the Go version defined in go.mod using go get. However, this method doesn't ensure that the just-installed Go version is the same one used to build the binary. Instead, the binary is still built with the Go version released with the container.

Changes made

This change downloads and extracts the Go archive corresponding to the go.mod file and sets the PATH to prioritize the current installation.

Which issue(s) this PR fixes

Test plan

Similar to https://github.com/medik8s/node-healthcheck-operator/pull/323 from NHC

openshift-ci[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/medik8s/node-maintenance-operator/blob/main/OWNERS)~~ [razo7] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
razo7 commented 1 week ago

/retest

slintes commented 1 week ago

/lgtm

slintes commented 1 week ago

/retest