|
|
@ -32,37 +32,37 @@ import ( |
|
|
|
// kratos-service-protocols: define the protocols of the service
|
|
|
|
// kratos-service-protocols: define the protocols of the service
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Example Deployment:
|
|
|
|
// Example Deployment:
|
|
|
|
//
|
|
|
|
/* |
|
|
|
// apiVersion: apps/v1
|
|
|
|
apiVersion: apps/v1 |
|
|
|
// kind: Deployment
|
|
|
|
kind: Deployment |
|
|
|
// metadata:
|
|
|
|
metadata: |
|
|
|
// name: nginx
|
|
|
|
name: nginx |
|
|
|
// labels:
|
|
|
|
labels: |
|
|
|
// app: nginx
|
|
|
|
app: nginx |
|
|
|
// spec:
|
|
|
|
spec: |
|
|
|
// replicas: 5
|
|
|
|
replicas: 5 |
|
|
|
// selector:
|
|
|
|
selector: |
|
|
|
// matchLabels:
|
|
|
|
matchLabels: |
|
|
|
// app: nginx
|
|
|
|
app: nginx |
|
|
|
// template:
|
|
|
|
template: |
|
|
|
// metadata:
|
|
|
|
metadata: |
|
|
|
// labels:
|
|
|
|
labels: |
|
|
|
// app: nginx
|
|
|
|
app: nginx |
|
|
|
// kratos-service-id: "56991810-c77f-4a95-8190-393efa9c1a61"
|
|
|
|
kratos-service-id: "56991810-c77f-4a95-8190-393efa9c1a61" |
|
|
|
// kratos-service-app: "nginx"
|
|
|
|
kratos-service-app: "nginx" |
|
|
|
// kratos-service-version: "v3.5.0"
|
|
|
|
kratos-service-version: "v3.5.0" |
|
|
|
// annotations:
|
|
|
|
annotations: |
|
|
|
// kratos-service-protocols: |
|
|
|
|
kratos-service-protocols: | |
|
|
|
// {"80": "http"}
|
|
|
|
{"80": "http"} |
|
|
|
// kratos-service-metadata: |
|
|
|
|
kratos-service-metadata: | |
|
|
|
// {"region": "sh", "zone": "sh001", "cluster": "pd"}
|
|
|
|
{"region": "sh", "zone": "sh001", "cluster": "pd"} |
|
|
|
// spec:
|
|
|
|
spec: |
|
|
|
// containers:
|
|
|
|
containers: |
|
|
|
// - name: nginx
|
|
|
|
- name: nginx |
|
|
|
// image: nginx:1.7.9
|
|
|
|
image: nginx:1.7.9 |
|
|
|
// ports:
|
|
|
|
ports: |
|
|
|
// - containerPort: 80
|
|
|
|
- containerPort: 80 |
|
|
|
//
|
|
|
|
*/ |
|
|
|
const ( |
|
|
|
const ( |
|
|
|
// LabelsKeyServiceID is used to define the ID of the service
|
|
|
|
// LabelsKeyServiceID is used to define the ID of the service
|
|
|
|
LabelsKeyServiceID = "kratos-service-id" |
|
|
|
LabelsKeyServiceID = "kratos-service-id" |
|
|
|