본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

게이트웨이 구성 검증

원문 보기 위키 갱신

게이트웨이 구성 검증 (deck gateway validate)

deck gateway validate 명령은 선언형 상태 파일을 읽어서 YAML/JSON 파싱 문제나 깨진 참조 관계가 없는지 확인해 줘요. Kong Gateway의 Admin API와 통신하는 온라인 검증까지 수행해서 중요한 오류를 잡아 주지만, 실제로 리소스를 만들지는 않아요. 상태 파일이 크다면 --online-entities-list 플래그로 검증할 엔티티를 지정해 시간을 줄일 수 있고, 진단 코드를 경고나 오류로 취급하는 옵션도 제공해요

출처: 문서

본문

deck gateway validate 명령은 하나 이상의 선언형 상태 파일을 읽어 유효성을 검사해요. YAML/JSON 파싱 문제를 보고하고, 외래 관계를 확인하며, 깨진 관계나 누락된 링크가 있으면 알려줘요.

이 명령은 Kong Gateway와 통신하면서 Admin API 기준으로도 유효성을 검사해요. 검증 시간은 늘어나지만 중요한 오류를 잡아낼 수 있어요. Kong Gateway에는 어떤 리소스도 생성되지 않아요.

오프라인 검증이 필요하면 deck file validate 문서를 참고하세요.

특정 엔티티 검증하기

상태 파일이 크면 deck gateway validate 명령이 모든 엔티티를 검사하는 데 오랜 시간이 걸릴 수 있어요.

시간을 줄이려면 --online-entities-list 플래그를 사용해 검증할 특정 엔티티를 지정할 수 있어요. 예를 들어:

deck gateway validate --online-entities-list Plugins kong.yaml

명령 사용법

Usage:
  deck gateway validate [flags] [kong-state-files...]

Flags:
  -W, --errors-as-warnings string      Treat the given comma-separated diagnostic codes as warnings.
  -h, --help                           help for validate
      --konnect-compatibility          validate that the state file(s) are ready to be deployed to Konnect
      --online-entities-list strings   indicate the list of entities that should be validated online validation.
      --parallelism int                Maximum number of concurrent requests to Kong. (default 10)
      --rbac-resources-only            indicate that the state file(s) contains RBAC resources only (Kong Enterprise only).
  -E, --warnings-as-errors string      Treat the given comma-separated diagnostic codes as errors.
  -w, --workspace string               validate configuration of a specific workspace (Kong Enterprise only).
                                       This takes precedence over _workspace fields in state files.

관련 리소스

더 알아보기 (Learn more)

  • Kong Gateway 없이 오프라인으로 상태 파일을 검증하는 방법을 소개해요 — deck file validate
  • deck gateway에서 사용할 수 있는 다른 명령어들을 한눈에 살펴봐요 — deck gateway commands