1
0

service-apollo-config-server-test-beta.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---
  2. # configmap for apollo-config-server-test-beta
  3. kind: ConfigMap
  4. apiVersion: v1
  5. metadata:
  6. namespace: sre
  7. name: configmap-apollo-config-server-test-beta
  8. data:
  9. application-github.properties: |
  10. spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-test-beta-env.sre:3306/TestBetaApolloConfigDB?characterEncoding=utf8
  11. spring.datasource.username = FillInCorrectUser
  12. spring.datasource.password = FillInCorrectPassword
  13. ---
  14. kind: Service
  15. apiVersion: v1
  16. metadata:
  17. namespace: sre
  18. name: service-apollo-meta-server-test-beta
  19. labels:
  20. app: service-apollo-meta-server-test-beta
  21. spec:
  22. ports:
  23. - protocol: TCP
  24. port: 8080
  25. targetPort: 8080
  26. selector:
  27. app: pod-apollo-config-server-test-beta
  28. type: ClusterIP
  29. clusterIP: None
  30. sessionAffinity: ClientIP
  31. ---
  32. kind: Service
  33. apiVersion: v1
  34. metadata:
  35. namespace: sre
  36. name: service-apollo-config-server-test-beta
  37. labels:
  38. app: service-apollo-config-server-test-beta
  39. spec:
  40. ports:
  41. - protocol: TCP
  42. port: 8080
  43. targetPort: 8080
  44. nodePort: 30004
  45. selector:
  46. app: pod-apollo-config-server-test-beta
  47. type: NodePort
  48. sessionAffinity: ClientIP
  49. ---
  50. kind: StatefulSet
  51. apiVersion: apps/v1beta2
  52. metadata:
  53. namespace: sre
  54. name: statefulset-apollo-config-server-test-beta
  55. labels:
  56. app: statefulset-apollo-config-server-test-beta
  57. spec:
  58. serviceName: service-apollo-meta-server-test-beta
  59. replicas: 3
  60. selector:
  61. matchLabels:
  62. app: pod-apollo-config-server-test-beta
  63. updateStrategy:
  64. type: RollingUpdate
  65. template:
  66. metadata:
  67. labels:
  68. app: pod-apollo-config-server-test-beta
  69. spec:
  70. nodeSelector:
  71. node: "apollo"
  72. volumes:
  73. - name: volume-configmap-apollo-config-server-test-beta
  74. configMap:
  75. name: configmap-apollo-config-server-test-beta
  76. items:
  77. - key: application-github.properties
  78. path: application-github.properties
  79. containers:
  80. - image: apollo-config-server:v1.0.0
  81. securityContext:
  82. privileged: true
  83. imagePullPolicy: IfNotPresent
  84. name: container-apollo-config-server-test-beta
  85. ports:
  86. - protocol: TCP
  87. containerPort: 8080
  88. volumeMounts:
  89. - name: volume-configmap-apollo-config-server-test-beta
  90. mountPath: /apollo-config-server/config/application-github.properties
  91. subPath: application-github.properties
  92. env:
  93. - name: APOLLO_CONFIG_SERVICE_NAME
  94. value: "service-apollo-config-server-test-beta.sre"
  95. readinessProbe:
  96. tcpSocket:
  97. port: 8080
  98. initialDelaySeconds: 10
  99. periodSeconds: 5
  100. livenessProbe:
  101. tcpSocket:
  102. port: 8080
  103. initialDelaySeconds: 120
  104. periodSeconds: 15
  105. dnsPolicy: ClusterFirst
  106. restartPolicy: Always