<commit_before># Configuration file of Harbor

# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: {{ hostname }}

# http related config
{% if http is defined %}
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: {{ http.port }}
{% else %}
# http:
#   # port for http, default is 80. If https enabled, this port will redirect to https port
#   port: 80
{% endif %}

{% if https is defined %}
# https related config
https:
  # https port for harbor, default is 443
  port: {{ https.port }}
  # The path of cert and key files for nginx
  certificate: {{ https.certificate }}
  private_key: {{ https.private_key }}
{% else %}
# https related config
# https:
#   # https port for harbor, default is 443
#   port: 443
#   # The path of cert and key files for nginx
#   certificate: /your/certificate/path
#   private_key: /your/private/key/path
{% endif %}

# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal

# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
{% if external_url is defined %}
external_url: {{ external_url }}
{% else %}
# external_url: https://reg.mydomain.com:8433
{% endif %}

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
{% if harbor_admin_password is defined %}
harbor_admin_password: {{ harbor_admin_password }}
{% else %}
harbor_admin_password: <PASSWORD>
{% endif %}

# Harbor DB configuration
database:
{% if database is defined %}
  # The password for the root user of Harbor DB. Change this before any production use.
  password: {{ database.password}}
  # The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
  max_idle_conns: {{ database.max_idle_conns }}
  # The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
  # Note: the default number of connections is 100 for postgres.
  max_open_conns: {{ database.max_open_conns }}
{% else %}
  # The password for the root user of Harbor DB. Change this before any production use.
  password: <PASSWORD>
  # The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
  max_idle_conns: 50
  # The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
  # Note: the default number of connections is 100 for postgres.
  max_open_conns: 100
{% endif %}

{% if data_volume is defined %}
# The default data volume
data_volume: {{ data_volume }}
{% else %}
# The default data volume
data_volume: /data
{% endif %}

# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
{% if storage_service is defined %}
storage_service:
  {% for key, value in storage_service.items() %}
    {% if key == 'ca_bundle' %}
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
  ca_bundle: {{ value if value is not none else '' }}
    {% elif key == 'redirect' %}
#   # set disable to true when you want to disable registry redirect
  redirect:
    disabled: {{ value.disabled }}
    {% else %}
#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
  {{ key }}:
      {% for k, v in value.items() %}
    {{ k }}: {{ v if v is not none else '' }}
      {% endfor %}
    {% endif %}
  {% endfor %}
{% else %}
# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
# storage_service:
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
#   ca_bundle:

#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
#   filesystem:
#     maxthreads: 100
#   # set disable to true when you want to disable registry redirect
#   redirect:
#     disabled: false
{% endif %}

# Clair configuration
clair:
  # The interval of clair updaters, the unit is hour, set to 0 to disable the updaters.
{% if clair is defined %}
  updaters_interval: {{ clair.updaters_interval }}
{% else %}
  updaters_interval: 12
{% endif %}

# Trivy configuration
#
# Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
# It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
# in the local file system. In addition, the database contains the update timestamp so Trivy can detect whether it
# should download a newer version from the Internet or use the cached one. Currently, the database is updated every
# 12 hours and published as a new release to GitHub.
{% if trivy is defined %}
trivy:
  # ignoreUnfixed The flag to display only fixed vulnerabilities
  {% if trivy.ignore_unfixed is defined %}
  ignore_unfixed: {{ trivy.ignore_unfixed }}
  {% else %}
  ignore_unfixed: false
  {% endif %}
  # skipUpdate The flag to enable or disable Trivy DB downloads from GitHub
  #
  # You might want to enable this flag in test or CI/CD environments to avoid GitHub rate limiting issues.
  # If the flag is enabled you have to manually download the `trivy.db` file and mount it in the
  # /home/scanner/.cache/trivy/db/trivy.db path.
  {% if trivy.skip_update is defined %}
  skip_update: {{ trivy.skip_update }}
  {% else %}
  skip_update: false
  {% endif %}
  #
  # insecure The flag to skip verifying registry certificate
  {% if trivy.insecure is defined %}
  insecure: {{ trivy.insecure }}
  {% else %}
  insecure: false
  {% endif %}
  # github_token The GitHub access token to download Trivy DB<commit_msg>Fix internal tls config upgrade issue<commit_after># Configuration file of Harbor

# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: {{ hostname }}

# http related config
{% if http is defined %}
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: {{ http.port }}
{% else %}
# http:
#   # port for http, default is 80. If https enabled, this port will redirect to https port
#   port: 80
{% endif %}

{% if https is defined %}
# https related config
https:
  # https port for harbor, default is 443
  port: {{ https.port }}
  # The path of cert and key files for nginx
  certificate: {{ https.certificate }}
  private_key: {{ https.private_key }}
{% else %}
# https related config
# https:
#   # https port for harbor, default is 443
#   port: 443
#   # The path of cert and key files for nginx
#   certificate: /your/certificate/path
#   private_key: /your/private/key/path
{% endif %}

{% if internal_tls is defined %}
# Uncomment following will enable tls communication between all harbor components
internal_tls:
  # set enabled to true means internal tls is enabled
  enabled: {{ internal_tls.enabled | lower }}
  # put your cert and key files on dir
  dir: {{ internal_tls.dir }}
{% else %}
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal
{% endif %}

# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
{% if external_url is defined %}
external_url: {{ external_url }}
{% else %}
# external_url: https://reg.mydomain.com:8433
{% endif %}

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
{% if harbor_admin_password is defined %}
harbor_admin_password: {{ harbor_admin_password }}
{% else %}
harbor_admin_password: <PASSWORD>
{% endif %}

# Harbor DB configuration
database:
{% if database is defined %}
  # The password for the root user of Harbor DB. Change this before any production use.
  password: {{ database.password}}
  # The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
  max_idle_conns: {{ database.max_idle_conns }}
  # The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
  # Note: the default number of connections is 100 for postgres.
  max_open_conns: {{ database.max_open_conns }}
{% else %}
  # The password for the root user of Harbor DB. Change this before any production use.
  password: <PASSWORD>
  # The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
  max_idle_conns: 50
  # The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
  # Note: the default number of connections is 100 for postgres.
  max_open_conns: 100
{% endif %}

{% if data_volume is defined %}
# The default data volume
data_volume: {{ data_volume }}
{% else %}
# The default data volume
data_volume: /data
{% endif %}

# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
{% if storage_service is defined %}
storage_service:
  {% for key, value in storage_service.items() %}
    {% if key == 'ca_bundle' %}
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
  ca_bundle: {{ value if value is not none else '' }}
    {% elif key == 'redirect' %}
#   # set disable to true when you want to disable registry redirect
  redirect:
    disabled: {{ value.disabled }}
    {% else %}
#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
  {{ key }}:
      {% for k, v in value.items() %}
    {{ k }}: {{ v if v is not none else '' }}
      {% endfor %}
    {% endif %}
  {% endfor %}
{% else %}
# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
# storage_service:
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
#   ca_bundle:

#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
#   filesystem:
#     maxthreads: 100
#   # set disable to true when you want to disable registry redirect
#   redirect:
#     disabled: false
{% endif %}

# Clair configuration
clair:
  # The interval of clair updaters, the unit is hour, set to 0 to disable the updaters.
{% if clair is defined %}
  updaters_interval: {{ clair.updaters_interval }}
{% else %}
  updaters_interval: 12
{% endif %}

# Trivy configuration
#
# Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
# It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
# in the local file system. In addition, the database contains the update timestamp so Trivy can detect whether it
# should download a newer version from the Internet or use the cached one. Currently, the database is updated every
# 12 hours and published as a new release to GitHub.
{% if trivy is defined %}
trivy:
  # ignoreUnfixed The flag to display only fixed vulnerabilities
  {% if trivy.ignore_unfixed is defined %}
  ignore_unfixed: {{ trivy.ignore_unfixed | lower }}
  {% else %}
  ignore_unfixed: false
  {% endif %}
  # skipUpdate The flag to enable or disable Trivy DB downloads from GitHub
  #
  # You might want to enable this flag in test or CI/CD environments to avoid GitHub rate limiting issues.
  # If the flag is enabled you have to manually download the `trivy.db` file and mount it in the
  # /home/scanner/.cache/trivy/db/trivy.db path.
  {% if trivy.skip_update is defined %}
  skip_update: {{ trivy.skip_update | lower }}
  {% else %}
  skip_update: false
  {% endif %}
  #
  # insecure The flag to skip verifying registry certificate
  {% if trivy.insecure is defined %}
  insecure: {{ trivy.insecure | lower }}
  {% else %}
  insecure: false
  {% endif %}
  # github_token The GitHub access token to download Trivy DB
{'fraction_non_alphanumeric': 0.08507234785137788, 'fraction_numerical': 0.00727114084199811, 'mean_word_length': 3.804051694027244, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6742252', 'n_tokens_mistral': 4107, 'n_tokens_neox': 3731, 'n_words': 1770}