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

Automatically set kubernetes config for btrfs storage driver #12990

Merged
merged 6 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,19 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s
// See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "KubeletInUserNamespace=true")
}
if si.StorageDriver == "btrfs" {
klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver")
cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "LocalStorageCapacityIsolation=false")
}
}

return cc
}

func addFeatureGate(featureGates, s string) string {
if len(featureGates) == 0 {
return s
}
split := strings.Split(featureGates, ",")
m := make(map[string]struct{}, len(split))
for _, v := range split {
Expand Down
9 changes: 9 additions & 0 deletions pkg/minikube/reason/known_issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,15 @@ var guestIssues = []match{
},
Regexp: re(`'/var/lib/dpkg': No such file or directory`),
},
{
spowelljr marked this conversation as resolved.
Show resolved Hide resolved
Kind: Kind{
ID: "GUEST_STORAGE_DRIVER_BTRFS",
ExitCode: ExGuestUnsupported,
Advice: "minikube does not support the BTRFS storage driver yet, there is a workaround, add the following flag to your start command `--feature-gates=\"LocalStorageCapacityIsolation=false\"`",
Issues: []int{7923},
},
Regexp: re(`unsupported graph driver: btrfs`),
},
{
Kind: Kind{
ID: "GUEST_INCORRECT_ARCH",
Expand Down