Updated Red Hat mounts for air-gapped clusters#2391
Open
JunAr7112 wants to merge 1 commit intoNVIDIA:mainfrom
Open
Updated Red Hat mounts for air-gapped clusters#2391JunAr7112 wants to merge 1 commit intoNVIDIA:mainfrom
JunAr7112 wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
19eb03b to
4027166
Compare
Signed-off-by: Arjun <agadiyar@nvidia.com>
4027166 to
417f575
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change is in response to this issue. In summary, when we install the gpu-operator on an air-gapped cluster the driver pod spec can error because the node does not have the HostPathFile.
MountVolume.SetUp failed for volume "subscription-config-1" : hostPath type check failed: /etc/yum.repos.d/redhat.repo is not a file Warning FailedMount 3m55s (x23 over 34m) kubelet MountVolume.SetUp failed for volume "subscription-config-0" : hostPath type check failed: /etc/pki/entitlement is not a directoryWhen we set up the gpu-operator to run in air-gapped environments (see here), we will setup a local package repository containing the the Red Hat packages needed to run, and create a configMap referencing a repo list containing the packages. In a regular environment, the driver container uses Ret Hat Subscription Management (RHSM) to determine what repos you need and how to install them from Red Hat's CDN. With a repoConfig ConfigMap (air-gapped / custom mirror): you do not rely on that subscription path for package location. The ConfigMap will provide the server/files where the Driver can pull the repos. Therefore, the operator can skip RHSM mounts because the repo definitions and mirror content are already provided.
The following changes were made:
// Custom repo ConfigMap supplies yum repos in offline/air-gapped installs. Skip mounting host RHSM paths when using a custom repo ConfigMap if cr.Spec.IsRepoConfigEnabled() && pool.osRelease == "rhel" { pathToVolumeSource = map[string]corev1.VolumeSource{} }...ensuring that we no longer mount the RHSM paths.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
An Air-gapped cluster was setup following instructions here: https://kubernetes.io/blog/2023/10/12/bootstrap-an-air-gapped-cluster-with-kubeadm/.