mirror of
https://github.com/hoshikawa2/nemo_guardrails_ci_cd.git
synced 2026-07-09 16:24:20 +00:00
first commit
This commit is contained in:
39
k8s/deployment.yaml
Normal file
39
k8s/deployment.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: guardrails-api
|
||||
namespace: guardrails
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: guardrails-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: guardrails-api
|
||||
spec:
|
||||
containers:
|
||||
- name: guardrails-api
|
||||
image: REPLACE_IMAGE_URI
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: OPENAI_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: guardrails-secrets
|
||||
key: OPENAI_API_KEY
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
5
k8s/kustomization.yaml
Normal file
5
k8s/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- secret.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
4
k8s/namespace.yaml
Normal file
4
k8s/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: guardrails
|
||||
8
k8s/secret.yaml
Normal file
8
k8s/secret.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: guardrails-secrets
|
||||
namespace: guardrails
|
||||
type: Opaque
|
||||
stringData:
|
||||
OPENAI_API_KEY: sk-fake
|
||||
13
k8s/service.yaml
Normal file
13
k8s/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: guardrails-service
|
||||
namespace: guardrails
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: guardrails-api
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
Reference in New Issue
Block a user