Bläddra i källkod

feature: 修改yaml配置文件

Feick 2 år sedan
förälder
incheckning
266a092f1d
3 ändrade filer med 54 tillägg och 52 borttagningar
  1. 28 27
      deployment-prod.yaml
  2. 24 23
      deployment.yaml
  3. 2 2
      src/main/resources/application-dev.properties

+ 28 - 27
deployment-prod.yaml

@@ -2,15 +2,15 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: diagnosis
-  namespace: prod
+  namespace: dev
+  labels:
+    app: appointment
 spec:
-  minReadySeconds: 60
-  progressDeadlineSeconds: 600
-  replicas: 2
+  replicas: 1
   revisionHistoryLimit: 10
   selector:
     matchLabels:
-      workload.user.cattle.io/workloadselector: deployment-prod-diagnosis
+      app: diagnosis
   strategy:
     rollingUpdate:
       maxSurge: 1
@@ -18,33 +18,34 @@ spec:
     type: RollingUpdate
   template:
     metadata:
-      annotations:
-        field.cattle.io/ports: '[[{"containerPort":8080,"dnsName":"diagnosis","kind":"ClusterIP","name":"8080tcp02","protocol":"TCP","sourcePort":0}]]'
-      creationTimestamp: null
       labels:
-        workload.user.cattle.io/workloadselector: deployment-prod-diagnosis
+        app: diagnosis
     spec:
       containers:
-        - image: feick/diagnosis:${date}
+        - args:
+            - --spring.profiles.active=dev
+          image: yaoxiang/diagnosis:${date}
           imagePullPolicy: IfNotPresent
           name: diagnosis
           ports:
             - containerPort: 8080
-              name: 8080tcp02
+              name: 8080tcp01
               protocol: TCP
-          resources: {}
-          securityContext:
-            allowPrivilegeEscalation: false
-            capabilities: {}
-            privileged: false
-            readOnlyRootFilesystem: false
-            runAsNonRoot: false
-          stdin: true
-          terminationMessagePath: /dev/termination-log
-          terminationMessagePolicy: File
-          tty: true
-      dnsPolicy: ClusterFirst
-      restartPolicy: Always
-      schedulerName: default-scheduler
-      securityContext: {}
-      terminationGracePeriodSeconds: 30
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: diagnosis
+  namespace: dev
+  labels:
+    app: diagnosis
+spec:
+  selector:
+    app: diagnosis
+  type: ClusterIP
+  ports:
+    - port: 8080
+      targetPort: 8080
+      name: "http"
+      protocol: TCP

+ 24 - 23
deployment.yaml

@@ -3,13 +3,14 @@ kind: Deployment
 metadata:
   name: diagnosis
   namespace: dev
+  labels:
+    app: appointment
 spec:
-  progressDeadlineSeconds: 600
   replicas: 1
   revisionHistoryLimit: 10
   selector:
     matchLabels:
-      workload.user.cattle.io/workloadselector: deployment-dev-diagnosis
+      app: diagnosis
   strategy:
     rollingUpdate:
       maxSurge: 1
@@ -17,35 +18,35 @@ spec:
     type: RollingUpdate
   template:
     metadata:
-      annotations:
-        field.cattle.io/ports: '[[{"containerPort":8080,"dnsName":"diagnosis-nodeport","kind":"NodePort","name":"8080tcp01","protocol":"TCP","sourcePort":0}]]'
-      creationTimestamp: null
       labels:
-        workload.user.cattle.io/workloadselector: deployment-dev-diagnosis
+        app: diagnosis
     spec:
       containers:
         - args:
             - --spring.profiles.active=dev
-          image: feick/diagnosis:${date}
+          image: yaoxiang/diagnosis:${date}
           imagePullPolicy: IfNotPresent
           name: diagnosis
           ports:
             - containerPort: 8080
               name: 8080tcp01
               protocol: TCP
-          resources: {}
-          securityContext:
-            allowPrivilegeEscalation: false
-            capabilities: {}
-            privileged: false
-            readOnlyRootFilesystem: false
-            runAsNonRoot: false
-          stdin: true
-          terminationMessagePath: /dev/termination-log
-          terminationMessagePolicy: File
-          tty: true
-      dnsPolicy: ClusterFirst
-      restartPolicy: Always
-      schedulerName: default-scheduler
-      securityContext: {}
-      terminationGracePeriodSeconds: 30
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: diagnosis
+  namespace: dev
+  labels:
+    app: diagnosis
+spec:
+  selector:
+    app: diagnosis
+  type: NodePort
+  ports:
+    - port: 8080
+      targetPort: 8080
+      nodePort: 32003
+      name: "http"
+      protocol: TCP

+ 2 - 2
src/main/resources/application-dev.properties

@@ -5,7 +5,7 @@ spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/reso
 
 
 #spring.datasource.url=jdbc:mysql://47.104.200.54:3306/OnlinePapers?useUnicode=true&characterEncoding=utf-8
-spring.datasource.url=jdbc:mysql://${serverAddress}:30875/onlinepapers?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+spring.datasource.url=jdbc:mysql://${serverAddress}:32001/onlinepapers?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
 spring.datasource.username=onlinepapers
 spring.datasource.password=134679258Aa_
 spring.jpa.hibernate.ddl-auto=update
@@ -24,7 +24,7 @@ spring.datasource.testOnReturn=false
 spring.redis.database=0
 spring.redis.password=134679258Aa_
 spring.redis.host=${serverAddress}
-spring.redis.port=32578
+spring.redis.port=32002
 
 minio.url=http://miniod.yaoxiangedu.com/
 minio.secure=false