数据库脚本修复,添加私服

This commit is contained in:
2019-11-27 11:30:27 +08:00
parent 4226fdcdfb
commit 27b6034046
7 changed files with 12590 additions and 0 deletions

75
manifests/deployment.yaml Normal file
View File

@@ -0,0 +1,75 @@
apiVersion: v1
kind: Namespace
metadata:
name: cms
---
apiVersion: v1
kind: Secret
metadata:
name: harbor-login
namespace: cms
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: ewoJImF1dGhzIjogewoJCSJoYXJib3IuZmp5ODAxOC50b3A6ODg4MyI6IHsKCQkJImF1dGgiOiAiYXpoek9rczRjMmhoY21KdmNnPT0iCgkJfQoJfQp9
---
#deploy
apiVersion: apps/v1
kind: Deployment
metadata:
name: cms
namespace: cms
labels:
app: cms
spec:
selector:
matchLabels:
app: cms
replicas: 2
template:
metadata:
labels:
app: cms
spec:
imagePullSecrets:
- name: harbor-login
containers:
- name: cms
image: __IMAGE_SLUG__:__IMAGE_VERSION_SLUG__
ports:
- containerPort: 8080
---
#service
apiVersion: v1
kind: Service
metadata:
name: cms
namespace: cms
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: cms
type: ClusterIP
---
#ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: cms
namespace: cms
spec:
rules:
- host: cotton.fjy8018.xin
http:
paths:
- path: /
backend:
serviceName: cms
servicePort: 80

21
manifests/gitlab-sa.yaml Normal file
View File

@@ -0,0 +1,21 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cms-gitlab-ci
namespace: cms
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: cms-gitlab-role
namespace: cms
subjects:
- kind: ServiceAccount
name: cms-gitlab-ci
namespace: cms
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: admin