Repository for dip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

9.1 KiB

Lakekeeper 배포

1. 배포 방법

1) 배포시 주의 사항

  • Lakekeeper는 Rust 기반의 Apache Iceberg REST Catalog 서비스입니다.
  • OpenFGA를 사용한 인증/권한 관리가 가능하며, 내장 OpenFGA를 사용할 수 있습니다.
  • OIDC 인증을 사용하는 경우 배포전 keycloak 설정을 선행해야 합니다.

2) 배포 방법

git clone https://github.com/paasup/dip-catalog.git
cd charts/lakekeeper
helm upgrade lakekeeper ./ -f custom-values.yaml --install -n lakekeeper --create-namespace

2. custom-values.yaml 예시

다음은 배포 시 사용할 수 있는 custom-values.yaml 파일의 예시입니다:

catalog:
  resources: {}
  ingress:
    enabled: true
    annotations:
      cert-manager.io/issuer: root-ca-issuer
      cert-manager.io/duration: 8760h
      cert-manager.io/renew-before: 720h
      konghq.com/https-redirect-status-code: '301'
      konghq.com/protocols: https

    host: "lakekeeper.example.org"
    ingressClassName: "kong"
    tls:
      enabled: true
      secretName: "lakekeeper-tls"

  # keycloak 사설 인증서 사용 시 설정
  extraEnv:
  - name: SSL_CERT_FILE
    value: "/tmp/ca.crt"
  extraVolumeMounts:
  - name: keycloak-tls
    mountPath: "/tmp/ca.crt"
    subPath: ca.crt
    readOnly: true
  extraVolumes:
  - name: keycloak-tls
    secret:
      secretName: root-ca-secret

# lakekeeper DB
postgresql:
  storage:
    className:
    requestedSize: 5Gi
  resources: {}

# OIDC 인증
auth:
 oauth2:
    providerUri: "https://keycloak.example.org/realms/paasup"
    audience: "lakekeeper"
    ui:
      clientID: "lakekeeper"
      scopes: "lakekeeper"

# 권한 관리
authz:
  backend: "openfga"
  openfga:
    apiKey: "your-api-key"  # openfga.authn.preshared.key에 정의된 값가 동일하게 설정.
    
internalOpenFGA: true
openfga:
  # 테스트 환경 비활성화, authn을 oidc 타입으로 실행하기 위해서는 playground에서는 불가.
  playground:
    enabled: true
  authn:
    method: "preshared"
    preshared:
      # openssl rand -base64 32
      keys: ["your-api-key"]
  postgresql:
    primary:
      resources: {}
      persistence:
        storageClass: ""
        size: 8Gi

3. custom-values.yaml 설정 설명

1) 카탈로그 설정

Name 설명 기본값
catalog.resources CPU/메모리 리소스 설정 {}

2) Ingress 설정

Name 설명 기본값
catalog.ingress.enabled Ingress 활성화 여부 true
catalog.ingress.annotations Ingress 어노테이션 참고 예시
catalog.ingress.host Ingress 호스트명 lakekeeper.example.org
catalog.ingress.ingressClassName Ingress 클래스 kong
catalog.ingress.tls.enabled TLS 활성화 여부 true
catalog.ingress.tls.secretName TLS 시크릿 이름 lakekeeper-tls

Ingress 어노테이션 설명

annotations:
  cert-manager.io/issuer: root-ca-issuer              # cert-manager 발급자
  cert-manager.io/duration: 8760h                     # 인증서 유효기간 (1년)
  cert-manager.io/renew-before: 720h                  # 갱신 시점 (30일 전)
  konghq.com/https-redirect-status-code: '301'        # HTTPS 리다이렉트 상태 코드
  konghq.com/protocols: https                         # Kong 프로토콜 설정

3) 사설 인증서 설정 (Keycloak 연동 시)

Name 설명 기본값
catalog.extraEnv 추가 환경 변수 (SSL 인증서 경로 설정) 참고 예시
catalog.extraVolumeMounts 추가 볼륨 마운트 (인증서 파일 마운트) 참고 예시
catalog.extraVolumes 추가 볼륨 (인증서 시크릿) 참고 예시
extraEnv:
- name: SSL_CERT_FILE
  value: "/tmp/ca.crt"
extraVolumeMounts:
- name: keycloak-tls
  mountPath: "/tmp/ca.crt"
  subPath: ca.crt
  readOnly: true
extraVolumes:
- name: keycloak-tls
  secret:
    secretName: root-ca-secret

4) PostgreSQL 데이터베이스 설정

Name 설명 기본값
postgresql.storage.className 스토리지 클래스 ""
postgresql.storage.requestedSize PostgreSQL 스토리지 크기 5Gi
postgresql.resources PostgreSQL 리소스 설정 {}

5) OIDC 인증 설정

Name 설명 기본값
auth.oauth2.providerUri OIDC Provider URI (Keycloak Realm) https://keycloak.example.org/realms/paasup
auth.oauth2.audience 예상되는 Audience (일반적으로 Client ID) lakekeeper
auth.oauth2.ui.clientID UI용 클라이언트 ID lakekeeper
auth.oauth2.ui.scopes 요청할 스코프 lakekeeper

6) 권한 관리 설정 (OpenFGA)

Name 설명 기본값
authz.backend 권한 관리 백엔드 ("openfga") openfga
authz.openfga.apiKey OpenFGA API 키 (사전 공유 키 인증) 예시 키

7) 내장 OpenFGA 설정

Name 설명 기본값
internalOpenFGA 내장 OpenFGA 배포 여부 true
openfga.playground.enabled OpenFGA Playground 활성화 true
openfga.authn.method 인증 방법 preshared
openfga.authn.preshared.keys 사전 공유 키 목록 예시 키

8) OpenFGA PostgreSQL 설정

Name 설명 기본값
openfga.postgresql.primary.resources OpenFGA PostgreSQL 리소스 설정 {}
openfga.postgresql.primary.persistence.storageClass 스토리지 클래스 ""
openfga.postgresql.primary.persistence.size 스토리지 크기 8Gi

4. 인증 설정 상세

1) Keycloak OIDC 인증 설정

auth:
  oauth2:
    providerUri: "https://keycloak.example.org/realms/paasup"
    audience: "lakekeeper"
    ui:
      clientID: "lakekeeper"
      scopes: "lakekeeper"
  • providerUri: Keycloak의 Realm URL
  • audience: Lakekeeper 클라이언트 ID
  • ui.clientID: UI에서 사용할 클라이언트 ID
  • ui.scopes: 요청할 OAuth 스코프

2) 사설 인증서 처리

Keycloak이 사설 인증서를 사용하는 경우 다음 설정이 필요합니다:

catalog:
  extraEnv:
  - name: SSL_CERT_FILE
    value: "/tmp/ca.crt"
  extraVolumeMounts:
  - name: keycloak-tls
    mountPath: "/tmp/ca.crt"
    subPath: ca.crt
    readOnly: true
  extraVolumes:
  - name: keycloak-tls
    secret:
      secretName: root-ca-secret

5. OpenFGA 권한 관리

1) 내장 OpenFGA 사용

authz:
  backend: "openfga"
  openfga:
    apiKey: "uNGpW1LOA48HLVh9OVLTAprgQAPAu5hyxyBZvW55M0U="

internalOpenFGA: true
openfga:
  authn:
    method: "preshared"
    preshared:
      keys: ["uNGpW1LOA48HLVh9OVLTAprgQAPAu5hyxyBZvW55M0U="]

2) API 키 생성

OpenFGA API 키는 다음 명령으로 생성할 수 있습니다:

openssl rand -base64 32