Google Vertex
| 필수 Secret | 오버레이 |
|---|---|
GCP service-account Secret |
values-google-vertex.yaml |
언제 사용하나요?¶
GCP 프로젝트에서 Vertex AI API를 활성화하세요. 이 예제는 Vertex AI User 역할이 있는 GCP 서비스 계정의 JSON 파일을 마운트합니다.
이 예제는 글로벌 엔드포인트에서 google/gemini-3.8-flash를 사용합니다.
Vertex에서 지원이 종료된 Gemini 2.5 Flash를 대체합니다.
리전이나 모델을 바꾸기 전에 모델 및 리전 지원 범위를 확인하세요.
이 예제는 Gemini Developer API를 사용하지 않습니다.
설치¶
kubectl create namespace hermes-agent
kubectl create secret generic vertex-sa --namespace hermes-agent \
--from-file=sa.json=/path/to/sa.json
helm upgrade --install hermes-agent ./charts/hermes-agent \
--namespace hermes-agent --create-namespace \
-f charts/hermes-agent/values-google-vertex.yaml \
--set-string config.vertex.project_id='<your-gcp-project>' --wait
네임스페이스나 Secret이 이미 있으면 기존 리소스를 사용하세요. JSON 키는 Helm 값에 넣거나 커밋하지 마세요. 이 예제는 API 키 대신 파일을 마운트합니다.
배포 전 조정¶
기존 릴리스에서는 기본값인 bootstrap.overwrite: false가 PVC의
config.yaml을 보존합니다. Hermes에서 모델을 바꾸거나 해당 파일을 수정하세요.
오버레이만 업그레이드하면 저장된 모델은 바뀌지 않습니다.
검증¶
CI는 클라우드 계정 없이 이 오버레이를 검증합니다. 오버레이, Hermes 이미지, 하니스가
바뀌면 차트를 렌더링하고, 네트워크와 자격증명이 없는 상태에서 고정된 Hermes 이미지를
로컬 mock에 연결해 Vertex 프로젝트, 리전, google/gemini-3.8-flash 요청 경로와 고정된
응답을 확인합니다. 경로나 모델이 틀리면 실패합니다. 정확한 검사와 로컬 실행 방법은
provider-contract를 참고하세요.
이 검사는 mock입니다. IAM, 쿼터, 실제 Vertex 추론은 검증하지 않고, Secret은 Pod에서 실행하지 않고 마운트된 파일로만 확인합니다. 설치한 뒤에는 본인 프로젝트로 채팅을 한 번 실행해 보세요.
전체 오버레이¶
# values-google-vertex.yaml
#
# Hermes Agent using Google Vertex AI as the model provider (Gemini models via
# Vertex's OpenAI-compatible endpoint). Requires hermes-agent >= v2026.7.1.
#
# Vertex has NO static API key: every request needs a short-lived OAuth2 access
# token, which Hermes mints and auto-refreshes from a service-account JSON (or
# Application Default Credentials). So unlike the other provider examples, the
# credential here is a FILE mounted into the pod, not an env var:
#
# 1. Create a GCP service account with the "Vertex AI User" role and download
# its JSON key.
# 2. Put the JSON into a Kubernetes Secret:
# kubectl create secret generic vertex-sa \
# --namespace hermes-agent \
# --from-file=sa.json=/path/to/key.json
# 3. Install:
# helm upgrade --install hermes-agent ./charts/hermes-agent \
# --namespace hermes-agent --create-namespace \
# -f charts/hermes-agent/values-google-vertex.yaml \
# --set-string config.vertex.project_id='<your-gcp-project>' --wait
config:
model:
provider: vertex
# Gemini 2.5 Flash has retired on Vertex. Check availability for your endpoint.
default: google/gemini-3.8-flash
# Non-secret Vertex settings live in config.yaml; only the credential file
# path goes through the environment (VERTEX_CREDENTIALS_PATH below).
vertex:
project_id: "REPLACE_ME_GCP_PROJECT"
# "global" uses the global endpoint. Before selecting a region, check that
# the model and your consumption option are supported there.
region: "global"
terminal:
backend: local
env:
# No Vertex API key exists: tokens are minted from the mounted SA JSON.
# This only overrides the chart's OpenAI placeholder.
OPENAI_API_KEY: "unused"
extraEnv:
# Path (inside the container) to the service-account JSON mounted below.
# Omit it to fall back to ADC (GOOGLE_APPLICATION_CREDENTIALS / metadata
# server, e.g. GKE Workload Identity).
- name: VERTEX_CREDENTIALS_PATH
value: /var/run/secrets/vertex/sa.json
# The vertex provider needs `google-auth`, which upstream ships as an opt-in
# extra handled by its lazy-install mechanism: it is NOT baked into the
# image, and the image disables lazy installs by default. Re-enable them so
# the first Vertex call can install it into HERMES_LAZY_INSTALL_TARGET on
# the persistent volume (one-time, needs network egress; survives restarts).
- name: HERMES_DISABLE_LAZY_INSTALLS
value: "0"
# Mount the service-account Secret created in step 2.
extraVolumes:
- name: vertex-sa
secret:
secretName: vertex-sa
extraVolumeMounts:
- name: vertex-sa
mountPath: /var/run/secrets/vertex
readOnly: true
# NOTE: as of a recent Hermes security hardening, VERTEX_CREDENTIALS_PATH and
# GOOGLE_APPLICATION_CREDENTIALS are stripped from the environment of
# subprocesses the agent spawns (terminal, execute_code, browser,
# computer_use): they still work for the model's own API calls above. If a
# tool call in your session needs Vertex credentials too (e.g. shelling out to
# `gcloud`), re-allow it explicitly:
#
# config:
# tools:
# env_passthrough: ["VERTEX_CREDENTIALS_PATH"]