Wolfgang Kulhanek
2020-03-10 93757c5fbd015faf35e12db4464d51b6acc291de
commit | author | age
9db646 1 ---
JK 2 apiVersion: machine.openshift.io/v1beta1
3 kind: MachineSet
4 metadata:
5   name: {{ machineset_name }}
6   namespace: openshift-machine-api
7   labels:
8     {{ machineset_group_label }}: {{ machineset_group.name }}
9     machine.openshift.io/cluster-api-cluster: {{ cluster_label }}
10 spec:
11 {% if machineset_name not in ocp4_current_machineset_names
12    or not machineset_group.autoscale|default(False)
13 %}
14   replicas: {{ machineset_replicas }}
15 {% endif %}
16   selector:
17     matchLabels:
18       machine.openshift.io/cluster-api-cluster: {{ cluster_label }}
935825 19 {% if 'role' in machineset_group %}
JK 20       machine.openshift.io/cluster-api-machine-role: {{ machineset_group.role }}
21       machine.openshift.io/cluster-api-machine-type: {{ machineset_group.role }}
22 {% endif %}
9db646 23       machine.openshift.io/cluster-api-machineset: {{ machineset_name }}
JK 24   template:
25     metadata:
26       labels:
27         {{ machineset_group_label }}: {{ machineset_group.name }}
28         machine.openshift.io/cluster-api-cluster: {{ cluster_label }}
935825 29 {% if 'role' in machineset_group %}
JK 30         machine.openshift.io/cluster-api-machine-role: {{ machineset_group.role }}
31         machine.openshift.io/cluster-api-machine-type: {{ machineset_group.role }}
32 {% endif %}
9db646 33         machine.openshift.io/cluster-api-machineset: {{ machineset_name }}
JK 34     spec:
35       metadata:
935825 36         labels: {{ machineset_group_node_labels | to_json }}
9db646 37       providerSpec:
JK 38         value:
39           ami:
40             id: {{ aws_coreos_ami_id }}
41           apiVersion: awsproviderconfig.openshift.io/v1beta1
42           blockDevices:
43           - ebs:
44               iops: 0
45               volumeSize: {{ aws_root_volume_size }}
46               volumeType: gp2
47           credentialsSecret:
48             name: aws-cloud-credentials
49           deviceIndex: 0
50           iamInstanceProfile:
51             id: {{ aws_iam_instance_profile_id }}
52           instanceType: {{ aws_instance_type }}
53           kind: AWSMachineProviderConfig
54           metadata:
55             creationTimestamp: null
56           placement:
57             availabilityZone: {{ availability_zone }}
58             region: {{ availability_zone_region }}
59           publicIp: null
935825 60           securityGroups: {{ aws_worker_security_groups | to_json }}
9db646 61           subnet:
JK 62             filters:
63             - name: tag:Name
64               values:
65               - {{ availability_zone_subnet }}
935825 66           tags: {{ aws_worker_tags | to_json }}
9db646 67           userDataSecret:
JK 68             name: worker-user-data
93757c 69 {% if machineset_group.taint | d('') | length > 0 %}            
WK 70       taints:
71       - key: "{{ machineset_group.taint }}"
72         value: "reserved"
73         effect: "NoSchedule"
74       - key: "{{ machineset_group.taint }}"
75         value: "reserved"
76         effect: "NoExecute"
77 {% endif %}
9db646 78       versions:
JK 79         kubelet: ""