2018-11-15 04:09:57 +01:00
---
#Protocol used to serve
2020-02-11 06:47:55 +01:00
{% if internal_tls.enabled %}
protocol: "https"
https_config:
cert: "/etc/harbor/ssl/job_service.crt"
key: "/etc/harbor/ssl/job_service.key"
2018-11-15 04:09:57 +01:00
2020-02-11 06:47:55 +01:00
#Server listening port
port: 8443
{% else %}
protocol: "http"
2018-11-15 04:09:57 +01:00
#Server listening port
port: 8080
2020-02-11 06:47:55 +01:00
{% endif %}
2018-11-15 04:09:57 +01:00
#Worker pool
worker_pool:
#Worker concurrency
workers: {{max_job_workers}}
backend: "redis"
#Additional config if use 'redis' backend
redis_pool:
#redis://[arbitrary_username:password@]ipaddress:port/database_index
redis_url: {{redis_url}}
namespace: "harbor_job_service_namespace"
2019-05-22 13:25:06 +02:00
idle_timeout_second: 3600
2018-11-15 04:09:57 +01:00
#Loggers for the running job
job_loggers:
2023-07-24 16:10:36 +02:00
# The jobLoggers backend name, only support "STD_OUTPUT", "FILE" and/or "DB"
{% for component in job_loggers %}
{% if component == 'STD_OUTPUT' %}
- name: "STD_OUTPUT"
2019-05-15 04:28:52 +02:00
level: "{{level}}" # INFO/DEBUG/WARNING/ERROR/FATAL
2023-07-24 16:10:36 +02:00
{% endif %}
{% if component == 'FILE' %}
2018-11-15 04:09:57 +01:00
- name: "FILE"
2019-05-15 04:28:52 +02:00
level: "{{level}}"
2018-11-15 04:09:57 +01:00
settings: # Customized settings of logger
base_dir: "/var/log/jobs"
sweeper:
2023-03-18 03:46:40 +01:00
duration: {{logger_sweeper_duration}} #days
2018-11-15 04:09:57 +01:00
settings: # Customized settings of sweeper
work_dir: "/var/log/jobs"
2023-07-24 16:10:36 +02:00
{% endif %}
{% if component == 'DB' %}
- name: "DB"
level: "{{level}}"
sweeper:
duration: {{logger_sweeper_duration}} #days
{% endif %}
{% endfor %}
2018-11-15 04:09:57 +01:00
#Loggers for the job service
loggers:
- name: "STD_OUTPUT" # Same with above
2019-05-15 04:28:52 +02:00
level: "{{level}}"
2021-03-15 17:25:53 +01:00
{% if metric.enabled %}
metric:
enabled: true
path: {{ metric.path }}
port: {{ metric.port }}
{% endif %}
2023-03-06 06:19:10 +01:00
2023-03-21 11:48:14 +01:00
reaper:
# the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24,
max_update_hours: 24
# the max time for execution in running state without new task created
max_dangling_hours: 168
2023-03-06 06:19:10 +01:00
# the max size of job log returned by API, default is 10M
max_retrieve_size_mb: 10