forked from openshift/assisted-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agentClusterInstall.j2
65 lines (64 loc) · 1.89 KB
/
agentClusterInstall.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apiVersion: extensions.hive.openshift.io/v1beta1
kind: AgentClusterInstall
metadata:
name: '{{ agent_cluster_install_name }}'
namespace: '{{ spoke_namespace }}'
spec:
clusterDeploymentRef:
name: '{{ cluster_deployment_name }}'
imageSetRef:
name: '{{ cluster_image_set_name }}'
{% if spoke_api_vip %}
apiVIPs:
- '{{ spoke_api_vip }}'
{% endif %}
{% if spoke_ingress_vip %}
ingressVIPs:
- '{{ spoke_ingress_vip }}'
{% endif %}
networking:
clusterNetwork:
- cidr: {{ cluster_subnet }}
hostPrefix: {{ cluster_host_prefix }}
{% if cluster_subnet_additional|length and cluster_host_prefix_additional|length %}
- cidr: {{ cluster_subnet_additional }}
hostPrefix: {{ cluster_host_prefix_additional }}
{% endif %}
{% if (spoke_controlplane_agents|int == 1 and external_subnet_additional|length == 0) or external_subnet_additional|length %}
machineNetwork:
- cidr: {{ external_subnet }}
{% if external_subnet_additional|length %}
- cidr: {{ external_subnet_additional }}
{% endif %}
{% endif %}
serviceNetwork:
- {{ service_subnet }}
{% if service_subnet_additional|length %}
- {{ service_subnet_additional }}
{% endif %}
{% if user_managed_networking %}
userManagedNetworking: {{ user_managed_networking }}
{% endif %}
provisionRequirements:
controlPlaneAgents: {{ spoke_controlplane_agents }}
{% if spoke_worker_agents is defined and spoke_worker_agents|int > 0 %}
workerAgents: {{ spoke_worker_agents }}
{% endif %}
sshPublicKey: '{{ ssh_public_key }}'
{% if manifests is defined and manifests %}
manifestsConfigMapRefs:
- name: '{{ agent_cluster_install_name }}'
{% endif %}
{% if manifests is defined and manifests %}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ agent_cluster_install_name }}'
namespace: '{{ spoke_namespace }}'
data:
{% for key, value in manifests.items() %}
{{ key }}: |
{{ value }}
{% endfor %}
{% endif %}