-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding state artifact fetcher to fetch the state from harbor * completing the url fetcher * adding schedulers and process to satellite * adding simple notifier to fetch state process * added description to the scheduler * coderabbit fixes and changes to fetcher and schedulers * adding new format of the state file * adding config to process new state artifact file * coderabbit review * added ./zot to gitignore * fixing the replication process * fixing the replication and deletion process * fixing paning while removing the null tags * using repository name instead of the image name while uploading the image to the zot * fixes * moving from toml config to json config * making config.json work with the replicator * avoid printing confedential information in log * coderabbit fixes * dagger version * replication fix
- Loading branch information
1 parent
1b92424
commit 992e941
Showing
25 changed files
with
1,180 additions
and
522 deletions.
There are no files selected for viewing
This file contains 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 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 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 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", | ||
"use_unsecure": true | ||
} |
This file contains 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 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 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 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", | ||
"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 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 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 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 | ||
} |
Oops, something went wrong.