1
- # This manifest creates 3 OpenShift MachineSets that are intended for installing OpenShift Cluster Storage on AWS.
1
+ # This manifest creates storage nodes necessary for installing OPP on an AWS or VMWare OpenShift cluster.
2
+ # - AWS creates 2 replicas in each of 3 zones.
3
+ # - VMWare creates 6 replicas
4
+ # Review the content of the machine sets to determine if you need to make customizations.
2
5
#
3
6
# More details on installing OCS including the creation of the MachineSets is located here:
4
7
# https://red-hat-storage.github.io/ocs-training/training/ocs4/ocs.html#_scale_ocp_cluster_and_add_new_worker_nodes
5
8
#
6
9
# This policy contains an Amazon Machine Identifier which must be updated in the policy. Obtain the AMI id from:
7
10
# https://access.redhat.com/documentation/en-us/openshift_container_platform/4.12/html/installing/installing-on-aws#installation-aws-user-infra-rhcos-ami_installing-aws-user-infra
11
+ # AMI IDs are provided in a settings configmap which can be adjusted as desired.
8
12
#
9
13
apiVersion : policy.open-cluster-management.io/v1
10
14
kind : ConfigurationPolicy
15
19
severity : low
16
20
object-templates-raw : |
17
21
{{- if (eq (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type "AWS") }}
18
- - complianceType: musthave
19
- objectDefinition:
20
- apiVersion: v1
21
- data:
22
- us-east-1-4.16: ami-057df4d0cb8cbae0d
23
- us-east-2-4.16: ami-0f736c64d5751d7d3
24
- us-east-1-4.15: ami-0b56cb92505dea7ed
25
- us-east-2-4.15: ami-0b577c67f5371f6d1
26
- us-east-1-4.14: ami-0b56cb92505dea7ed
27
- us-east-2-4.14: ami-0dc6c4d1bd5161f13
28
- us-east-1-4.13: ami-0624891c612b5eaa0
29
- us-east-2-4.13: ami-0dc6c4d1bd5161f13
30
- us-east-1-4.12: ami-0fe05b1aa8dacfa90
31
- us-east-2-4.12: ami-0ff64f495c7e977cf
32
- us-east-1-4.11: ami-0722eb0819717090f
33
- us-east-2-4.11: ami-026e5701f495c94a2
34
- us-east-1-4.10: ami-0c72f473496a7b1c2
35
- us-east-2-4.10: ami-09e637fc5885c13cc
36
- replicas: "2"
37
- instanceType: m6a.2xlarge
38
- kind: ConfigMap
39
- metadata:
40
- name: aws-ocp-ami-ids
41
- namespace: policies
42
22
{{- range $i, $zone := list "a" "b" "c" }}
43
23
- complianceType: musthave
44
24
objectDefinition:
52
32
name: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-workerocs-{{ list (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region $zone | join "" }}
53
33
namespace: openshift-machine-api
54
34
spec:
55
- replicas: '{{ fromConfigMap "policies" "aws-ocp-ami-ids " "replicas " | toInt }}'
35
+ replicas: '{{ fromConfigMap "policies" "opp-settings " "awsReplicas " | toInt }}'
56
36
selector:
57
37
matchLabels:
58
38
machine.openshift.io/cluster-api-cluster: '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}'
72
52
providerSpec:
73
53
value:
74
54
ami:
75
- id: '{{ fromConfigMap "policies" "aws-ocp-ami-ids " (printf "%s-%s" (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region (fromClusterClaim "openshiftversion-major-minor")) }}'
55
+ id: '{{ fromConfigMap "policies" "opp-settings " (printf "%s-%s" (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region (fromClusterClaim "openshiftversion-major-minor")) }}'
76
56
apiVersion: awsproviderconfig.openshift.io/v1beta1
77
57
blockDevices:
78
58
- ebs:
84
64
deviceIndex: 0
85
65
iamInstanceProfile:
86
66
id: '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-worker-profile'
87
- instanceType: '{{ fromConfigMap "policies" "aws-ocp-ami-ids " "instanceType " }}'
67
+ instanceType: '{{ fromConfigMap "policies" "opp-settings " "awsInstanceType " }}'
88
68
kind: AWSMachineProviderConfig
89
69
metadata:
90
70
creationTimestamp: null
@@ -115,14 +95,14 @@ spec:
115
95
kind: MachineSet
116
96
metadata:
117
97
annotations:
118
- machine.openshift.io/memoryMb: "16384"
119
- machine.openshift.io/vCPU: "4"
98
+ machine.openshift.io/memoryMb: '{{ fromConfigMap "policies" "opp-settings" "vmwareMemory" }}'
99
+ machine.openshift.io/vCPU: '{{ fromConfigMap "policies" "opp-settings" "vmwareCPU" }}'
120
100
labels:
121
101
machine.openshift.io/cluster-api-cluster: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}
122
102
name: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-storage
123
103
namespace: openshift-machine-api
124
104
spec:
125
- replicas: 6
105
+ replicas: '{{ fromConfigMap "policies" "opp-settings" "vmwareReplicas" | toInt }}'
126
106
selector:
127
107
matchLabels:
128
108
machine.openshift.io/cluster-api-cluster: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}
@@ -146,13 +126,13 @@ spec:
146
126
name: vsphere-cloud-credentials
147
127
diskGiB: 120
148
128
kind: VSphereMachineProviderSpec
149
- memoryMiB: 16384
129
+ memoryMiB: '{{ fromConfigMap "policies" "opp-settings" "vmwareMemory" | toInt }}'
150
130
metadata:
151
131
creationTimestamp: null
152
132
network:
153
133
devices:
154
134
- networkName: {{ (index (index (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.vsphere.failureDomains 0).topology.networks 0) }}
155
- numCPUs: 4
135
+ numCPUs: '{{ fromConfigMap "policies" "opp-settings" "vmwareCPU" | toInt }}'
156
136
numCoresPerSocket: 4
157
137
snapshot: ""
158
138
template: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-rhcos-generated-region-generated-zone
0 commit comments