2023-11-01 10:01:10 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2023-11-01 10:32:54 +00:00
|
|
|
name: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
namespace: ecosystem
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2023-11-01 10:32:54 +00:00
|
|
|
app: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
framework: laravel
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2023-11-01 10:32:54 +00:00
|
|
|
app: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
framework: laravel
|
|
|
|
|
|
|
|
spec:
|
|
|
|
containers:
|
2023-11-01 10:32:54 +00:00
|
|
|
- name: your-name-http
|
2023-11-01 10:01:10 +00:00
|
|
|
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:
|
2023-11-01 10:32:54 +00:00
|
|
|
- name: your-name-storage
|
2023-11-01 10:01:10 +00:00
|
|
|
mountPath: /app/storage
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: registry
|
|
|
|
volumes:
|
2023-11-01 10:32:54 +00:00
|
|
|
- name: your-name-storage
|
2023-11-01 10:01:10 +00:00
|
|
|
persistentVolumeClaim:
|
2023-11-01 10:32:54 +00:00
|
|
|
claimName: your-name-storage-pvc
|
2023-11-01 10:01:10 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2023-11-01 10:32:54 +00:00
|
|
|
name: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
namespace: ecosystem
|
|
|
|
spec:
|
|
|
|
selector:
|
2023-11-01 10:32:54 +00:00
|
|
|
app: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
framework: laravel
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: 8000
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2023-11-01 10:32:54 +00:00
|
|
|
name: your-name-env
|
2023-11-01 10:01:10 +00:00
|
|
|
namespace: ecosystem
|
|
|
|
labels:
|
|
|
|
env: prod
|
2023-11-01 10:32:54 +00:00
|
|
|
app: your-name
|
2023-11-01 10:01:10 +00:00
|
|
|
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"
|