123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- ---
- # configmap for apollo-admin-server-dev
- kind: ConfigMap
- apiVersion: v1
- metadata:
- namespace: sre
- name: configmap-apollo-admin-server-dev
- data:
- application-github.properties: |
- spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env.sre:3306/DevApolloConfigDB?characterEncoding=utf8
- spring.datasource.username = FillInCorrectUser
- spring.datasource.password = FillInCorrectPassword
- ---
- kind: Service
- apiVersion: v1
- metadata:
- namespace: sre
- name: service-apollo-admin-server-dev
- labels:
- app: service-apollo-admin-server-dev
- spec:
- ports:
- - protocol: TCP
- port: 8090
- targetPort: 8090
- selector:
- app: pod-apollo-admin-server-dev
- type: ClusterIP
- sessionAffinity: ClientIP
- ---
- kind: Deployment
- apiVersion: apps/v1beta2
- metadata:
- namespace: sre
- name: deployment-apollo-admin-server-dev
- labels:
- app: deployment-apollo-admin-server-dev
- spec:
- replicas: 3
- selector:
- matchLabels:
- app: pod-apollo-admin-server-dev
- strategy:
- rollingUpdate:
- maxSurge: 1
- maxUnavailable: 1
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: pod-apollo-admin-server-dev
- spec:
- nodeSelector:
- node: "apollo"
-
- volumes:
- - name: volume-configmap-apollo-admin-server-dev
- configMap:
- name: configmap-apollo-admin-server-dev
- items:
- - key: application-github.properties
- path: application-github.properties
-
- initContainers:
- - image: alpine-bash:3.8
- name: check-service-apollo-config-server-dev
- command: ['bash', '-c', "curl --connect-timeout 2 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 service-apollo-config-server-dev.sre:8080"]
-
- containers:
- - image: apollo-admin-server:v1.0.0
- securityContext:
- privileged: true
- imagePullPolicy: IfNotPresent
- name: container-apollo-admin-server-dev
- ports:
- - protocol: TCP
- containerPort: 8090
-
- volumeMounts:
- - name: volume-configmap-apollo-admin-server-dev
- mountPath: /apollo-admin-server/config/application-github.properties
- subPath: application-github.properties
-
- env:
- - name: APOLLO_ADMIN_SERVICE_NAME
- value: "service-apollo-admin-server-dev.sre"
-
- readinessProbe:
- tcpSocket:
- port: 8090
- initialDelaySeconds: 10
- periodSeconds: 5
-
- livenessProbe:
- tcpSocket:
- port: 8090
- initialDelaySeconds: 120
- periodSeconds: 10
-
- dnsPolicy: ClusterFirst
- restartPolicy: Always
|