Add custom cert for exporter

* injecting custom certs related config to exporter

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2021-01-20 10:52:34 +08:00
parent cccfa40526
commit 92cf728371
3 changed files with 19 additions and 2 deletions

View File

@ -17,9 +17,15 @@ RUN tdnf install -y tzdata shadow >> /dev/null \
&& mkdir /harbor/
COPY --from=build /out/harbor_exporter /harbor/harbor_exporter
RUN chown harbor:harbor /harbor/harbor_exporter && chmod u+x /harbor/harbor_exporter
COPY ./make/photon/exporter/entrypoint.sh ./make/photon/common/install_cert.sh /harbor/
RUN chown -R harbor:harbor /etc/pki/tls/certs \
&& chown -R harbor:harbor /harbor/ \
&& chmod u+x /harbor/entrypoint.sh \
&& chmod u+x /harbor/install_cert.sh \
&& chmod u+x /harbor/harbor_exporter
WORKDIR /harbor
USER harbor
ENTRYPOINT ["/harbor/harbor_exporter"]
ENTRYPOINT ["/harbor/entrypoint.sh"]

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
/harbor/install_cert.sh
/harbor/harbor_exporter

View File

@ -547,6 +547,10 @@ services:
{% if external_database == False %}
- postgresql
{% endif %}
volumes:
- type: bind
source: ./common/config/shared/trust-certificates
target: /harbor_cust_cert
logging:
driver: "syslog"
options: