Skip to content

Commit

Permalink
MGMT-18241: Review docs_links file to align all the URLs with correct…
Browse files Browse the repository at this point in the history
… links (#2617) (#2622)

* DOC URL contains hard-coded number

* Replace docs.openshift.com by docs.redhat.com

* Changes in approving certificate-signing requests link

* Changes in MCE link resource requirements

* Changing MCE docs link

* Reviewing all docs links

* Add DEFAULT_OPENSHIFT_DOCS_VERSION constant to docs_links file

* Change links for Nutanix and vSphere docs and adding OCI docs link

* Adjusting links for operators
  • Loading branch information
ammont82 authored Jun 27, 2024
1 parent 6a5b2fd commit 37e92c8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
55 changes: 29 additions & 26 deletions libs/ui-lib/lib/common/config/docs_links.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const DEFAULT_OPENSHIFT_DOCS_VERSION = '4.15';

export const getShortOpenshiftVersion = (ocpVersion?: string) =>
ocpVersion?.split('.').slice(0, 2).join('.');
ocpVersion ? ocpVersion.split('.').slice(0, 2).join('.') : DEFAULT_OPENSHIFT_DOCS_VERSION;

export const getYearForAssistedInstallerDocumentationLink = () => {
return new Date().getFullYear();
Expand All @@ -18,48 +20,49 @@ export const CLUSTER_MANAGER_SITE_LINK = 'https://console.redhat.com/openshift/i
export const PULL_SECRET_INFO_LINK = CLUSTER_MANAGER_SITE_LINK;

export const getEncryptingDiskDuringInstallationDocsLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.12'
}/installing/install_config/installing-customizing.html#installation-special-config-encrypt-disk_installing-customizing`;
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
ocpVersion,
)}/html/installing/installation-configuration#installation-special-config-encrypt-disk_installing-customizing`;

//Networking page
export const getOpenShiftNetworkingDocsLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.13'
}/installing/installing_bare_metal/installing-bare-metal.html#installation-network-user-infra_installing-bare-metal`;
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
ocpVersion,
)}/html/installing/installing-on-bare-metal#installation-network-user-infra_installing-bare-metal`;

export const SSH_GENERATION_DOC_LINK = 'https://www.redhat.com/sysadmin/configure-ssh-keygen';

//Hosts status
export const getOcpConsoleNodesPage = (ocpConsoleUrl: string) =>
`${ocpConsoleUrl}/k8s/cluster/nodes`;

export const getApproveNodesInClLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.11'
}/installing/installing_platform_agnostic/installing-platform-agnostic.html#installation-approve-csrs_installing-platform-agnostic`;
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
ocpVersion,
)}/html/installing/installing-on-any-platform#installation-approve-csrs_installing-platform-agnostic`;

//Static Ip configuration
export const NMSTATE_EXAMPLES_LINK = 'https://nmstate.io/examples.html';

export const getOCPStaticIPDocLink = (docVersion = '2.8') =>
`https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/${docVersion}/html-single/clusters/index#on-prem-creating-your-cluster-with-the-cli-nmstateconfig`;
`https://docs.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/${docVersion}/html-single/clusters/index#on-prem-creating-your-cluster-with-the-cli-nmstateconfig`;

//Platform integration
export const NUTANIX_CONFIG_LINK = 'https://access.redhat.com/solutions/6983944';
export const NUTANIX_CONFIG_LINK = `https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/${getYearForAssistedInstallerDocumentationLink()}/html-single/installing_openshift_container_platform_with_the_assisted_installer/index#assembly_installing-on-nutanix`;

export const VSPHERE_CONFIG_LINK = `https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/${getYearForAssistedInstallerDocumentationLink()}/html-single/installing_openshift_container_platform_with_the_assisted_installer/index#adding-hosts-on-vsphere_installing-on-vsphere`;

export const VSPHERE_CONFIG_LINK = 'https://access.redhat.com/solutions/6677901';
export const OCI_CONFIG_LINK = `https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/${getYearForAssistedInstallerDocumentationLink()}/html-single/installing_openshift_container_platform_with_the_assisted_installer/index#installing-on-oci`;

//Custom manifests
export const CUSTOM_MANIFESTS_HELP_LINK =
'https://docs.openshift.com/container-platform/4.12/installing/install_config/installing-customizing.html';
export const CUSTOM_MANIFESTS_HELP_LINK = `https://docs.redhat.com/en/documentation/openshift_container_platform/4.15/html/installing/installation-configuration#installation-special-config-kargs_installing-customizing`;

export const getCustomManifestsDocsLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.12'
}/installing/install_config/installing-customizing.html`;
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
ocpVersion,
)}/html/installing/installation-configuration#installation-special-config-kargs_installing-customizing`;

export const HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS =
'https://access.redhat.com/documentation/en-us/assisted_installer_for_openshift_container_platform/2024/html/installing_openshift_container_platform_with_the_assisted_installer/expanding-the-cluster#checking-for-multiple-architectures_expanding-the-cluster';
export const HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS = `https://docs.redhat.com/en/documentation/assisted_installer_for_openshift_container_platform/${getYearForAssistedInstallerDocumentationLink()}/html/installing_openshift_container_platform_with_the_assisted_installer/expanding-the-cluster#checking-for-multiple-architectures_expanding-the-cluster`;

export const OCP_RELEASES_PAGE = 'openshift/releases';

Expand All @@ -77,14 +80,14 @@ export const CNV_LINK = 'https://cloud.redhat.com/learn/topics/virtualization/';
export const ODF_LINK = 'https://www.redhat.com/en/resources/openshift-data-foundation-datasheet';

export const getMceDocsLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.12'
}/architecture/mce-overview-ocp.html`;
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getShortOpenshiftVersion(
ocpVersion,
)}/html/architecture/about-the-multicluster-engine-for-kubernetes-operator`;

export const getLvmsDocsLink = (ocpVersion?: string) =>
`https://docs.openshift.com/container-platform/${
getShortOpenshiftVersion(ocpVersion) || '4.12'
}/storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.html`;
`https://docs.redhat.com/container-platform/${getShortOpenshiftVersion(
ocpVersion,
)}/storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.html`;

//Others
export const REDHAT_CONSOLE_OPENSHIFT = 'https://console.redhat.com/openshift';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NUTANIX_CONFIG_LINK, VSPHERE_CONFIG_LINK } from '../../../../common';
import { NUTANIX_CONFIG_LINK, OCI_CONFIG_LINK, VSPHERE_CONFIG_LINK } from '../../../../common';
import { PlatformType } from '@openshift-assisted/types/assisted-installer-service';

export const ExternalPlatformLabels: { [key in PlatformType]: string } = {
Expand All @@ -12,6 +12,7 @@ export const ExternalPlatformLabels: { [key in PlatformType]: string } = {
export const ExternalPlatformLinks: Partial<{ [key in PlatformType]: string }> = {
nutanix: NUTANIX_CONFIG_LINK,
vsphere: VSPHERE_CONFIG_LINK,
external: OCI_CONFIG_LINK,
};

export const ExternalPlaformIds: { [key in PlatformType]: string } = {
Expand Down

0 comments on commit 37e92c8

Please sign in to comment.