|
6 | 6 | [id="microshift-config-yaml_{context}"]
|
7 | 7 | = Using a YAML configuration file
|
8 | 8 |
|
9 |
| -Configure your {product-title} using a YAML file. The values specified in your configuration file are used when you execute a command. |
10 |
| -// Q: can these values be overriden with CLI flags? |
| 9 | +{product-title} searches for a configuration file in the user-specific directory, `~/.microshift/config.yaml`, then the system-wide `/etc/microshift/config.yaml` directory. You must create the configuration file and specify any settings that should override the defaults before starting {product-title}. |
11 | 10 |
|
12 | 11 | [id="microshift-yaml-default_{context}"]
|
13 | 12 | == Default settings
|
14 |
| -If you do not create a `config.yaml` file, the default values are used. |
15 |
| -// Q: what creates the default yaml? |
16 |
| -// Q: can default file be modified? (instead of making a new one) |
| 13 | +If you do not create a `config.yaml` file, the default values are used. The following example configuration contains the default settings. You must change any settings that should override the defaults before starting {product-title}. |
17 | 14 |
|
18 | 15 | .Default YAML file example
|
19 | 16 | [source,yaml]
|
20 | 17 | ----
|
21 |
| -cluster: |
22 |
| - clusterCIDR: 10.42.0.0/16 |
23 |
| - serviceCIDR: 10.43.0.0/16 |
24 |
| - serviceNodePortRange: 30000-32767 |
25 |
| - dns: 10.43.0.10 |
26 |
| - domain: cluster.local |
27 |
| - url: https://127.0.0.1:6443 |
28 |
| -nodeIP: "" |
29 |
| -nodeName: "" |
30 |
| -logVLevel: 0 |
| 18 | +dns: |
| 19 | + baseDomain: microshift.example.com <1> |
| 20 | +network: |
| 21 | + clusterNetwork: |
| 22 | + - cidr: 10.42.0.0/16 <2> |
| 23 | + serviceNetwork: |
| 24 | + - 10.43.0.0/16 <3> |
| 25 | + serviceNodePortRange: 30000-32767 <4> |
| 26 | +node: |
| 27 | + hostnameOverride: "" <5> |
| 28 | + nodeIP: "" <6> |
| 29 | +apiServer: |
| 30 | + subjectAltNames: [] <7> |
| 31 | +debugging: |
| 32 | + logLevel: "Normal" <8> |
31 | 33 | ----
|
32 |
| - |
33 |
| -[IMPORTANT] |
| 34 | +<1> Base domain of the cluster. All managed DNS records will be subdomains of this base. |
| 35 | +<2> A block of IP addresses from which Pod IP addresses are allocated. |
| 36 | +<3> A block of virtual IP addresses for Kubernetes services. |
| 37 | +<4> The port range allowed for Kubernetes services of type NodePort. |
| 38 | +<5> The name of the node. The default value is the hostname. |
| 39 | +<6> The IP address of the node. The default value is the IP address of the default route. |
| 40 | +<7> Subject Alternative Names for API server certificates. |
| 41 | +<8> Log verbosity. Valid values for this field are `Normal`, `Debug`, `Trace`, or `TraceAll`. |
| 42 | + |
| 43 | +[NOTE] |
34 | 44 | ====
|
35 |
| -The configuration file must be located at the user-specific directory, `~/.microshift/config.yaml`, and the system-wide `/etc/microshift/config.yaml` directory. An existing user-specific `config.yaml` takes precedence. |
| 45 | +{product-title} only reads the configuration file on startup. Restart {product-title} after changing any configuration settings to have them take effect. |
36 | 46 | ====
|
37 |
| -//Q: can this be done with a command, or is this an instance where user goes into the directory and creates a text file? |
38 |
| - |
39 |
| -[id="microshift-yaml-format-example_{context}"] |
40 |
| -== Formatting a customized YAML file |
41 |
| - |
42 |
| -.Procedure |
43 |
| -//Q: need explicit steps |
44 |
| -. Create a YAML file with the following formatting: |
45 |
| -+ |
46 |
| -[source,yaml] |
47 |
| ----- |
48 |
| -cluster: "" |
49 |
| - clusterCIDR: "" |
50 |
| - serviceCIDR: "" |
51 |
| - serviceNodePortRange: "" |
52 |
| - dns: "" |
53 |
| - domain: "" |
54 |
| - url: "" |
55 |
| -nodeIP: "" |
56 |
| -nodeName: "" |
57 |
| -logVLevel: "" |
58 |
| ----- |
59 |
| - |
60 |
| -. Enter valid values. |
61 |
| -//Q: most docsets contain a table of valid entry types, noting whether required or optional |
62 |
| -//Q: does the user need to enter every value? will any default? |
63 |
| -//Q: how does the user check that this procedure has been done properly? |
64 |
| - |
65 |
| -//Q: Can we give a sample use-case set of values in an example YAML? see below |
66 |
| -//. Next, enter the values specific to your project. |
67 |
| - |
68 |
| -//For example, this configuration file specifies that when you run the <command>, the value in the <field> is used. This configuration file <does this> when you run the <command>. |
69 |
| -//Q: what values can we use as an example? |
70 |
| -//+ |
71 |
| -//.Configured YAML file example |
72 |
| -//[source,yaml] |
73 |
| -//---- |
74 |
| -//cluster: "" |
75 |
| -// clusterCIDR: "" |
76 |
| -// serviceCIDR: "" |
77 |
| -// serviceNodePortRange: "" |
78 |
| -// dns: "" |
79 |
| -// domain: "" |
80 |
| -// url: "" |
81 |
| -//nodeIP: "" |
82 |
| -//nodeName: "" |
83 |
| -//logVLevel: "" |
84 |
| -//---- |
0 commit comments