Skip to content

Commit

Permalink
Merge pull request #158 from XenitAB/fix/verify-empty
Browse files Browse the repository at this point in the history
Fix Containerd verify with check for empty configuration path
  • Loading branch information
phillebaba authored Aug 2, 2023
2 parents 361c6b5 + 6b9a5cb commit a1b9ed5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- [#152](https://github.com/XenitAB/spegel/pull/152) Fix image parsing to allow only passing digest through image reference.
- [#158](https://github.com/XenitAB/spegel/pull/158) Fix Containerd verify with check for empty configuration path.

### Security

Expand Down
5 changes: 4 additions & 1 deletion internal/oci/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ func (c *Containerd) Verify(ctx context.Context) error {
if err != nil {
return err
}
if cfg.Registry.ConfigPath == "" {
return fmt.Errorf("Containerd registry config path needs to be set for mirror configuration to take effect")
}
if cfg.Registry.ConfigPath != c.registryConfigPath {
return fmt.Errorf("Containerd registry config path is %s but expected to be %s", cfg.Registry.ConfigPath, c.registryConfigPath)
return fmt.Errorf("Containerd registry config path is %s but needs to be %s for mirror configuration to take effect", cfg.Registry.ConfigPath, c.registryConfigPath)
}
return nil
}
Expand Down

0 comments on commit a1b9ed5

Please sign in to comment.