Understand permission for the folder created using subPathExpr via volumeMount

Hello Team,
I would like to understand the permission assignment of the folder created via subPathExpr in volumeMounts by kubelet.

There is a host path /var/corefiles
Container configuration is as below.
volumeMount:

  • mountPath: /var/corefiles/
    name: corefiles
    subPathExpr: $(FST_POD_NAME)

volumes:

  • hostPath:
    path: /var/corefiles/
    type: ‘’

Case1:
The permission of /var/corefiles is 755 and owner and group is root:root.
In this case the permission of the folder /var/corefiles/$(FST_POD_NAME) is 755 with owner:group as root:root

Case2:
The permission of /var/corefiles is 777 and owner and group is root:root.
In this case the permission of the folder /var/corefiles/$(FST_POD_NAME) is 777 with owner:group as root:root

Umask of kubelet is 0022.
I would like to understand this behaviour why in case2 the permission is 777 ? Ideally it should be based on umask right ?
Is there a special case when the parent folder permission is inherited ?

Cluster information:

Kubernetes version:1.30
Cloud being used: bare-metal