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

Controller Classes

원문 보기 위키 갱신

Controller class는 배포 시 설정하는 속성으로, 여러 컨트롤러가 워크로드 그룹에서 함께 동작할 수 있게 해줘요. 어떤 secretStore를 어떤 컨트롤러에 배정할지를 분리해서 동작해요. 컨트롤러가 하나뿐이라면 별도 설정이 필요 없어요.

Note: 이 기능은 실험적(experimental)이고 충분히 테스트되지 않았어요.

출처: External Secrets

본문

Controller class를 사용하면 SecretStore가 특정 ESO 컨트롤러에 묶이도록 지정할 수 있어요. 여러 컨트롤러 인스턴스를 띄워 워크로드를 나눠 처리할 때 유용해요.

Setting up Controller Class

helm install custom-external-secrets external-secrets/external-secrets --set controllerClass=custom
apiVersion: external-secrets.io/v1
kind: SecretStore
metadata:
  name: controller-custom-example
spec:
  #define the controller label to the matching value of the deployment
  controller: custom
  #configure provider the same way
  provider:
    vault:
      server: "http://vault.default:8200"
      path: "secret"
      version: "v2"
      auth:
        kubernetes:
          mountPath: "kubernetes"
          role: "demo-role"

특정 class로 컨트롤러를 배포하려면 controller class를 지정해서 helm charts를 설치하고, 적절한 spec.controller 값으로 SecretStore를 만들면 돼요.

이제 이 secret store에 묶인 ExternalSecret은 controllerClass가 custom인 운영자에 의해 처리돼요.

Note: spec.controller가 설정되지 않은 SecretStore는 어떤 운영자든 그들의 controllerClasses와 관계없이 유효한 것으로 간주돼요.

더 알아보기 (Learn more)