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

구성 파일 형식 변환

원문 보기 위키 갱신

구성 파일 형식 변환 (deck file convert)

deck file convert 명령은 decK 구성 파일을 한 형식에서 호환되는 다른 형식으로 바꿔주는 도구예요. 예를 들어 kong-gateway-2.x용 구성 파일을 kong-gateway-3.x 형식으로 손쉽게 변환할 수 있어요. 이 문서에서는 버전 구간별로 적용되는 변환 규칙을 표로 정리해서 보여줘요

출처: 문서

본문

deck file convert --input-file kong2x.yaml --from kong-gateway-2.x --to kong-gateway-3.x

적용되는 변환

다음 표는 deck file convert가 수행하는 변환을 정리한 거예요:

kong-gateway-2.x에서 kong-gateway-3.x로

적용되는 변환: |

  • 정규식처럼 보이는 모든 경로 앞에 ~를 붙여요
  • Rate Limiting Advanced 플러그인에서 누락된 namespace 필드의 기본값을 생성해요
  • decK 파일의 _format_version을 1.1에서 3.0으로 변환해요 How-to 가이드: --

2.8에서 3.4로 v1.47.0+

적용되는 변환: |

  • 정규식처럼 보이는 모든 경로 앞에 ~를 붙여요
  • Rate Limiting Advanced 플러그인에서 누락된 namespace 필드의 기본값을 생성해요
  • decK 파일의 _format_version을 1.1에서 3.0으로 변환해요
  • ACL, Bot Detection, IP Restriction, Canary 플러그인:
    • config.blacklist를 config.deny로 변환해요
    • config.whitelist를 config.allow로 변환해요
  • AWS Lambda 플러그인:
    • 지원이 중단된 config.proxy_scheme 파라미터를 제거해요
  • Pre-Function 및 Post-Function 플러그인:

3.4에서 3.10으로 v1.51.0+

적용되는 변환: |

  • Redis 구성을 사용하는 모든 플러그인:
    • redis.cluster_addresses를 redis.cluster_nodes로 변환해요
    • redis.sentinel_addresses를 redis.sentinel_nodes로 변환해요
  • AI 플러그인:
    • model.options.upstream_path를 model.options.upstream_url로 변환해요
  • AI Rate Limiting Advanced 플러그인:

3.10에서 3.14로 v1.57.3+

적용되는 변환: |

  • 명시적인 protocols 필드가 없는 라우트: 3.10 기본값을 유지하기 위해 protocols를 ["http", "https"]로 설정해요 (3.14에서는 기본값이 ["https"]만 포함하도록 변경돼요)
  • 명시적인 tls_verify 필드 없이 보안 프로토콜(https, tls, grpcs, wss)을 사용하는 서비스: 3.10 기본값을 유지하기 위해 tls_verify를 false로 설정해요 (3.14에서는 기본적으로 TLS 인증서 검증이 활성화돼요)
  • 명시적인 hide_credentials 필드가 없는 Key Auth, Key Auth Encrypted, Basic Auth, HMAC Auth, LDAP Auth, OAuth2, OAuth2 Introspection, Vault Auth, LDAP Auth Advanced 플러그인: 3.10 기본값을 유지하기 위해 hide_credentials를 false로 설정해요 (3.14에서는 기본값이 true로 변경돼요)
  • TLS를 통해 외부 서비스에 연결하는 플러그인(OpenID Connect, AI 플러그인, Kafka 등) 중 명시적인 TLS 검증 필드(예: ssl_verify, tls_verify, https_verify)가 없는 플러그인: 3.10 기본값을 유지하기 위해 해당 필드를 false로 설정해요 (3.14에서는 기본적으로 TLS 인증서 검증이 활성화돼요). 플러그인과 변경된 필드의 전체 목록은 Gateway 3.14의 주요 변경 사항을 확인하세요. How-to 가이드: Gateway 엔티티 구성을 3.10 LTS에서 3.14 LTS로 변환하기

명령어 사용법

Usage:
  deck file convert [flags]

Flags:
  -W, --errors-as-warnings string   Treat the given comma-separated diagnostic codes as warnings.
      --format string               output file format: json or yaml. (default "yaml")
      --from string                 format of the source file, allowed formats: [kong-gateway kong-gateway-2.x 2.8 3.4 3.10]
  -h, --help                        help for convert
      --input-file -                configuration file to be converted. Use - to read from stdin. (default "-")
      --no-expand-env-vars          do not expand ${{ env "DECK_VAR_NAME" }} placeholders in the output.
  -o, --output-file -               file to write configuration to after conversion. Use - to write to stdout. (default "-")
      --to string                   desired format of the output, allowed formats: [konnect kong-gateway-3.x 3.4 3.10 3.14]
  -E, --warnings-as-errors string   Treat the given comma-separated diagnostic codes as errors.
      --yes yes                     assume yes to prompts and run non-interactively.

관련 리소스

더 알아보기 (Learn more)