Parameters

The parent key for all of the following parameters is openshift4_nodes.

This component relies on deep merge of values from several parameters and hierarchy layers. This works pretty straightforward for scalar values and dictionaries. Values of arrays will be appended to each other. There is no way to override values which were set on a lower precedence location.

availabilityZones

type

list of strings

default

[]

List of availability zone names. The list will be used when distributing MachineSets across zones (see [multiAZ]). The first item of this list will also be used to place a MachineSet without an explicit zone defined.

It’s suggested to define its values higher up the config hierarchy. Most probably the one of the cloud region.

defaultSpecs

type

dictionary

default

Sensible defaults for a growing number of cloud providers.

A dictionary holding the default values applied to each machinesets.machine.openshift.io object created by this component.

The top level keys are the names of cloud providers as reported by the cluster fact ${facts:cloud}. The values can be everything that’s accepted in the spec field of a machinesets.machine.openshift.io object.

infrastructureID

type

string

default

undefined

This is the 12 character infrastructure ID given to a cluster by the OpenShift 4 installer. Use the following command to retrieve this from the cluster:

oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster

This is most likely to be configured on cluster level itself. Configuring this higher up in the hierarchy can result in unexpected behavior.

machine_api_namespace

type

string

default

openshift-machine-api

The namespace where machine-api related objects should be created.

Namespaced resources without an explicit .metadata.namespace field will be deployed in this namespace as well.

nodeGroups

type

dictionary

default

empty

A dictionary of node groups to create on the cluster. It’s centered around the MachineSet CRD but also takes care of some additional aspects like zone distribution and auto scaling.

The top level key is the name of each set of machines. Each set of machines has the values described below.

instanceType

multiAz

type

boolean

default

false

A machine set will be placed in one single availability zone. If not specified otherwise, the first entry of availabilityZones will be used. When set to true, a MachineSet will be created for each zone listed in availabilityZones. The replicas of the generated MachineSets will be calculated. The replicas given will be divided by the cont of zones in availabilityZones rounded up.

replicas

type

number

default

1

The number of machines to create. When multiAZ is set to true, the number given here will be divided so that each of the created MachineSets will get a fraction of replicas but the total of created machines will match the one requested here.

See also [multiAZ].

This value can also be set in [spec]. If done so, the value in [spec] will win.

role

type

string

default

worker

The role of the created Nodes. The value will be added as the node-role.kubernetes.io/<role>: "" label to nodes. The worker role label will always be added to inherit the base configuration for nodes.

In order to add additional labels to the resulting Node object, use spec.template.spec.metadata.labels.

spec

type

dictionary

default

See [defaultSpec].

This gives you the full control over the resulting MachineSet. Values given here will be merged with precedence with the defaults configured in [defaultSpec]. The values can be everything that’s accepted in the spec field of a machinesets.machine.openshift.io object.

kubeletConfigs

type

dict

default

See class/defaults.yml

This parameter accepts a key-value dict where the values are of kind machineconfiguration.openshift.io/v1/KubeletConfig. The keys are resulting metadata.name and the values reflect the .spec field of KubeletConfig.

Please refer to the upstream version of the relevant kubelet for the valid values of these fields. Invalid values of the kubelet configuration fields may render cluster nodes unusable.
The component will fail to compile if the configuration field maxPods is set to a value larger than 110. See supported configuration fields upstream (choose matching release branch for versioned options)

debugNamespace

type

string

default

syn-debug-nodes

The namespace to create for oc debug node/<nodename>. This namespace is annotated to ensure that debug pods can be scheduled on any nodes.

Use oc debug node/<nodename> --to syn-debug-nodes to create the debug pods in the namespace.

This component will take ownership of the namespace specified here. Please make sure you don’t specify a namespace which is already managed by other means.

Example

infrastructureID: c-mist-sg7hn

nodeGroups:
  infra:
    instanceType: n1-standard-8
    multiAz: true
    replicas: 3
  worker:
    instanceType: n1-standard-8
    replicas: 3
    spec:
      deletePolicy: Oldest
      template:
        spec:
          metadata:
            labels:
              mylabel: myvalue

availabilityZones:
- europe-west6-a
- europe-west6-b
- europe-west6-c

kubeletConfigs:
  workers:
    machineConfigPoolSelector:
      matchExpressions:
        - key: pools.operator.machineconfiguration.openshift.io/worker
          operator: Exists
    kubeletConfig:
      maxPods: 100