# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-admin-server-uat kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-uat data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-uat-env.sre:3306/ApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword 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/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-admin-server-uat labels: app: service-apollo-admin-server-uat spec: ports: - protocol: TCP port: 8090 targetPort: 8090 selector: app: pod-apollo-admin-server-uat type: ClusterIP sessionAffinity: ClientIP --- kind: Deployment apiVersion: apps/v1 metadata: namespace: sre name: deployment-apollo-admin-server-uat labels: app: deployment-apollo-admin-server-uat spec: replicas: 2 selector: matchLabels: app: pod-apollo-admin-server-uat strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-apollo-admin-server-uat spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-admin-server-uat topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-admin-server-uat configMap: name: configmap-apollo-admin-server-uat items: - key: application-github.properties path: application-github.properties containers: - image: apolloconfig/apollo-adminservice:1.9.2 imagePullPolicy: IfNotPresent name: container-apollo-admin-server-uat ports: - protocol: TCP containerPort: 8090 volumeMounts: - name: volume-configmap-apollo-admin-server-uat mountPath: /apollo-adminservice/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_ADMIN_SERVICE_NAME value: "service-apollo-admin-server-uat.sre" readinessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always