service-apollo-admin-server-uat.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #
  2. # Copyright 2021 Apollo Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. ---
  17. # configmap for apollo-admin-server-uat
  18. kind: ConfigMap
  19. apiVersion: v1
  20. metadata:
  21. namespace: sre
  22. name: configmap-apollo-admin-server-uat
  23. data:
  24. application-github.properties: |
  25. spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-uat-env.sre:3306/ApolloConfigDB?characterEncoding=utf8
  26. spring.datasource.username = FillInCorrectUser
  27. spring.datasource.password = FillInCorrectPassword
  28. eureka.service.url = http://statefulset-apollo-config-server-uat-0.service-apollo-meta-server-uat:8080/eureka/,http://statefulset-apollo-config-server-uat-1.service-apollo-meta-server-uat:8080/eureka/
  29. ---
  30. kind: Service
  31. apiVersion: v1
  32. metadata:
  33. namespace: sre
  34. name: service-apollo-admin-server-uat
  35. labels:
  36. app: service-apollo-admin-server-uat
  37. spec:
  38. ports:
  39. - protocol: TCP
  40. port: 8090
  41. targetPort: 8090
  42. selector:
  43. app: pod-apollo-admin-server-uat
  44. type: ClusterIP
  45. sessionAffinity: ClientIP
  46. ---
  47. kind: Deployment
  48. apiVersion: apps/v1
  49. metadata:
  50. namespace: sre
  51. name: deployment-apollo-admin-server-uat
  52. labels:
  53. app: deployment-apollo-admin-server-uat
  54. spec:
  55. replicas: 2
  56. selector:
  57. matchLabels:
  58. app: pod-apollo-admin-server-uat
  59. strategy:
  60. rollingUpdate:
  61. maxSurge: 1
  62. maxUnavailable: 1
  63. type: RollingUpdate
  64. template:
  65. metadata:
  66. labels:
  67. app: pod-apollo-admin-server-uat
  68. spec:
  69. affinity:
  70. podAntiAffinity:
  71. preferredDuringSchedulingIgnoredDuringExecution:
  72. - weight: 100
  73. podAffinityTerm:
  74. labelSelector:
  75. matchExpressions:
  76. - key: app
  77. operator: In
  78. values:
  79. - pod-apollo-admin-server-uat
  80. topologyKey: kubernetes.io/hostname
  81. volumes:
  82. - name: volume-configmap-apollo-admin-server-uat
  83. configMap:
  84. name: configmap-apollo-admin-server-uat
  85. items:
  86. - key: application-github.properties
  87. path: application-github.properties
  88. containers:
  89. - image: apolloconfig/apollo-adminservice:1.9.2
  90. imagePullPolicy: IfNotPresent
  91. name: container-apollo-admin-server-uat
  92. ports:
  93. - protocol: TCP
  94. containerPort: 8090
  95. volumeMounts:
  96. - name: volume-configmap-apollo-admin-server-uat
  97. mountPath: /apollo-adminservice/config/application-github.properties
  98. subPath: application-github.properties
  99. env:
  100. - name: APOLLO_ADMIN_SERVICE_NAME
  101. value: "service-apollo-admin-server-uat.sre"
  102. readinessProbe:
  103. tcpSocket:
  104. port: 8090
  105. initialDelaySeconds: 10
  106. periodSeconds: 5
  107. livenessProbe:
  108. tcpSocket:
  109. port: 8090
  110. initialDelaySeconds: 120
  111. periodSeconds: 10
  112. dnsPolicy: ClusterFirst
  113. restartPolicy: Always