4.8. 설치 CR을 검증하여 GitOps ZTP 문제 해결
ArgoCD 파이프라인은 site Config
및 PolicyGenerator
또는 PolicyGentemplate
사용자 정의 리소스(CR)를 사용하여 클러스터 구성 CR 및 RHACM(Red Hat Advanced Cluster Management) 정책을 생성합니다. 이 프로세스 중에 발생할 수 있는 문제를 해결하려면 다음 단계를 사용하십시오.
사전 요구 사항
-
OpenShift CLI(
oc
)가 설치되어 있습니다. -
cluster-admin
권한이 있는 사용자로 hub 클러스터에 로그인했습니다.
프로세스
다음 명령을 사용하여 설치 CR이 생성되었는지 확인합니다.
$ oc get AgentClusterInstall -n <cluster_name>
오브젝트가 반환되지 않은 경우 다음 단계를 사용하여
SiteConfig
파일에서 설치 CR로 ArgoCD 파이프라인 흐름의 문제를 해결합니다.hub 클러스터의
SiteConfig
CR을 사용하여ManagedCluster
CR이 생성되었는지 확인합니다.$ oc get managedcluster
ManagedCluster
가 없는 경우클러스터
애플리케이션이 Git 리포지토리의 파일을 hub 클러스터와 동기화하지 않았는지 확인합니다.$ oc get applications.argoproj.io -n openshift-gitops clusters -o yaml
관리 클러스터의 오류 로그를 식별하려면
status.operationState.syncResult.resources
필드를 검사합니다. 예를 들어, siteConfig CR의
않은 값이 할당되면 다음과 유사한 오류가 생성됩니다.extraManifestPath
에 유효하지syncResult: resources: - group: ran.openshift.io kind: SiteConfig message: The Kubernetes API could not find ran.openshift.io/SiteConfig for requested resource spoke-sno/spoke-sno. Make sure the "SiteConfig" CRD is installed on the destination cluster
자세한 site
Config 오류를
보려면 다음 단계를 완료하십시오.- Argo CD 대시보드에서 Argo CD가 동기화하려는 SiteConfig 리소스를 클릭합니다.
DESIRED MANIFEST 탭을 확인하여
siteConfigError
필드를 찾습니다.siteConfigError: >- Error: could not build the entire SiteConfig defined by /tmp/kust-plugin-config-1081291903: stat sno-extra-manifest: no such file or directory
Status.Sync
필드를 확인합니다. 로그 오류가 있는 경우Status.Sync
필드에 알 수없는
오류가 표시될 수 있습니다.Status: Sync: Compared To: Destination: Namespace: clusters-sub Server: https://kubernetes.default.svc Source: Path: sites-config Repo URL: https://git.com/ran-sites/siteconfigs/.git Target Revision: master Status: Unknown