Skip to content

Commit

Permalink
open webuiを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
piny940 committed Jan 29, 2025
1 parent 6e43a8d commit dba302f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 13 deletions.
14 changes: 14 additions & 0 deletions kubernetes/apps/open-webui/base/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: open-webui-secret
spec:
secretStoreRef:
name: vault-secret-store
kind: ClusterSecretStore
refreshInterval: 1m
data:
- secretKey: OPENAI_API_KEY
remoteRef:
key: open-webui
property: OPENAI_API_KEY
54 changes: 54 additions & 0 deletions kubernetes/apps/open-webui/base/helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: open-webui
spec:
interval: 24h
url: https://helm.openwebui.com/
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: open-webui
spec:
interval: 10m
chart:
spec:
chart: open-webui
version: 5.4.0
sourceRef:
kind: HelmRepository
name: open-webui
values:
livenessProbe:
httpGet:
path: /health
port: http
failureThreshold: 1
periodSeconds: 10
readinessProbe:
httpGet:
path: /health/db
port: http
failureThreshold: 1
periodSeconds: 10
startupProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 5
failureThreshold: 20
persistence:
enabled: true
existingClaim: open-webui-pvc
nodeSelector:
node-role.kubernetes.io/control-plane: ""
extraEnvVars:
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: open-webui-secret
key: OPENAI_API_KEY
test:
enable: true
8 changes: 4 additions & 4 deletions kubernetes/apps/open-webui/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
# configMapGenerator:
# - name: open-webui-conf
# literals: []
resources:
- external-secret.yaml
- helm.yaml
- pvc.yaml
11 changes: 11 additions & 0 deletions kubernetes/apps/open-webui/base/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: open-webui-pvc
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
4 changes: 0 additions & 4 deletions kubernetes/apps/open-webui/production/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ labels:
- pairs:
env: production
includeSelectors: true
# configMapGenerator:
# - name: open-webui-conf
# behavior: merge
# literals: []
5 changes: 0 additions & 5 deletions kubernetes/apps/open-webui/staging/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: open-webui
namePrefix: stg-
resources:
- ../base
labels:
- pairs:
env: staging
includeSelectors: true
# configMapGenerator:
# - name: open-webui-conf
# behavior: merge
# literals: []

0 comments on commit dba302f

Please sign in to comment.