This commit is contained in:
iVamp 2023-11-01 18:32:54 +08:00
parent 76981f6166
commit 971c649f31
2 changed files with 13 additions and 13 deletions

View File

@ -44,8 +44,8 @@ deploy_to_cluster:
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi fi
- kubectl get pods - kubectl get pods
- kubectl apply -f deploy/manifest.yaml # - kubectl apply -f deploy/manifest.yaml
- | - |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
kubectl -n ecosystem rollout restart deployment oauth # kubectl -n ecosystem rollout restart deployment oauth
fi fi

View File

@ -1,22 +1,22 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: oauth name: your-name
namespace: ecosystem namespace: ecosystem
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: oauth app: your-name
framework: laravel framework: laravel
template: template:
metadata: metadata:
labels: labels:
app: oauth app: your-name
framework: laravel framework: laravel
spec: spec:
containers: containers:
- name: oauth-http - name: your-name-http
image: registry.daisukide.com:2083/ecosystem/oauth:latest image: registry.daisukide.com:2083/ecosystem/oauth:latest
imagePullPolicy: Always imagePullPolicy: Always
resources: resources:
@ -45,23 +45,23 @@ spec:
name: oauth-secret name: oauth-secret
key: redis-password key: redis-password
volumeMounts: volumeMounts:
- name: oauth-storage - name: your-name-storage
mountPath: /app/storage mountPath: /app/storage
imagePullSecrets: imagePullSecrets:
- name: registry - name: registry
volumes: volumes:
- name: oauth-storage - name: your-name-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: oauth-storage-pvc claimName: your-name-storage-pvc
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: oauth name: your-name
namespace: ecosystem namespace: ecosystem
spec: spec:
selector: selector:
app: oauth app: your-name
framework: laravel framework: laravel
ports: ports:
- port: 80 - port: 80
@ -70,11 +70,11 @@ spec:
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: oauth-env name: your-name-env
namespace: ecosystem namespace: ecosystem
labels: labels:
env: prod env: prod
app: oauth app: your-name
data: data:
APP_ENV: "production" APP_ENV: "production"
DB_USERNAME: "ecosystem_oauth" DB_USERNAME: "ecosystem_oauth"