Skip to content

Commit

Permalink
Merge pull request ocp-power-automation#243 from aishwaryabk/fips-branch
Browse files Browse the repository at this point in the history
To enable FIPS
  • Loading branch information
Power Cloud Robot authored Apr 1, 2022
2 parents 8a64e0e + 84c4f4a commit b707d45
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/var.tfvars-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ If `cluster_if_prefix` is not set, the `cluster_id` will be used only without pr
A random value will be used for `cluster_id` if not set.
The total length of `cluster_id_prefix`.`cluster_id` should not exceed 14 characters.

### FIPS Variable for OpenShift deployment

These variables will be used for deploying OCP in FIPS mode.
Change the values as per your requirement.
```
fips_compliant = false
```

### Misc Customizations

These variables provides miscellaneous customizations. For common usage scenarios these are not required and should be left unchanged.
Expand Down
1 change: 1 addition & 0 deletions modules/5_install/install.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ locals {
log_level = var.log_level
release_image_override = var.enable_local_registry ? local.local_registry_ocp_image : var.release_image_override
enable_local_registry = var.enable_local_registry
fips_compliant = var.fips_compliant
node_connection_timeout = 60 * var.connection_timeout
rhcos_pre_kernel_options = var.rhcos_pre_kernel_options
rhcos_kernel_options = var.rhcos_kernel_options
Expand Down
1 change: 1 addition & 0 deletions modules/5_install/templates/install_vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ storage_type: ${storage_type}
log_level: ${log_level}
release_image_override: '${release_image_override}'
enable_local_registry: ${enable_local_registry}
fips_compliant: "${fips_compliant}"

node_connection_timeout: ${node_connection_timeout}

Expand Down
1 change: 1 addition & 0 deletions modules/5_install/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ variable "worker_ips" {}
variable "public_key" {}
variable "pull_secret" {}
variable "release_image_override" {}
variable "fips_compliant" {}

variable "private_network_mtu" {}

Expand Down
1 change: 1 addition & 0 deletions ocp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ module "install" {
release_image_override = var.release_image_override
private_network_mtu = var.private_network_mtu
enable_local_registry = var.enable_local_registry
fips_compliant = var.fips_compliant
local_registry_image = var.local_registry_image
ocp_release_tag = var.ocp_release_tag
install_playbook_repo = var.install_playbook_repo
Expand Down
2 changes: 1 addition & 1 deletion var.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pull_secret_file = "data/pull-secret.txt"
cluster_domain = "ibm.com" # Set domain to nip.io or xip.io if you prefer using online wildcard domain and avoid modifying /etc/hosts
cluster_id_prefix = "test-ocp" # Set it to empty if just want to use cluster_id without prefix
cluster_id = "" # It will use random generated id with cluster_id_prefix if this is not set

#fips_compliant = false # Set it true if you prefer to use FIPS enable in ocp deployment

### Misc Customizations

Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ variable "install_playbook_repo" {
variable "install_playbook_tag" {
description = "Set the branch/tag name or commit# for using ocp4-playbooks repo"
# Checkout level for https://github.com/ocp-power-automation/ocp4-playbooks which is used for running ocp4 installations steps
default = "a328a8d03c043d4f7c38300f35bba471bc81bd37"
default = "284b597b3e88c635e3069b82926aa16812238492"
}

variable "ansible_extra_options" {
Expand Down Expand Up @@ -341,6 +341,12 @@ variable "cluster_id" {
default = ""
}

variable "fips_compliant" {
type = bool
description = "Set to true to enable usage of FIPS for OCP deployment."
default = false
}

variable "dns_forwarders" {
default = "8.8.8.8; 8.8.4.4"
}
Expand Down

0 comments on commit b707d45

Please sign in to comment.