diff --git a/src/components/clusterConfiguration/BasicNetworkFields.tsx b/src/components/clusterConfiguration/BasicNetworkFields.tsx index f561342544..85e504a654 100644 --- a/src/components/clusterConfiguration/BasicNetworkFields.tsx +++ b/src/components/clusterConfiguration/BasicNetworkFields.tsx @@ -8,13 +8,28 @@ type BasicNetworkFieldsProps = { }; const BasicNetworkFields: React.FC = ({ hostSubnets }) => { - const { validateField } = useFormikContext(); + const { validateField, values } = useFormikContext(); + const { name: clusterName, baseDnsDomain, hostSubnet } = values; + + const baseDnsHelperText = ( + <> + The base domain of the cluster. All DNS records must be sub-domains of this base and include + the cluster name. This cannot be changed later. The full cluster address will be:{' '} + + {clusterName || '[Cluster Name]'}.{baseDnsDomain || '[example.com]'} + + + ); + + const subnet = hostSubnet ? ` (${hostSubnet})` : ''; + return ( <> = ({ hostSubnets }) diff --git a/src/components/ui/formik/validationSchemas.ts b/src/components/ui/formik/validationSchemas.ts index 8efd421bf1..239bb88bcf 100644 --- a/src/components/ui/formik/validationSchemas.ts +++ b/src/components/ui/formik/validationSchemas.ts @@ -90,7 +90,7 @@ export const ipBlockValidationSchema = Yup.string().matches(IP_ADDRESS_BLOCK_REG }); export const dnsNameValidationSchema = Yup.string().matches(DNS_NAME_REGEX, { - message: 'Value "${value}" is not valid DNS name.', // eslint-disable-line no-template-curly-in-string + message: 'Value "${value}" is not valid DNS name. Example: basedomain.example.com', // eslint-disable-line no-template-curly-in-string excludeEmptyString: true, });