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

Operator configuration

원문 보기 위키 갱신

출처: 문서

본문

오퍼레이터 구성

설치 시 제공하는 Helm values를 사용하면 오퍼레이터 자체의 일반 옵션을 구성할 수 있어요: helm install opensearch-operator opensearch-operator/opensearch-operator -f values.yaml.

지원되는 모든 값의 목록은 기본 차트인 values.yaml을 참고하세요. 다음은 중요한 구성 옵션 몇 가지예요:

manager:
  # Log level of the operator. Possible values: debug, info, warn, error
  loglevel: info

  # If specified, the operator will be restricted to watch objects only in the desired namespace. The default is to watch all namespaces.
  # To watch multiple namespaces, either separate their names using commas or define them as a list.
  # Examples:
  # watchNamespaces: 'ns1,ns2'
  # watchNamespace: [ns1, ns2]
  watchNamespace:

  # Configure extra environment variables for the operator. You can also pull them from secrets or ConfigMaps.
  extraEnv: []
  #  - name: MY_ENV
  #    value: somevalue

{% include copy.html %}

오퍼레이터는 어드미션 컨트롤러 웹훅을 사용해서 OpenSearch 커스텀 리소스 정의(CRD)를 검증해요. {: .note}

pprof 엔드포인트

메모리 문제를 진단하려면 values.yaml에 다음 내용을 추가해서 표준 Go pprof 엔드포인트를 활성화할 수 있어요:

manager:
  pprofEndpointsEnabled: true

{% include copy.html %}

보안상의 이유로 이 엔드포인트들은 파드 내부의 localhost에만 노출돼요. 엔드포인트에 접근하려면 포트 포워딩을 사용하세요:

kubectl port-forward deployment/opensearch-operator-controller-manager 6060

{% include copy.html %}

그다음 다른 터미널에서 Go pprof 도구를 사용하세요:

go tool pprof http://localhost:6060/debug/pprof/heap

{% include copy.html %}

커스텀 오퍼레이터 통신 URL

operatorClusterURL 필드를 설정하면 오퍼레이터가 OpenSearch와 통신할 때 커스텀 URL을 사용하도록 구성할 수 있어요:

spec:
  general:
    serviceName: my-cluster
    version: "3.0.0"
    httpPort: 9200
    vendor: "opensearch"
    operatorClusterURL: "opensearch.example.com"  # Optional: custom FQDN for operator communication

{% include copy.html %}

특정 FQDN에 대해 유효한 외부 인증서(예: cert-manager에서 발급한 인증서)가 있을 때 이 구성을 사용하세요. 오퍼레이터는 기본 내부 Kubernetes DNS 이름 대신 이 커스텀 URL을 사용하기 때문에, 외부 접근과 오퍼레이터 통신에 동일한 인증서를 사용할 수 있어요.

더 알아보기 (Learn more)