feat: revert "feat: transform imagePullPolicy when using local cluster (#9495)" (#9703)#9704
feat: revert "feat: transform imagePullPolicy when using local cluster (#9495)" (#9703)#9704plumpy wants to merge 1 commit into
Conversation
ghost
left a comment
There was a problem hiding this comment.
Hi @plumpy and reviewers,
I'm currently reviewing this pull request and will provide my feedback in a few minutes. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:
This pull request, #9703, titled "feat: revert "feat: transform imagePullPolicy when using local cluster (#9495)", reverts commit c1834b6296f5f8a19b64c3c97ade0c11e08e6958. The intent is to undo changes made in PR #9495 related to transforming the imagePullPolicy when using a local cluster.
Here's a breakdown of the changes:
pkg/skaffold/deploy/kubectl/kubectl.go: This file had a section of code (lines 244-253) removed. This section handled the replacement of theimagePullPolicyin Kubernetes manifests when deploying to a local cluster. The removal effectively disables this behavior.pkg/skaffold/kubernetes/manifest/image_pull_policy.go: This entire file (88 lines) was deleted. This file contained the logic for selecting and modifying theimagePullPolicyfield in Kubernetes manifests based on various rules and configurations. Its removal completely eliminates the functionality added in PR #9495.pkg/skaffold/kubernetes/manifest/image_pull_policy_test.go: This entire file (67 lines) was deleted. This was the test file forimage_pull_policy.go, and its removal ensures that the removed functionality is no longer tested.
In short, this PR completely removes the feature introduced in PR #9495 that modified the imagePullPolicy for local cluster deployments.
And now, a little haiku to lighten the mood:
Code flows like a stream,
Reverts undo what was done,
A cleaner, clear code.
ghost
left a comment
There was a problem hiding this comment.
This pull request reverts the changes introduced in #9495, which modified the imagePullPolicy for deployments on local clusters. This revert is necessary as the original change caused unintended side effects. The code changes are straightforward and effectively remove the logic for transforming the imagePullPolicy. Removing the now-unused code related to imagePullPolicy transformation in pkg/skaffold/kubernetes/manifest/image_pull_policy.go and the corresponding test in pkg/skaffold/kubernetes/manifest/image_pull_policy_test.go improves the codebase's maintainability by eliminating dead code. The changes in pkg/skaffold/deploy/kubectl/kubectl.go correctly remove the conditional logic that altered the imagePullPolicy based on the cluster type. Overall, the changes are appropriate and well-implemented.
This backs out commit c1834b6.