1
1
# Required configuration
2
2
3
3
The cluster configuration file can be generated by using [ ` clusterctl generate cluster ` ] [ clusterctl-generate-cluster ] command.
4
- This command actually uses [ the template file] [ template-file ] and replace the values surrounded by ` ${} ` with environment variables. You have to set all required environment variables in advance. The following sections explain some more details about what should be configured.
4
+ This command actually uses [ a template file] [ template-file ] and replaces the values surrounded by ` ${} ` with environment variables.
5
+ You have to set all required environment variables in advance. The following sections explain some more details about what should be configured.
5
6
6
- Note: You can use [ the template file ] [ template-file ] by manually replacing values.
7
+ Note: You can also use [ template files ] [ template-file ] by manually replacing values in copies of the template file .
7
8
8
9
``` bash
9
10
clusterctl generate cluster capi-quickstart \
@@ -13,25 +14,52 @@ clusterctl generate cluster capi-quickstart \
13
14
> capi-quickstart.yaml
14
15
```
15
16
17
+ Note: additional template files are provided, offering capabilities beyond the default template file. These can be
18
+ utilized via the * clusterctl --flavor* parameter. Additional environment variables are often required by these templates.
19
+ See clusterctl documentation for further details about * flavors* .
20
+
16
21
In order to fetch the configuration parameters via the terminal, please install [ cmk] [ cmk-download ] and [ jq] [ jq-download ]
17
22
18
23
## Cluster Level Configurations
19
24
20
25
These configurations are passed while defining the ` CloudStackCluster ` and apply to the entire cluster.
21
26
22
- ### Zone
27
+ ### Failure Domains
28
+
29
+ The * Cluster API Provider* offers high-availability clusters deployed across multiple * Failure Domains* , each of which is
30
+ a diverse set of infrastructure that doesn't share required dependencies (such as power source, networking provider)
31
+ with other failure domains. In the face of a dependency failure, only cluster members deployed on the failed failure
32
+ domain will themselves fail. The remaining cluster members will continue operation, and the cluster manager will likely
33
+ restore capacity by allocating replacement cluster members in the surviving failure domains.
34
+
35
+ * CloudStack* implements this concept with * Zones* . The * Cluster API Provider CloudStack* enables end-users to specify
36
+ the CloudStack Zone for each Failure Domain, as well as the particular network of this Zone to use.
37
+
38
+ The templates provided with * ClusterAPI Provider CloudStack* only define a single failure domain, mapped to a specific
39
+ CloudStack Zone and a specific network on that CloudStack Zone. The below parameters allow the end user to define these.
40
+ No additional parameters are required to use these templates.
41
+
42
+ * ClusterAPI Provider CloudStack* additionally supports optional attributes beyond these, allowing each Failure Domain
43
+ to use a distinct Domain/Account or CloudStack management endpoint. Note that these additional attributes are not
44
+ utilized in the provided templates.
45
+
46
+ Advanced users can define cluster templates manually that declare additional Failure Domains, and can utilize the
47
+ additional failure domain attributes supported by * ClusterAPI Provider CloudStack* . See the [ failure domain API definition] [ failure-domain-api ]
48
+ for more details.
49
+
50
+ #### Zone
23
51
24
- The Zone must be exposed as an environment variable ` CLOUDSTACK_ZONE_NAME ` and is a mandatory parameter.
52
+ The Zone must be declared via an environment variable ` CLOUDSTACK_ZONE_NAME ` and is a mandatory parameter.
25
53
As of now, only advanced zones without security groups is supported.
26
54
27
55
The list of zones can be fetched using the cmk cli as follows :
28
56
```
29
57
cmk list zones listall=true | jq '.zone[] | {name, id}'
30
58
```
31
59
32
- ### Network
60
+ #### Network
33
61
34
- The network must be exposed as an environment variable ` CLOUDSTACK_NETWORK_NAME ` and is a mandatory parameter.
62
+ The network must be declared as an environment variable ` CLOUDSTACK_NETWORK_NAME ` and is a mandatory parameter.
35
63
As of now, only isolated and shared networks are supported.
36
64
If the specified network does not exist, a new isolated network will be created.
37
65
@@ -40,17 +68,41 @@ The list of networks for the specific zone can be fetched using the cmk cli as f
40
68
cmk list networks listall=true zoneid=<zoneid> | jq '.network[] | {name, id, type}'
41
69
```
42
70
71
+ #### CloudStack Endpoint Credentials Secret (* optional for provided templates when used with provided getting-started process* )
72
+
73
+ A reference to a Kubernetes Secret containing a YAML object containing credentials for accessing a particular CloudStack
74
+ management endpoint. The YAML object is of the form:
75
+
76
+ ```
77
+ api-url: <cloudstackApiUrl>
78
+ api-key: <cloudstackApiKey>
79
+ secret-key: <cloudstackSecretKey>
80
+ verify-ssl: true|false
81
+ ```
82
+
83
+ Optional environment Variables ` CLOUDSTACK_FD1_SECRET_NAME ` and ` CLOUDSTACK_FD1_SECRET_NAMESPACE ` allow the end-user
84
+ to override the template's default settings, utilizing a differently named secret.
85
+
86
+ #### CloudStack Failure Domain Name (* optional for provided templates* )
87
+
88
+ When using multiple Failure Domains each requires a distinct name. The provided templates * do not* configure multiple
89
+ Failure Domains, and only utilize a default name. This name can be changed by defining environment variable
90
+ ` CLOUDSTACK_FD1_NAME ` . Doing so has no effect on the operation of clusters defined with the templates. This
91
+ option is included mainly to convey the need and mechanism for naming failure domains when multiple failure
92
+ domains are defined via custom-authored templates.
43
93
44
- ### Endpoint
94
+ ### Cluster Endpoint
45
95
46
- The endpoint of the workload cluster. It can either be an IP or an FQDN which is resolvable from the management cluster
96
+ The endpoint of the workload cluster that will be provisioned. It can either be an IP or an FQDN, resolvable
97
+ from the management cluster.
47
98
48
99
If on an isolated network, and the endpoint is an IP, it must be an IP in the Public IP range.
49
100
The necessary Firewall and LoadBalancing rules will be automatically created on Apache CloudStack for the specified IP.
50
101
51
102
If on a shared network, and the endpoint is an IP, it must belong to the shared network range and not allocated to any other resource on CloudStack.
52
103
53
104
The Endpoint is exposed in two parts, as the ` CLUSTER_ENDPOINT_IP ` and ` CLUSTER_ENDPOINT_PORT ` environment variables.
105
+ ` CLUSTER_ENDPOINT_PORT ` is optional, and defaults to * 6443* .
54
106
55
107
The list of Public IPs for the specific zone can be fetched using the cmk cli as follows :
56
108
```
@@ -224,3 +276,4 @@ TODO / Add feature
224
276
[jq-download] : https://stedolan.github.io/jq/
225
277
[prebuilt-images] : http://packages.shapeblue.com/cluster-api-provider-cloudstack/images/
226
278
[template-file] : https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/blob/main/templates/cluster-template.yaml
279
+ [failure-domain-api] : https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/blob/main/api/v1beta2/cloudstackfailuredomain_types.go
0 commit comments