OpenShift 클러스터에 배포되거나 배포할 API 서비스는 3scale로 검색할 수 있습니다. 이를 위해 다음 메타데이터를 포함하도록 OpenShift Service Object YAML 정의를 구성합니다.
metadata:
labels:
discovery.3scale.net: "true"
annotations:
discovery.3scale.net/scheme: <http | https>
discovery.3scale.net/port: '<port number of the service within the cluster>'
discovery.3scale.net/path: <relative base path of the API backend from the root>
discovery.3scale.net/description-path: <relative or absolute path to the Open API Specification for the API>
metadata:
labels:
discovery.3scale.net: "true"
annotations:
discovery.3scale.net/scheme: <http | https>
discovery.3scale.net/port: '<port number of the service within the cluster>'
discovery.3scale.net/path: <relative base path of the API backend from the root>
discovery.3scale.net/description-path: <relative or absolute path to the Open API Specification for the API>
Copy to ClipboardCopied!Toggle word wrapToggle overflow
설명된 메타데이터에서 포트 및 스키마 는 필수 주석입니다.
또한 Service Discovery는 Content-Type 헤더가 다음 값 중 하나인 경우에만 사양을 가져옵니다.
application/swagger+json
application/vnd.oai.openapi+json
application/json
참고
사용자 또는 서비스 계정(구성된 인증 모드에 따라)에 네임스페이스 및 서비스를 볼 수 있는 적절한 권한이 있는지 확인합니다.