// Module included in the following assemblies:
//
// * installing/installing_azure_stack_hub/installing-azure-stack-hub-user-infra.adoc
// * installing/installing_azure_stack_hub/installing-azure-stack-hub-default.adoc

ifeval::["{context}" == "installing-azure-stack-hub-user-infra"]
:ash:
endif::[]
ifeval::["{context}" == "installing-azure-stack-hub-default"]
:ash-default:
endif::[]
ifeval::["{context}" == "installing-azure-stack-hub-network-customizations"]
:ash-network:
endif::[]

:_mod-docs-content-type: REFERENCE
[id="installation-azure-stack-hub-config-yaml_{context}"]
= Sample customized install-config.yaml file for Azure Stack Hub

[role="_abstract"]
You can customize the `install-config.yaml` file to specify more details about your {product-title} cluster's platform or modify the values of the required parameters.

[IMPORTANT]
====
This sample YAML file is provided for reference only. Use it as a resource to enter parameter values into the installation configuration file that you created manually.
====

ifdef::ash[]
[source,yaml]
----
apiVersion: v1
baseDomain: example.com
controlPlane:
  name: master
  platform:
    azure:
      osDisk:
        diskSizeGB: 1024
        diskType: premium_LRS
  replicas: 3
compute:
- name: worker
  platform:
    azure:
      osDisk:
        diskSizeGB: 512
        diskType: premium_LRS
  replicas: 0
metadata:
  name: test-cluster
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: 10.0.0.0/16
  networkType: OVNKubernetes
  serviceNetwork:
  - 172.30.0.0/16
platform:
  azure:
    armEndpoint: azurestack_arm_endpoint
    baseDomainResourceGroupName: resource_group
    region: azure_stack_local_region
    resourceGroupName: existing_resource_group
    outboundType: Loadbalancer
    cloudName: AzureStackCloud
pullSecret: '{"auths": ...}'
ifndef::openshift-origin[]
fips: false
endif::openshift-origin[]
additionalTrustBundle: |
    -----BEGIN CERTIFICATE-----
    <MY_TRUSTED_CA_CERT>
    -----END CERTIFICATE-----
sshKey: ssh-ed25519 AAAA...
----

where:

`controlPlane`:: Specifies the configuration for the machines that form the control plane. The `controlPlane` section is a single mapping. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not. Only one control plane pool is used.
`compute`:: Specifies the configuration for the machines that form the compute plane. The `compute` section is a sequence of mappings. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not.
`controlPlane.platform.azure.osDisk.diskSizeGB`:: Specifies the size of the disk to use in GB. Minimum recommendation for control plane nodes is 1024 GB.
`compute.platform.azure.osDisk.diskSizeGB`:: Specifies the size of the disk to use in GB.
`metadata.name`:: Specifies the name of the cluster.
`networking.networkType`:: Specifies the cluster network plugin to install. The default value `OVNKubernetes` is the only supported value.
`platform.azure.armEndpoint`:: Specifies the Azure Resource Manager endpoint that your Azure Stack Hub operator provides.
`platform.azure.baseDomainResourceGroupName`:: Specifies the name of the resource group that contains the DNS zone for your base domain.
`platform.azure.region`:: Specifies the name of your Azure Stack Hub local region.
`platform.azure.resourceGroupName`:: Specifies the name of an already existing resource group to install your cluster to. If undefined, a new resource group is created for the cluster.
`platform.azure.cloudName`:: Specifies the Azure Stack Hub environment as your target platform.
`pullSecret`:: Specifies the pull secret required to authenticate your cluster.
ifndef::openshift-origin[]
`fips`:: Specifies whether to enable or disable FIPS mode. By default, FIPS mode is not enabled. If FIPS mode is enabled, the {op-system-first} machines that {product-title} runs on bypass the default Kubernetes cryptography suite and use the cryptography modules that are provided with {op-system} instead.
+
--
[IMPORTANT]
====
To enable FIPS mode for your cluster, you must run the installation program from a {op-system-base-full} computer configured to operate in FIPS mode. For more information about configuring FIPS mode on RHEL, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/assembly_installing-the-system-in-fips-mode_security-hardening[Installing the system in FIPS mode].

When running {op-system-base-full} or {op-system-first} booted in FIPS mode, {product-title} core components use the {op-system-base} cryptographic libraries that have been submitted to NIST for FIPS 140-2/140-3 Validation on only the x86_64, ppc64le, and s390x architectures.
====
--
endif::openshift-origin[]
`additionalTrustBundle`:: Specifies the certificate trust bundle. If your Azure Stack Hub environment uses an internal certificate authority (CA), add the necessary certificate bundle in `.pem` format.
`sshKey`:: Specifies the `sshKey` value that you use to access the machines in your cluster. This parameter is optional.
+
[NOTE]
====
For production {product-title} clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your `ssh-agent` process uses.
====
endif::ash[]

ifdef::ash-default,ash-network[]
[source,yaml]
----
apiVersion: v1
baseDomain: example.com
credentialsMode: Manual
controlPlane:
  name: master
  platform:
    azure:
      osDisk:
        diskSizeGB: 1024
        diskType: premium_LRS
  replicas: 3
compute:
- name: worker
  platform:
    azure:
      osDisk:
        diskSizeGB: 512
        diskType: premium_LRS
  replicas: 3
metadata:
  name: test-cluster
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: 10.0.0.0/16
  networkType: OVNKubernetes
  serviceNetwork:
  - 172.30.0.0/16
platform:
  azure:
    armEndpoint: azurestack_arm_endpoint
    baseDomainResourceGroupName: resource_group
    region: azure_stack_local_region
    resourceGroupName: existing_resource_group
    outboundType: Loadbalancer
    cloudName: AzureStackCloud
    clusterOSimage: https://vhdsa.blob.example.example.com/vhd/rhcos-410.84.202112040202-0-azurestack.x86_64.vhd
pullSecret: '{"auths": ...}'
ifndef::openshift-origin[]
fips: false
endif::openshift-origin[]
sshKey: ssh-ed25519 AAAA...
additionalTrustBundle: |
    -----BEGIN CERTIFICATE-----
    <MY_TRUSTED_CA_CERT>
    -----END CERTIFICATE-----
----

where:

`baseDomain`:: Specifies the base domain for your cluster. This parameter is required.
`controlPlane`:: Specifies the configuration for the machines that form the control plane. The `controlPlane` section is a single mapping. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not. Although both sections currently define a single machine pool, it is possible that future versions of {product-title} will support defining multiple compute pools during installation. Only one control plane pool is used. If you do not provide these parameter, the installation program provides the default value.
`compute`:: Specifies the configuration for the machines that form the compute plane. The `compute` section is a sequence of mappings. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not. Although both sections currently define a single machine pool, it is possible that future versions of {product-title} will support defining multiple compute pools during installation. If you do not provide these parameter, the installation program provides the default value.
`controlPlane.platform.azure.osDisk.diskSizeGB`:: Specifies the size of the disk to use in GB. Minimum recommendation for control plane nodes is 1024 GB.
`compute.platform.azure.osDisk.diskSizeGB`:: Specifies the size of the disk to use in GB.
`metadata.name`:: Specifies the name of the cluster. This parameter is required.
`networking.networkType`:: Specifies the cluster network plugin to install. The default value `OVNKubernetes` is the only supported value.
`platform.azure.armEndpoint`:: Specifies the Azure Resource Manager endpoint that your Azure Stack Hub operator provides. This parameter is required.
`platform.azure.baseDomainResourceGroupName`:: Specifies the name of the resource group that contains the DNS zone for your base domain. This parameter is required.
`platform.azure.region`:: Specifies the name of your Azure Stack Hub local region. This parameter is required.
`platform.azure.resourceGroupName`:: Specifies the name of an existing resource group to install your cluster to. If undefined, a new resource group is created for the cluster.
`platform.azure.cloudName`:: Specifies the `platform.azure.cloudName` parameter. This parameter is required.
`platform.azure.clusterOSimage`:: Specifies the URL of a storage blob in the Azure Stack environment that contains an {op-system} VHD.
`pullSecret`:: Specifies the pull secret required to authenticate your cluster. This parameter is required.
ifndef::openshift-origin[]
`fips`:: Specifies whether to enable or disable FIPS mode. By default, FIPS mode is not enabled. If FIPS mode is enabled, the {op-system-first} machines that {product-title} runs on bypass the default Kubernetes cryptography suite and use the cryptography modules that are provided with {op-system} instead.
+
[IMPORTANT]
====
When running {op-system-base-full} or {op-system-first} booted in FIPS mode, {product-title} core components use the {op-system-base} cryptographic libraries that have been submitted to NIST for FIPS 140-2/140-3 Validation on only the x86_64, ppc64le, and s390x architectures.
====
endif::openshift-origin[]
`sshKey`:: Specifies the `sshKey` value that you use to access the machines in your cluster. This parameter is optional.
+
[NOTE]
====
For production {product-title} clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your `ssh-agent` process uses.
====
`additionalTrustBundle`:: Specifies the certificate trust bundle. If the Azure Stack Hub environment is using an internal Certificate Authority (CA), adding the CA certificate is required.

endif::ash-default,ash-network[]

ifeval::["{context}" == "installing-azure-stack-hub-user-infra"]
:!ash:
endif::[]
ifeval::["{context}" == "installing-azure-stack-hub-default"]
:!ash-default:
endif::[]
ifeval::["{context}" == "installing-azure-stack-hub-network-customizations"]
:!ash-network:
endif::[]