123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: adm-middleware
- labels:
- app: adm-middleware
- spec:
- selector:
- app: adm-middleware
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: adm-middleware
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: adm-middleware
- template:
- metadata:
- labels:
- app: adm-middleware
- spec:
- hostAliases:
- - ip: "192.168.100.90"
- hostnames:
- - "node1"
- - "namenode"
- - "secondarynamenode"
- - "zookeeper1"
- - ip: "192.168.100.91"
- hostnames:
- - "node2"
- - "datanode1"
- - "zookeeper2"
- - ip: "192.168.100.92"
- hostnames:
- - "node3"
- - "datanode2"
- - "zookeeper3"
- volumes:
- - name: springcloud
- configMap:
- name: springcloud
- defaultMode: 0777
- items:
- - key: bootstrap.yml
- path: path/to/application.yml
- containers:
- - name: adm-middleware
- image: labisenlin.persagy.com/library/adm-middleware:latest
- imagePullPolicy: Always
- volumeMounts:
- - name: springcloud
- mountPath: /data/SpringCloud/bootstarp.yml
- subPath: path/to/application.yml
- env:
- - name: TZ
- value: Asia/Shanghai
- - name: JAVA_OPTS
- value: -Dfile.encoding=UTF-8
- - name: SERVER_PORT
- value: "8876"
- - name: SPRING_CLOUD_CONFIG_URI
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: spring.cloud.config.uri
- - name: SPRING_PROFILES_ACTIVE
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: spring.profiles.active
- - name: SPRING_CLOUD_CONFIG_PROFILE
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: spring.cloud.config.profile
- - name: EUREKA_CLIENT_FETCH_REGISTRY
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: eureka.client.fetch-registry
- - name: EUREKA_CLIENT_REGISTER_WITH_EUREKA
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: eureka.client.register-with-eureka
- - name: EUREKA_CLIENT_DEFAULT_ZONE
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: eureka.client.default.zone
- - name: EUREKA_INSTANCE_IP_ADDRESS
- valueFrom:
- configMapKeyRef:
- name: adm-middleware
- key: eureka.instance.ip.address
|