Now I read this config in kubernetes:
containers:
- name: canal-admin-stable
image: 'dolphinjiang/canal-admin:v1.1.5'
ports:
- name: http
containerPort: 8089
protocol: TCP
resources:
limits:
cpu: '2'
memory: 2Gi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: admin-conf
mountPath: /home/canal/conf/application.yml
subPath: application.yml
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
the volumne mount path(/home/canal/conf/application.yml) already file full path, I think kubernetes only overwrite the file application.yml, why still specify subPath application.yml? Why not write like this:
volumeMounts:
- name: admin-conf
mountPath: /home/canal/conf/
subPath: application.yml