-
Notifications
You must be signed in to change notification settings - Fork 0
AiMLops Project 4.0 Testing and finalization
We encountered an issue where the Kubernetes/kustomize CLI failed to recognize a Kustomization.yaml file (with a capital "K").
The specific behavior observed was that Kustomization.yaml was correctly recognized on macOS systems, but not on Linux systems. This discrepancy is due to differences in how these operating systems handle file name case sensitivity.
The root cause lies in the default file system behavior of macOS and Linux:
-
macOS: By default, its file systems (HFS+ or APFS) are case-insensitive but case-preserving. This means the system treats
Kustomization.yamlandkustomization.yamlas the same file, even though it remembers the original capitalization. -
Linux: Most Linux file systems (like ext4) are case-sensitive. This means
Kustomization.yamlandkustomization.yamlare treated as two distinct and separate files.
The kustomize CLI adheres to a convention and expects the configuration file to be named kustomization.yaml (all lowercase) by default.
When running kustomize on a case-sensitive system like Linux, if the file is named Kustomization.yaml (capital "K"), the CLI will not find it automatically, leading to errors like the following:
error: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/home/ubuntu/test1/oss-mlops-platform/deployment/kubeflow/manifests/common/cert-manager/cert-manager/overlay/letsencrypt'
WARNING: Failed to apply letsencrypt overlay with webhooks enabledTo ensure cross-platform compatibility and adherence to the kustomize convention, the recommended solution is to rename the file to use all lowercase letters.
Rename the file:
mv Kustomization.yaml kustomization.yamlThis ensures the kustomize CLI can find the configuration file reliably on both case-sensitive (Linux) and case-insensitive (macOS) systems.