Skip to content

Commit

Permalink
Add support of network configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Yann ILAS <[email protected]>
  • Loading branch information
yilas committed Aug 21, 2024
1 parent 51eeb09 commit 33d66bc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
9 changes: 8 additions & 1 deletion make/harbor.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ https:
# ipv4:
# enabled: true

# # Network : This section defines a custom network configuration for a Docker service.
# # It specifies a network named "harbor" with the following parameters: subnet and gateway
# networks:
# harbor:
# subnet: 172.22.0.0/16
# gateway: 172.22.0.1

# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
# # set enabled to true means internal tls is enabled
Expand Down Expand Up @@ -206,7 +213,7 @@ _version: 2.11.0
# # host for redis+sentinel:
# # <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>
# host: redis:6379
# password:
# password:
# # Redis AUTH command was extended in Redis 6, it is possible to use it in the two-arguments AUTH <username> <password> form.
# # there's a known issue when using external redis username ref:https://github.com/goharbor/harbor/issues/18892
# # if you care about the image pull/push performance, please refer to this https://github.com/goharbor/harbor/wiki/Harbor-FAQs#external-redis-username-password-usage
Expand Down
14 changes: 14 additions & 0 deletions make/photon/prepare/migrations/version_2_11_0/harbor.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ ip_family:
# enabled: true
{% endif %}


# # Network : This section defines a custom network configuration for a Docker service.
# # It specifies a network named "harbor" with the following parameters: subnet and gateway
# networks:
# harbor:
# subnet: 172.22.0.0/16
# gateway: 172.22.0.1
{% if networks is defined %}
networks:
harbor:
subnet: {{ networks.harbor.subnet }}
gateway: {{ networks.harbor.gateway }}
{% endif %}

{% if internal_tls is defined %}
# Uncomment following will enable tls communication between all harbor components
internal_tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,10 @@ services:
networks:
harbor:
external: false

{% if networks is defined %}
driver: bridge
ipam:
config:
- subnet: {{ networks.harbor.subnet }}
gateway: {{ networks.harbor.gateway }}
{% endif %}

0 comments on commit 33d66bc

Please sign in to comment.