|
| 1 | +--- |
| 2 | +title: Configuration |
| 3 | +weight: 20 |
| 4 | +aliases: /telco-hub/configuration/ |
| 5 | +--- |
| 6 | + |
| 7 | +:toc: |
| 8 | +:imagesdir: /images |
| 9 | +:_mod-docs-content-type: ASSEMBLY |
| 10 | +include::modules/comm-attributes.adoc[] |
| 11 | + |
| 12 | +[id="telco-hub-pattern-configuration"] |
| 13 | += Telco hub pattern configuration |
| 14 | + |
| 15 | +The Telco Hub pattern uses the following file hierarchy to control what runs in your hub. |
| 16 | + |
| 17 | +* `values-global.yaml`: global, cross-environment pattern settings. |
| 18 | +* `values-hub.yaml`: hub-specific ArgoCD and cluster definitions. |
| 19 | +* `kustomize/overlays/telco-hub/kustomization.yaml`: enable required components, add optional services, and apply environment-specific patches. |
| 20 | + |
| 21 | +[id="global-pattern-configuration"] |
| 22 | +== Global pattern configuration |
| 23 | + |
| 24 | +The `values-global.yaml` file defines configuration values that apply across all clusters and environments in the pattern, establishing the overall pattern behavior. |
| 25 | + |
| 26 | +Key parameters within the global section include: |
| 27 | + |
| 28 | +* `pattern`: Defines the name of the validated pattern, set to `telco-hub-pattern`. |
| 29 | +* `secretLoader`: Use it to disable the secret loading process. For example, `disabled: true`. |
| 30 | +* `options`: Affects all clusters by defining default behaviors: |
| 31 | + |
| 32 | +** `syncPolicy`: Sets the default ArgoCD synchronization policy. Options include `Automatic` or `Manual`. |
| 33 | +** `installPlanApproval`: Sets the default operator install plan approval. Options include `Automatic` or `Manual`. |
| 34 | +** `useCSV`: Specifies whether to use specific `ClusterServiceVersions` for operators. The default value is `false`. |
| 35 | +* `main`: Defines settings for the main cluster (hub) that manages the pattern, including the `clusterGroupName: hub`. |
| 36 | +* Disconnected Configuration: This file also specifies sources for operators in disconnected environments, such as `patternsOperator: source: community-operators-disconnected` and `gitops: operatorSource: redhat-operators-disconnected`. |
| 37 | + |
| 38 | +[id="hub-cluster-configuration"] |
| 39 | +== Hub cluster configuration |
| 40 | +The `values-hub.yaml` file has configuration specific to the hub cluster within the Telco Hub pattern. It is crucial as it defines the hub cluster, which acts as the central management point for GitOps, cluster management, and policy enforcement across the infrastructure. |
| 41 | + |
| 42 | +Cluster group identification:: |
| 43 | +The `clusterGroup` section identifies the cluster's role and name: |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +clusterGroup: |
| 47 | + name: hub # Name of this cluster group |
| 48 | + isHubCluster: true # Designates this as the hub/management cluster |
| 49 | +---- |
| 50 | + |
| 51 | +Management of the `namespaces` and `subscriptions` resources within this file is delegated to the `telco-hub` kustomization application to prevent systematic conflicts between the Pattern Operator and the Telco Hub Reference Design Specifications. |
| 52 | + |
| 53 | +ArgoCD application configuration:: |
| 54 | + |
| 55 | +The `applications` section defines the core ArgoCD application for the Telco Hub pattern: |
| 56 | + |
| 57 | +* `telco-hub` application: Uses Kustomize for manifest processing `kustomize: true` and points to the overlay path `kustomize/overlays/telco-hub`. |
| 58 | +* Synchronization Policy: The `syncPolicy` is configured to be automated `automated: prune: true` to remove resources not present in git. |
| 59 | +* Retry Mechanism: The application uses a configured retry mechanism to handle temporary failures during synchronization: |
| 60 | + ◦ `limit: 6`: maximum number of sync retries, adjusted for about 20 minutes total. |
| 61 | + ◦ `backoff`: configured with an initial duration of `15s`, a factor of `2`, and a `maxDuration` of `15m`. |
| 62 | + |
| 63 | +[id="component-selection-and-environment-customization"] |
| 64 | +== Component selection and environment customization |
| 65 | + |
| 66 | +Components are enabled by uncommenting the corresponding remote resource declarations within the `resources:` array of the `kustomization.yaml` file. |
| 67 | +The pattern uses remote resources from the telco-reference git repository. |
| 68 | + |
| 69 | +Required components:: |
| 70 | +These components are essential for hub cluster functionality: |
| 71 | + |
| 72 | +* Red Hat Advanced Cluster Management for Kubernetes (ACM): Uncomment the resource URL to enable. Note: Enabling ACM requires that a storage backend is configured on the hub cluster first. |
| 73 | +* Topology Aware Lifecycle Manager (TALM): This component is required and typically enabled by default (or must be explicitly uncommented). |
| 74 | +* Local Registry: This component is required only if you are deploying the pattern in a disconnected environment. |
| 75 | +* GitOps Operator: This component's configuration is currently provided by default through the Validated Patterns Operator, and its resource URL from telco-reference is not yet supported by the pattern itself. |
| 76 | + |
| 77 | +Zero Touch Provisioning (ZTP) Workflow Components:: |
| 78 | +Enable this resource if you intend to use the GitOps ZTP workflow for automated cluster deployment: |
| 79 | + |
| 80 | +* ZTP Installation: Uncomment the dedicated resource URL for `ztp-installation`. |
| 81 | + |
| 82 | +Optional components:: |
| 83 | +These components should be enabled based on specific workload and storage requirements: |
| 84 | + |
| 85 | +* LocalStorage Operator (LSO): Enable if you plan to use LSO as your storage backend. |
| 86 | +* Red Hat OpenShift Data Foundation (ODF): Enable if you plan to use ODF as your storage backend. Note: ODF currently requires a Namespace defined in the GitOps component. |
| 87 | +* Cluster Logging Operator (Logging): Enable if you require the cluster logging operator for log aggregation. |
| 88 | + |
| 89 | +Environment Customization (Kustomize Patches):: |
| 90 | +The `patches:` section allows you to apply modifications to the base configurations sourced from the telco-reference without directly editing those upstream files. This is vital for maintaining upstream compatibility. |
| 91 | +Patches are defined using a target specification `group`, `version`, `kind`, or `name` and the specific patch content. |
| 92 | + |
| 93 | +[id="example-patch"] |
| 94 | +=== Examples |
| 95 | + |
| 96 | +The following examples illustrate how to customize operator configurations for specific environments, such as disconnected setups or storage class adjustments. |
| 97 | + |
| 98 | +[source,yaml] |
| 99 | +---- |
| 100 | +patches: |
| 101 | + # Example: Configure TALM operator for disconnected environments |
| 102 | + - target: |
| 103 | + group: operators.coreos.com |
| 104 | + version: v1alpha1 |
| 105 | + kind: Subscription |
| 106 | + name: openshift-topology-aware-lifecycle-manager-subscription |
| 107 | + patch: |- |
| 108 | + - op: replace |
| 109 | + path: "/spec/source" |
| 110 | + value: "redhat-operators-disconnected" |
| 111 | +
|
| 112 | + # Example: Customize storage classes for ODF |
| 113 | + - target: |
| 114 | + group: ocs.openshift.io |
| 115 | + version: v1 |
| 116 | + kind: StorageCluster |
| 117 | + name: ocs-storagecluster |
| 118 | + patch: |- |
| 119 | + - op: replace |
| 120 | + path: "/spec/storageDeviceSets/0/dataPVCTemplate/spec/storageClassName" |
| 121 | + value: "localblock" |
| 122 | +---- |
| 123 | + |
| 124 | +For more examples and detailed configurations, see link:https://github.com/openshift-kni/telco-reference/tree/main/telco-hub/configuration/example-overlays-config[telco-reference example overlays]. |
0 commit comments