Skip to content

Commit

Permalink
MGMT-12837: Add Shielded VMs configuration to gcp provider types
Browse files Browse the repository at this point in the history
  • Loading branch information
eranco74 committed Dec 6, 2022
1 parent f2fbb1d commit 4dff19b
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 21 deletions.
25 changes: 25 additions & 0 deletions machine/v1beta1/types_gcpprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ type GCPMachineProviderSpec struct {
// +kubebuilder:validation:Enum=Always;Never;
// +optional
RestartPolicy GCPRestartPolicyType `json:"restartPolicy,omitempty"`

// ShieldedInstanceConfig is the Shielded VM configuration for the VM
// +optional
ShieldedInstanceConfig *GCPShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
}

// GCPDisk describes disks for GCP.
Expand Down Expand Up @@ -201,3 +205,24 @@ type GCPMachineProviderStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP.
// Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring
type GCPShieldedInstanceConfig struct {
// EnableSecureBoot enable digital signature verification of all boot components, and halt the boot process if signature verification fails.
// Secure boot helps protect your VM instances against boot-level and kernel-level malware and rootkits.
// If omitted, the platform chooses a default, which is subject to change over time, currently that default is false.
// +optional
EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`

// EnableVTPM enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline.
// The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed.
// If omitted, the platform chooses a default, which is subject to change over time, currently that default is true.
EnableVTPM bool `json:"enableVTPM,omitempty"`

// EnableIntegrityMonitoring Enable integrity monitoring that verify the runtime boot integrity.
// Compares the most recent boot measurements to the integrity policy baseline and return
// a pair of pass/fail results depending on whether they match or not.
// If omitted, the platform chooses a default, which is subject to change over time, currently that default is true.
EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
}
21 changes: 21 additions & 0 deletions machine/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 32 additions & 20 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 42 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -18349,6 +18349,10 @@
"$ref": "#/definitions/com.github.openshift.api.machine.v1beta1.GCPServiceAccount"
}
},
"shieldedInstanceConfig": {
"description": "ShieldedInstanceConfig is the Shielded VM configuration for the VM",
"$ref": "#/definitions/com.github.openshift.api.machine.v1beta1.GCPShieldedInstanceConfig"
},
"tags": {
"description": "Tags list of tags to apply to the VM.",
"type": "array",
Expand Down Expand Up @@ -18474,6 +18478,24 @@
}
}
},
"com.github.openshift.api.machine.v1beta1.GCPShieldedInstanceConfig": {
"description": "GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring",
"type": "object",
"properties": {
"enableIntegrityMonitoring": {
"description": "EnableIntegrityMonitoring Enable integrity monitoring that verify the runtime boot integrity. Compares the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. If omitted, the platform chooses a default, which is subject to change over time, currently that default is true.",
"type": "boolean"
},
"enableSecureBoot": {
"description": "EnableSecureBoot enable digital signature verification of all boot components, and halt the boot process if signature verification fails. Secure boot helps protect your VM instances against boot-level and kernel-level malware and rootkits. If omitted, the platform chooses a default, which is subject to change over time, currently that default is false.",
"type": "boolean"
},
"enableVTPM": {
"description": "EnableVTPM enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. If omitted, the platform chooses a default, which is subject to change over time, currently that default is true.",
"type": "boolean"
}
}
},
"com.github.openshift.api.machine.v1beta1.Image": {
"description": "Image is a mirror of azure sdk compute.ImageReference",
"type": "object",
Expand Down

0 comments on commit 4dff19b

Please sign in to comment.