Skip to content

Commit

Permalink
Ensure harbor_jobservice doesn't crash too quickly for Pebble to rest…
Browse files Browse the repository at this point in the history
…art it.

Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
aznashwan committed Jul 29, 2024
1 parent b94e72b commit 387a6fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion v2.10.2/harbor-jobservice/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ services:
# NOTE(aznashwan) set entrypoint.sh for compatibility with upstream image.
# All it does is run `./make/photon/common/install_cert.sh` and exec `harbor_jobservice`.
# https://github.com/goharbor/harbor/blob/v2.10.2/make/photon/jobservice/Dockerfile#L24
command: /harbor/entrypoint.sh
# HACK(aznashwan): the `harbor_jobservice` executable instantly panics
# if the `harbor-core` component isn't online yet, making Pebble consider
# it inactive and not bothering to restart it unless it lasts at least 1s.
# https://github.com/canonical/pebble/issues/240
command: /bin/sh -c '/harbor/entrypoint.sh; sleep 1.1'

user: harbor
group: harbor
Expand Down
6 changes: 5 additions & 1 deletion v2.6.3/harbor-jobservice/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ services:
# NOTE(aznashwan) set entrypoint.sh for compatibility with upstream image.
# All it does is run `./make/photon/common/install_cert.sh` and exec `harbor_jobservice`.
# https://github.com/goharbor/harbor/blob/v2.6.3/make/photon/jobservice/Dockerfile#L24
command: /harbor/entrypoint.sh
# HACK(aznashwan): the `harbor_jobservice` executable instantly panics
# if the `harbor-core` component isn't online yet, making Pebble consider
# it inactive and not bothering to restart it unless it lasts at least 1s.
# https://github.com/canonical/pebble/issues/240
command: /bin/sh -c '/harbor/entrypoint.sh; sleep 1.1'

user: harbor
group: harbor
Expand Down
6 changes: 5 additions & 1 deletion v2.9.3/harbor-jobservice/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ services:
# NOTE(aznashwan) set entrypoint.sh for compatibility with upstream image.
# All it does is run `./make/photon/common/install_cert.sh` and exec `harbor_jobservice`.
# https://github.com/goharbor/harbor/blob/v2.9.3/make/photon/jobservice/Dockerfile#L24
command: /harbor/entrypoint.sh
# HACK(aznashwan): the `harbor_jobservice` executable instantly panics
# if the `harbor-core` component isn't online yet, making Pebble consider
# it inactive and not bothering to restart it unless it lasts at least 1s.
# https://github.com/canonical/pebble/issues/240
command: /bin/sh -c '/harbor/entrypoint.sh; sleep 1.1'

user: harbor
group: harbor
Expand Down

0 comments on commit 387a6fc

Please sign in to comment.