Skip to content

Commit df60f29

Browse files
Add documentation for worker node customization (#164)
1 parent 7df8b1c commit df60f29

File tree

5 files changed

+100
-18
lines changed

5 files changed

+100
-18
lines changed

api/v1beta1/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ type PlatformConfig struct {
190190
// * `INTEL_SKYLAKE_BM`
191191
// * `AMD_MILAN_BM`
192192
// Based on the enum, exactly one of the specific configuration types must be set
193-
PlatformConfigType PlatformConfigTypeEnum `json:"PlatformConfigType,omitempty"`
193+
PlatformConfigType PlatformConfigTypeEnum `json:"platformConfigType,omitempty"`
194194

195195
// AmdMilanBmPlatformConfig describe AMD Milan BM platform configuration
196196
AmdMilanBmPlatformConfig AmdMilanBmPlatformConfig `json:"amdMilanBmPlatformConfig,omitempty"`
@@ -523,7 +523,7 @@ type LaunchInstanceAgentConfig struct {
523523
// object.
524524
IsManagementDisabled *bool `json:"isManagementDisabled,omitempty"`
525525

526-
// AreAllPluginsDisabled defines rhether Oracle Cloud Agent can run all the available plugins.
526+
// AreAllPluginsDisabled defines whether Oracle Cloud Agent can run all the available plugins.
527527
// This includes the management and monitoring plugins.
528528
// To get a list of available plugins, use the
529529
// ListInstanceagentAvailablePlugins

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
Oracle Cloud Agent software running on the instance.
4444
properties:
4545
areAllPluginsDisabled:
46-
description: AreAllPluginsDisabled defines rhether Oracle Cloud
46+
description: AreAllPluginsDisabled defines whether Oracle Cloud
4747
Agent can run all the available plugins. This includes the management
4848
and monitoring plugins. To get a list of available plugins,
4949
use the ListInstanceagentAvailablePlugins operation in the Oracle
@@ -303,13 +303,6 @@ spec:
303303
description: InstanceSourceViaImageConfig defines the platform config
304304
parameters
305305
properties:
306-
PlatformConfigType:
307-
description: The type of platform configuration. Valid values
308-
are * `AMD_ROME_BM_GPU` * `AMD_ROME_BM` * `INTEL_ICELAKE_BM`
309-
* `AMD_VM` * `INTEL_VM` * `INTEL_SKYLAKE_BM` * `AMD_MILAN_BM`
310-
Based on the enum, exactly one of the specific configuration
311-
types must be set
312-
type: string
313306
amdMilanBmPlatformConfig:
314307
description: AmdMilanBmPlatformConfig describe AMD Milan BM platform
315308
configuration
@@ -560,6 +553,13 @@ spec:
560553
enabled on the instance.
561554
type: boolean
562555
type: object
556+
platformConfigType:
557+
description: The type of platform configuration. Valid values
558+
are * `AMD_ROME_BM_GPU` * `AMD_ROME_BM` * `INTEL_ICELAKE_BM`
559+
* `AMD_VM` * `INTEL_VM` * `INTEL_SKYLAKE_BM` * `AMD_MILAN_BM`
560+
Based on the enum, exactly one of the specific configuration
561+
types must be set
562+
type: string
563563
type: object
564564
preemptibleInstanceConfig:
565565
description: PreemptibleInstanceConfig Configuration options for preemptible

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
for the Oracle Cloud Agent software running on the instance.
5353
properties:
5454
areAllPluginsDisabled:
55-
description: AreAllPluginsDisabled defines rhether Oracle
55+
description: AreAllPluginsDisabled defines whether Oracle
5656
Cloud Agent can run all the available plugins. This
5757
includes the management and monitoring plugins. To get
5858
a list of available plugins, use the ListInstanceagentAvailablePlugins
@@ -329,13 +329,6 @@ spec:
329329
description: InstanceSourceViaImageConfig defines the platform
330330
config parameters
331331
properties:
332-
PlatformConfigType:
333-
description: The type of platform configuration. Valid
334-
values are * `AMD_ROME_BM_GPU` * `AMD_ROME_BM` * `INTEL_ICELAKE_BM`
335-
* `AMD_VM` * `INTEL_VM` * `INTEL_SKYLAKE_BM` * `AMD_MILAN_BM`
336-
Based on the enum, exactly one of the specific configuration
337-
types must be set
338-
type: string
339332
amdMilanBmPlatformConfig:
340333
description: AmdMilanBmPlatformConfig describe AMD Milan
341334
BM platform configuration
@@ -607,6 +600,13 @@ spec:
607600
is enabled on the instance.
608601
type: boolean
609602
type: object
603+
platformConfigType:
604+
description: The type of platform configuration. Valid
605+
values are * `AMD_ROME_BM_GPU` * `AMD_ROME_BM` * `INTEL_ICELAKE_BM`
606+
* `AMD_VM` * `INTEL_VM` * `INTEL_SKYLAKE_BM` * `AMD_MILAN_BM`
607+
Based on the enum, exactly one of the specific configuration
608+
types must be set
609+
type: string
610610
type: object
611611
preemptibleInstanceConfig:
612612
description: PreemptibleInstanceConfig Configuration options

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [Install Container Storage Interface (CSI)](./gs/install-csi.md)
2525
- [Provision a PVC on the Block Volume Service](./gs/pvc-bv.md)
2626
- [Provision a PVC on the File Storage Service](./gs/pvc-fss.md)
27+
- [Customize worker nodes](./gs/customize-worker-node.md)
2728
- [Networking Guide](./networking/networking.md)
2829
- [Default Network Infrastructure](./networking/infrastructure.md)
2930
- [Using Calico](./networking/calico.md)
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Customizing worker nodes
2+
## Configure user managed boot volume encryption
3+
Use the following configuration in `OCIMachineTemplate` to use a [customer
4+
managed boot volume encryption key][customer_managed_keys].
5+
```yaml
6+
kind: OCIMachineTemplate
7+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
8+
spec:
9+
template:
10+
spec:
11+
instanceSourceViaImageConfig:
12+
kmsKeyId: <kms-key-id>
13+
```
14+
15+
## Configure shielded instances
16+
Use the following configuration in `OCIMachineTemplate` to create [shielded instances][shielded_instances].
17+
Below example is for an AMD based VM. Please read the [CAPOCI github page][github_capoci_types] PlatformConfig struct
18+
for an enumeration of all the possible configurations.
19+
20+
```yaml
21+
kind: OCIMachineTemplate
22+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
23+
spec:
24+
template:
25+
spec:
26+
platformConfig:
27+
PlatformConfigType: "AMD_VM"
28+
amdVmPlatformConfig:
29+
isSecureBootEnabled: true
30+
isTrustedPlatformModuleEnabled: true
31+
isMeasuredBootEnabled: true
32+
```
33+
34+
## Configure preemptible instances
35+
Use the following configuration in `OCIMachineTemplate` to create [preemtible instances][preemptible_instances].
36+
37+
```yaml
38+
kind: OCIMachineTemplate
39+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
40+
spec:
41+
template:
42+
spec:
43+
preemptibleInstanceConfig:
44+
terminatePreemptionAction:
45+
preserveBootVolume: false
46+
```
47+
48+
## Configure capacity reservation
49+
Use the following configuration in `OCIMachineTemplate` to use [capacity reservations][capacity_reservations].
50+
51+
```yaml
52+
kind: OCIMachineTemplate
53+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
54+
spec:
55+
template:
56+
spec:
57+
capacityReservationId: <capacity-reservation-id>
58+
```
59+
60+
## Configure Oracle Cloud Agent plugins
61+
Use the following configuration in `OCIMachineTemplate` to configure [Oracle Cloud Agent plugins][cloud_agent_plugins].
62+
The example below enables Bastion plugin.
63+
64+
```yaml
65+
kind: OCIMachineTemplate
66+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
67+
spec:
68+
template:
69+
spec:
70+
agentConfig:
71+
pluginsConfigs:
72+
- name: "Bastion"
73+
desiredState: "ENABLED"
74+
```
75+
76+
[customer_managed_keys]: https://docs.oracle.com/en-us/iaas/Content/KeyManagement/Tasks/assigningkeys.htm
77+
[shielded_instances]: https://docs.oracle.com/en-us/iaas/Content/Compute/References/shielded-instances.htm
78+
[preemptible_instances]: https://docs.oracle.com/en-us/iaas/Content/Compute/Concepts/preemptible.htm#howitworks__using
79+
[cloud_agent_plugins]: https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/manage-plugins.htm
80+
[github_capoci_types]: https://github.com/oracle/cluster-api-provider-oci/blob/main/api/v1beta1/types.go
81+
[capacity_reservations]: https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/reserve-capacity.htm

0 commit comments

Comments
 (0)