-
Notifications
You must be signed in to change notification settings - Fork 55
Adds state artifact fetcher #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Vad1mo
merged 23 commits into
container-registry:main
from
Mehul-Kumar-27:satellite-state-fetcher
Nov 26, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b0304ff
adding state artifact fetcher to fetch the state from harbor
Mehul-Kumar-27 8a5ba11
completing the url fetcher
Mehul-Kumar-27 c291e6a
adding schedulers and process to satellite
Mehul-Kumar-27 fe299f8
adding simple notifier to fetch state process
Mehul-Kumar-27 b6b5dea
added description to the scheduler
Mehul-Kumar-27 91222d4
coderabbit fixes and changes to fetcher and schedulers
Mehul-Kumar-27 09419ce
adding new format of the state file
Mehul-Kumar-27 c60f7a4
adding config to process new state artifact file
Mehul-Kumar-27 18b5633
Merge branch 'main' into satellite-state-fetcher
Mehul-Kumar-27 dec1ba0
coderabbit review
Mehul-Kumar-27 ef0d82a
added ./zot to gitignore
Mehul-Kumar-27 74fc4b9
fixing the replication process
Mehul-Kumar-27 3d0e209
fixing the replication and deletion process
Mehul-Kumar-27 6e54a14
fixing paning while removing the null tags
Mehul-Kumar-27 8904e99
using repository name instead of the image name while uploading the i…
Mehul-Kumar-27 a08405d
fixes
Mehul-Kumar-27 f754085
moving from toml config to json config
Mehul-Kumar-27 abb1a3e
making config.json work with the replicator
Mehul-Kumar-27 a641df3
avoid printing confedential information in log
Mehul-Kumar-27 2f11137
coderabbit fixes
Mehul-Kumar-27 5ca08c7
dagger version
Mehul-Kumar-27 9c6d293
Merge branch 'main' into satellite-state-fetcher
Mehul-Kumar-27 9782e7e
replication fix
Mehul-Kumar-27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,3 +29,6 @@ dist/ | |
| zot/cache.db | ||
| secrets.txt | ||
| __debug_bin1949266242 | ||
|
|
||
| /zot | ||
| /runtime | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "auth": { | ||
| "name": "admin", | ||
| "registry": "https://registry.bupd.xyz", | ||
| "secret": "Harbor12345" | ||
| }, | ||
| "bring_own_registry": false, | ||
| "ground_control_url": "http://localhost:8080", | ||
| "log_level": "info", | ||
| "own_registry_adr": "127.0.0.1", | ||
| "own_registry_port": "8585", | ||
| "states": ["https://registry.bupd.xyz/satellite-test-group-state/state:latest"], | ||
| "url_or_file": "https://registry.bupd.xyz", | ||
| "zotconfigpath": "./registry/config.json", | ||
Mehul-Kumar-27 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "use_unsecure": true | ||
Mehul-Kumar-27 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,25 @@ | ||
| { | ||
| "registryUrl": "https://demo.goharbor.io/v2/", | ||
| "repositories": [ | ||
| "registry": "Satellite", | ||
Mehul-Kumar-27 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "artifacts": [ | ||
| { | ||
| "repository": "myproject", | ||
| "images": [ | ||
| { | ||
| "name": "album-server@sha256:39879890008f12c25ea14125aa8e9ec8ef3e167f0b0ed88057e955a8fa32c430" | ||
| }, | ||
| { | ||
| "name": "album-server:busybox" | ||
| } | ||
| ] | ||
| "repository": "satellite-test-group-state/alpine", | ||
| "tag": [ | ||
| "latest" | ||
| ], | ||
| "labels": null, | ||
| "type": "IMAGE", | ||
| "digest": "sha256:9cee2b382fe2412cd77d5d437d15a93da8de373813621f2e4d406e3df0cf0e7c", | ||
| "deleted": false | ||
| }, | ||
| { | ||
| "repository": "satellite-test-group-state/postgres", | ||
| "tag": [ | ||
| "latest" | ||
| ], | ||
| "labels": null, | ||
| "type": "IMAGE", | ||
| "digest": "sha256:dde924f70bc972261013327c480adf402ea71487b5750e40569a0b74fa90c74a", | ||
| "deleted": false | ||
| } | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| package notifier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package notifier | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "container-registry.com/harbor-satellite/logger" | ||
| ) | ||
|
|
||
| type Notifier interface { | ||
| // Notify sends a notification | ||
| Notify() error | ||
| } | ||
|
|
||
| type SimpleNotifier struct{ | ||
| ctx context.Context | ||
| } | ||
|
|
||
| func NewSimpleNotifier(ctx context.Context) Notifier { | ||
| return &SimpleNotifier{ | ||
| ctx: ctx, | ||
| } | ||
| } | ||
|
|
||
| func (n *SimpleNotifier) Notify() error { | ||
| log := logger.FromContext(n.ctx) | ||
| log.Info().Msg("This is a simple notifier") | ||
| return nil | ||
| } | ||
Mehul-Kumar-27 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.