123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- ---
- # configmap for apollo-config-server-dev
- kind: ConfigMap
- apiVersion: v1
- metadata:
- namespace: sre
- name: configmap-apollo-config-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-meta-server-dev
- labels:
- app: service-apollo-meta-server-dev
- spec:
- ports:
- - protocol: TCP
- port: 8080
- targetPort: 8080
- selector:
- app: pod-apollo-config-server-dev
- type: ClusterIP
- clusterIP: None
- sessionAffinity: ClientIP
- ---
- kind: Service
- apiVersion: v1
- metadata:
- namespace: sre
- name: service-apollo-config-server-dev
- labels:
- app: service-apollo-config-server-dev
- spec:
- ports:
- - protocol: TCP
- port: 8080
- targetPort: 8080
- nodePort: 30002
- selector:
- app: pod-apollo-config-server-dev
- type: NodePort
- sessionAffinity: ClientIP
- ---
- kind: StatefulSet
- apiVersion: apps/v1beta2
- metadata:
- namespace: sre
- name: statefulset-apollo-config-server-dev
- labels:
- app: statefulset-apollo-config-server-dev
- spec:
- serviceName: service-apollo-meta-server-dev
- replicas: 3
- selector:
- matchLabels:
- app: pod-apollo-config-server-dev
- updateStrategy:
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: pod-apollo-config-server-dev
- spec:
- nodeSelector:
- node: "apollo"
- volumes:
- - name: volume-configmap-apollo-config-server-dev
- configMap:
- name: configmap-apollo-config-server-dev
- items:
- - key: application-github.properties
- path: application-github.properties
-
- containers:
- - image: apollo-config-server:v1.0.0
- securityContext:
- privileged: true
- imagePullPolicy: IfNotPresent
- name: container-apollo-config-server-dev
- ports:
- - protocol: TCP
- containerPort: 8080
-
- volumeMounts:
- - name: volume-configmap-apollo-config-server-dev
- mountPath: /apollo-config-server/config/application-github.properties
- subPath: application-github.properties
-
- env:
- - name: APOLLO_CONFIG_SERVICE_NAME
- value: "service-apollo-config-server-dev.sre"
-
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
-
- livenessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 120
- periodSeconds: 10
-
- dnsPolicy: ClusterFirst
- restartPolicy: Always
|