Updating SCM with Custom Non-Root User ID and Group ID

To update SCM with custom non-root user ID and group ID:

  1. Go to the new SCM Helm chart directory, typically the cloudmanager directory created by the installer.
  2. Update the securityContext section in values.yaml, as follows:
    securityContext:
      runAsGroup: 0
      runAsUser: <scm_run_as_user>
      fsGroup: <scm_fs_group>
      privileged: false
  3. Mount the SCM NFS server to an instance where the file system is accessible:
    sudo mount -t nfs <FILESYSTEM_HOST>:/<export_path> <mount_directory> -o nolock
  4. Change ownership of the SCM base directory.
    cd <mount_directory>
    sudo chown -R <scm_run_as_user>:0 <SCM_NAMESPACE_IN_UPPERCASE>
    sudo chmod -R g+rwx <SCM_NAMESPACE_IN_UPPERCASE>

    In the above command <scm_run_as_user> is the user ID specified in securityContext.runAsUser and the group owner must be 0.

  5. Run the Helm upgrade from the SCM Helm chart directory:
    cd <cloudmanager helmchart directory>
    helm upgrade <releaseName> . -n <namespace>

    In the above command <releaseName> is the SCM Helm chart instance identifier and <namespace> is the SCM namespace.

  6. Verify that the SCM pod is running.
    kubectl get pods -n <namespace>