Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] Allow configuration for Image Pull policy for machine-provisioning job #42294

Closed
felipe-colussi opened this issue Aug 2, 2023 · 2 comments
Assignees
Labels
internal JIRA To be used in correspondence with the internal ticketing system. kind/enhancement Issues that improve or augment existing functionality release-note Note this issue in the milestone's release notes status/release-note-added team/hostbusters The team that is responsible for provisioning/managing downstream clusters + K8s version support
Milestone

Comments

@felipe-colussi
Copy link
Contributor

felipe-colussi commented Aug 2, 2023

Is your feature request related to a problem? Please describe.
When creating a downstream cluster the ...-machine-provisioning job always try to pull the image set on machine-provision-image. That generates a problem on air-gapped environments.

Describe the solution you'd like
Create a global setting that can be used to configure the ImagePullPolicy for the machine-provisioning job.
The setting will have Always as the default ImagePullPolicy witch will keep the same behavior as it have now.
As discussed on the jira issue this will have no UI component.

SURE-6383

@felipe-colussi felipe-colussi added kind/enhancement Issues that improve or augment existing functionality internal team/hostbusters The team that is responsible for provisioning/managing downstream clusters + K8s version support JIRA To be used in correspondence with the internal ticketing system. labels Aug 2, 2023
@felipe-colussi felipe-colussi self-assigned this Aug 2, 2023
@felipe-colussi felipe-colussi added this to the 2023-Q4-v2.8x milestone Aug 2, 2023
@felipe-colussi
Copy link
Contributor Author

Validation Template

Root Cause

It was impossible to set the image pull policy for machine-provision image.

What was fixed, or what change have occurred

It was added a setting that allows the configuration of the machine-provision image pull policy.

Areas or cases that should be tested

Creation of new clusters.

The setting should be set during the "Rancher" initialization setting the env CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY.

The allowed values are: Always, Never or IfNotPresent.

When creating a downstream cluster the value passed to "image pull policy" for the machine-provision pod (-n fleet-default) should be the one set on the env.

Extra details / tests:

If the env/setting is not set the default value should be Always.

If the env contains a wrong value it should default to Always and output a info message saying that it was defaulted to Always.

This is case sensitive

What areas could experience regressions

None.

Are the repro steps accurate/minimal?

I think so.

@Josh-Diamond
Copy link
Contributor

Ticket #42294 - Test Results - ✅

Verified on Rancher v2.8-fc12e7d779577d10ded1a8e249f51727848b878e-head:

Scenario Test Case Result
1. Set CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY to Always => deploy a downstream cluster => verify setting in local cluster job for machine-provision pod
2. Set CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY to IfNotPresent => deploy a downstream cluster => verify setting in local cluster job for machine-provision pod
3. Set CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY to Never => deploy a downstream cluster => verify setting in local cluster job for machine-provision pod

Scenario 1 -

  1. Fresh install of Rancher v2.8-head w/ CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY set to Always
  2. Provision a downstream RKE2 cluster, and while cluster is provisioning navigate to Cluster Explorer (local) > Workloads > Jobs > machine-provisioning job > Edit YAML and confirm imagePullPolicy
  3. Verified - imagePullPolicy is set to Always; as expected

Scenario 2 -

  1. Fresh install of Rancher v2.8-head w/ CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY set to IfNotPresent
  2. Provision a downstream RKE2 cluster, and while cluster is provisioning navigate to Cluster Explorer (local) > Workloads > Jobs > machine-provisioning job > Edit YAML and confirm imagePullPolicy
  3. Verified - imagePullPolicy is set to IfNotPresent; as expected

Scenario 3 -

  1. Fresh install of Rancher v2.8-head w/ CATTLE_MACHINE_PROVISION_IMAGE_PULL_POLICY set to Never
  2. Provision a downstream RKE2 cluster, and while cluster is provisioning navigate to Cluster Explorer (local) > Workloads > Jobs > machine-provisioning job > Edit YAML and confirm imagePullPolicy
  3. Verified - imagePullPolicy is set to Never; as expected

@zube zube bot removed the [zube]: Done label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal JIRA To be used in correspondence with the internal ticketing system. kind/enhancement Issues that improve or augment existing functionality release-note Note this issue in the milestone's release notes status/release-note-added team/hostbusters The team that is responsible for provisioning/managing downstream clusters + K8s version support
Projects
None yet
Development

No branches or pull requests

4 participants