You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix whitespace issues in the site content markdown
Courtesy of markdownlint, but nothing to show on:
git show --ignore-all-space --ignore-blank-lines
Ignore generated commands, with trailing whitespace.
Those need to be fixed in "generate-docs" instead...
Copy file name to clipboardExpand all lines: site/content/en/docs/contrib/drivers.en.md
+2-6
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ description: >
8
8
9
9
This document is written for contributors who are familiar with minikube, who would like to add support for a new VM driver.
10
10
11
-
minikube relies on docker-machine drivers to manage machines. This document discusses how to modify minikube, so that this driver may be used by `minikube start --driver=<new_driver>`.
11
+
minikube relies on docker-machine drivers to manage machines. This document discusses how to modify minikube, so that this driver may be used by `minikube start --driver=<new_driver>`.
12
12
13
13
## Creating a new driver
14
14
@@ -35,7 +35,7 @@ The integration process is effectively 3 steps.
35
35
36
36
### The driver shim
37
37
38
-
The primary duty of the driver shim is to register a VM driver with minikube, and translate minikube VM hardware configuration into a format that the driver understands.
38
+
The primary duty of the driver shim is to register a VM driver with minikube, and translate minikube VM hardware configuration into a format that the driver understands.
39
39
40
40
### Registering your driver
41
41
@@ -55,7 +55,6 @@ on your `$USER/.minikube` directory. Most likely the driver config is the driver
55
55
56
56
- DriverCreator: Only needed when driver is builtin, to instantiate the driver instance.
57
57
58
-
59
58
## Integration example: vmwarefusion
60
59
61
60
All drivers are located in `k8s.io/minikube/pkg/minikube/drivers`. Take `vmwarefusion` as an example:
@@ -103,7 +102,4 @@ earlier, it's builtin, so you also need to specify `DriverCreator` to tell minik
103
102
runs on MacOS, so that the releases on Windows and Linux won't have this driver in registry.
104
103
- Last but not least, import the driver in `pkg/minikube/cluster/default_drivers.go` to include it in build.
105
104
106
-
107
-
108
105
Any Questions: please ping your friend [@anfernee](https://github.com/anfernee) or the #minikube Slack channel.
Copy file name to clipboardExpand all lines: site/content/en/docs/contrib/json_output.en.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ This document is written for minikube contributors who need to add logs to the m
10
10
You may need to add logs to the registry if the `TestJSONOutput` integration test is failing on your PR.
11
11
12
12
### Background
13
+
13
14
minikube provides JSON output for `minikube start`, accesible via the `--output` flag:
14
15
15
16
```shell
@@ -39,6 +40,7 @@ $ minikube start --output json
39
40
```
40
41
41
42
There are a few key points to note in the above output:
43
+
42
44
1. Each log of type `io.k8s.sigs.minikube.step` indicates a distinct step in the `minikube start` process
43
45
1. Each step has a `currentstep` field which allows clients to track `minikube start` progress
44
46
1. Each `currentstep` is distinct and increasing in order
@@ -48,12 +50,12 @@ This way, minikube knows how many expected `totalsteps` there are at the beginni
48
50
49
51
If you change logs, or add a new log, you need to update the minikube registry to pass integration tests.
50
52
51
-
52
53
### Adding a Log to the Registry
53
54
54
55
There are three steps to adding a log to the registry, which exists in [register.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/out/register/register.go).
55
56
56
57
You will need to add your new log in two places:
58
+
57
59
1. As a constant of type `RegStep`[here](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/out/register/register.go#L24)
58
60
1. In the register itself in the `init()` function, [here](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/out/register/register.go#L52)
You can see an example of setting the registry step in the code in [config.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/node/config.go):
Copy file name to clipboardExpand all lines: site/content/en/docs/contrib/principles.en.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ aliases:
6
6
7
7
The primary goal of minikube is to make it simple to run Kubernetes locally, for day-to-day development workflows and learning purposes. Here are the guiding principles for minikube, in rough priority order:
8
8
9
-
1.Inclusive and community-driven
10
-
2.User-friendly
11
-
3.Support all Kubernetes features
12
-
4.Cross-platform
13
-
5.Reliable
14
-
6.High Performance
15
-
7.Developer Focused
9
+
1. Inclusive and community-driven
10
+
2. User-friendly
11
+
3. Support all Kubernetes features
12
+
4. Cross-platform
13
+
5. Reliable
14
+
6. High Performance
15
+
7. Developer Focused
16
16
17
17
Here are some specific minikube features that align with our goal:
* Run `make extract` from root directory to populate that file with the strings to translate in json
20
23
form.
21
-
```
22
-
~/minikube$ make extract
23
-
go run cmd/extract/extract.go
24
-
Compiling translation strings...
25
-
Writing to de.json
26
-
Writing to es.json
27
-
Writing to fr.json
28
-
Writing to ja.json
29
-
Writing to ko.json
30
-
Writing to pl.json
31
-
Writing to zh-CN.json
32
-
Done!
33
-
```
24
+
25
+
```
26
+
~/minikube$ make extract
27
+
go run cmd/extract/extract.go
28
+
Compiling translation strings...
29
+
Writing to de.json
30
+
Writing to es.json
31
+
Writing to fr.json
32
+
Writing to ja.json
33
+
Writing to ko.json
34
+
Writing to pl.json
35
+
Writing to zh-CN.json
36
+
Done!
37
+
```
38
+
34
39
* Add translated strings to the json file as the value of the map where the English phrase is the key.
35
-
```
36
-
~/minikube$ head translations/fr.json
37
-
{
38
-
"\"The '{{.minikube_addon}}' addon is disabled": "",
39
-
"\"{{.machineName}}\" does not exist, nothing to stop": "",
40
-
"\"{{.name}}\" profile does not exist, trying anyways.": "",
41
-
"'none' driver does not support 'minikube docker-env' command": "",
42
-
"'none' driver does not support 'minikube mount' command": "",
43
-
"'none' driver does not support 'minikube podman-env' command": "",
44
-
"'none' driver does not support 'minikube ssh' command": "",
45
-
"'{{.driver}}' driver reported an issue: {{.error}}": "",
46
-
```
47
-
* Add the translations as the values of the map, keeping in mind that anything in double braces `{{}}` are variable names describing what gets injected and should not be translated.
48
-
```
49
-
~/minikube$ vi translations/fr.json
50
-
{
51
-
[...]
52
-
"Amount of time to wait for a service in seconds": "",
53
-
"Amount of time to wait for service in seconds": "",
54
-
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --driver to switch to it.": "",
55
-
"Automatically selected the {{.driver}} driver": "Choix automatique du driver {{.driver}}",
56
-
"Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "Choix automatique du driver {{.driver}}. Autres choix: {{.alternatives}}",
57
-
"Available Commands": "",
58
-
"Basic Commands:": "",
59
-
"Because you are using docker driver on Mac, the terminal needs to be open to run it.": "",
60
-
[...]
61
-
}
62
-
```
63
-
40
+
41
+
```
42
+
~/minikube$ head translations/fr.json
43
+
{
44
+
"\"The '{{.minikube_addon}}' addon is disabled": "",
45
+
"\"{{.machineName}}\" does not exist, nothing to stop": "",
46
+
"\"{{.name}}\" profile does not exist, trying anyways.": "",
47
+
"'none' driver does not support 'minikube docker-env' command": "",
48
+
"'none' driver does not support 'minikube mount' command": "",
49
+
"'none' driver does not support 'minikube podman-env' command": "",
50
+
"'none' driver does not support 'minikube ssh' command": "",
51
+
"'{{.driver}}' driver reported an issue: {{.error}}": "",
52
+
```
53
+
54
+
* Add the translations as the values of the map, keeping in mind that anything in double braces `{{}}` are variable names describing what gets injected and should not be translated.
55
+
56
+
```
57
+
~/minikube$ vi translations/fr.json
58
+
{
59
+
[...]
60
+
"Amount of time to wait for a service in seconds": "",
61
+
"Amount of time to wait for service in seconds": "",
62
+
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --driver to switch to it.": "",
63
+
"Automatically selected the {{.driver}} driver": "Choix automatique du driver {{.driver}}",
64
+
"Automatically selected the {{.driver}} driver. Other choices: {{.alternates}}": "Choix automatique du driver {{.driver}}. Autres choix: {{.alternatives}}",
65
+
"Available Commands": "",
66
+
"Basic Commands:": "",
67
+
"Because you are using docker driver on Mac, the terminal needs to be open to run it.": "",
68
+
[...]
69
+
}
70
+
```
71
+
64
72
### Adding Translations To an Existing Language
73
+
65
74
* Run `make extract` to make sure all strings are up to date
66
75
* Edit the appropriate json file in the 'translations' directory, in the same way as described above.
67
76
68
77
### Testing translations
78
+
69
79
* Once you have all the translations you want, save the file and rebuild the minikube from scratch to pick up your new translations:
70
-
```
71
-
~/minikube$ make clean
72
-
rm -rf ./out
73
-
rm -f pkg/minikube/assets/assets.go
74
-
rm -f pkg/minikube/translate/translations.go
75
-
rm -rf ./vendor
76
-
~/minikube$ make
77
-
```
78
-
Note: the clean is required to regenerate the embedded `translations.go` file
79
-
80
-
* You now have a fresh minikube binary in the `out` directory. If your system locale is that of the language you added translations for, a simple `out/minikube start` will work as a test, assuming you translated phrases from `minikube start`. You can use whatever command you'd like in that way.
80
+
81
+
```
82
+
~/minikube$ make clean
83
+
rm -rf ./out
84
+
rm -f pkg/minikube/assets/assets.go
85
+
rm -f pkg/minikube/translate/translations.go
86
+
rm -rf ./vendor
87
+
~/minikube$ make
88
+
```
89
+
Note: the clean is required to regenerate the embedded `translations.go` file
90
+
91
+
* You now have a fresh minikube binary in the `out` directory. If your system locale is that of the language you added translations for, a simple `out/minikube start` will work as a test, assuming you translated phrases from `minikube start`. You can use whatever command you'd like in that way.
81
92
82
93
* If you have a different system locale, you can override the printed language using the LC_ALL environment variable:
83
-
```
84
-
~/minikube$ LC_ALL=fr out/minikube start
85
-
😄 minikube v1.9.2 sur Darwin 10.14.5
86
-
✨ Choix automatique du driver hyperkit. Autres choix: docker
87
-
👍 Démarrage du noeud de plan de contrôle minikube dans le cluster minikube
88
-
🔥 Création de VM hyperkit (CPUs=2, Mémoire=4000MB, Disque=20000MB)...
89
-
🐳 Préparation de Kubernetes v1.18.0 sur Docker 19.03.8...
90
-
🌟 Installation des addons: default-storageclass, storage-provisioner
91
-
🏄 Terminé ! kubectl est maintenant configuré pour utiliser "minikube".
92
-
```
94
+
95
+
```
96
+
~/minikube$ LC_ALL=fr out/minikube start
97
+
😄 minikube v1.9.2 sur Darwin 10.14.5
98
+
✨ Choix automatique du driver hyperkit. Autres choix: docker
99
+
👍 Démarrage du noeud de plan de contrôle minikube dans le cluster minikube
100
+
🔥 Création de VM hyperkit (CPUs=2, Mémoire=4000MB, Disque=20000MB)...
101
+
🐳 Préparation de Kubernetes v1.18.0 sur Docker 19.03.8...
102
+
🌟 Installation des addons: default-storageclass, storage-provisioner
103
+
🏄 Terminé ! kubectl est maintenant configuré pour utiliser "minikube".
0 commit comments