86 lines
1.9 KiB
YAML
86 lines
1.9 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: oauth
|
||
|
namespace: ecosystem
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: oauth
|
||
|
framework: laravel
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: oauth
|
||
|
framework: laravel
|
||
|
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: oauth-http
|
||
|
image: registry.daisukide.com:2083/ecosystem/oauth:latest
|
||
|
imagePullPolicy: Always
|
||
|
resources:
|
||
|
limits:
|
||
|
memory: "512Mi"
|
||
|
cpu: "500m"
|
||
|
ports:
|
||
|
- containerPort: 8000
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: oauth-env
|
||
|
env:
|
||
|
- name: APP_KEY
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: oauth-secret
|
||
|
key: application-key
|
||
|
- name: DB_PASSWORD
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: oauth-secret
|
||
|
key: database-password
|
||
|
- name: REDIS_PASSWORD
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: oauth-secret
|
||
|
key: redis-password
|
||
|
volumeMounts:
|
||
|
- name: oauth-storage
|
||
|
mountPath: /app/storage
|
||
|
imagePullSecrets:
|
||
|
- name: registry
|
||
|
volumes:
|
||
|
- name: oauth-storage
|
||
|
persistentVolumeClaim:
|
||
|
claimName: oauth-storage-pvc
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: oauth
|
||
|
namespace: ecosystem
|
||
|
spec:
|
||
|
selector:
|
||
|
app: oauth
|
||
|
framework: laravel
|
||
|
ports:
|
||
|
- port: 80
|
||
|
targetPort: 8000
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: oauth-env
|
||
|
namespace: ecosystem
|
||
|
labels:
|
||
|
env: prod
|
||
|
app: oauth
|
||
|
data:
|
||
|
APP_ENV: "production"
|
||
|
DB_USERNAME: "ecosystem_oauth"
|
||
|
DB_CONNECTION: "mysql"
|
||
|
DB_HOST: "mariadb-mariadb-galera.databases.svc.cluster.local"
|
||
|
DB_PORT: "3306"
|
||
|
DB_DATABASE: "ecosystem_oauth"
|
||
|
REDIS_HOST: "redis.databases.svc.cluster.local"
|