mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
remove TUF initialization from main (#4098)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
parent
7f4f6d14fd
commit
c3be689851
3 changed files with 3 additions and 19 deletions
|
@ -404,11 +404,6 @@ func main() {
|
||||||
// the webhook server runs across all instances
|
// the webhook server runs across all instances
|
||||||
openAPIController := startOpenAPIController(dynamicClient, stopCh)
|
openAPIController := startOpenAPIController(dynamicClient, stopCh)
|
||||||
|
|
||||||
if err := cosign.Init(); err != nil {
|
|
||||||
setupLog.Error(err, "initialization failed")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// WEBHOOK
|
// WEBHOOK
|
||||||
// - https server to provide endpoints called based on rules defined in Mutating & Validation webhook configuration
|
// - https server to provide endpoints called based on rules defined in Mutating & Validation webhook configuration
|
||||||
// - reports the results based on the response from the policy engine:
|
// - reports the results based on the response from the policy engine:
|
||||||
|
|
|
@ -181,6 +181,9 @@ func buildCosignOptions(opts Options) (*cosign.CheckOpts, error) {
|
||||||
// if key, cert, and roots are not provided, default to Fulcio roots
|
// if key, cert, and roots are not provided, default to Fulcio roots
|
||||||
if cosignOpts.RootCerts == nil {
|
if cosignOpts.RootCerts == nil {
|
||||||
cosignOpts.RootCerts = fulcio.GetRoots()
|
cosignOpts.RootCerts = fulcio.GetRoots()
|
||||||
|
if cosignOpts.RootCerts == nil {
|
||||||
|
return nil, fmt.Errorf("failed to initialize roots")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package cosign
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/sigstore/cosign/cmd/cosign/cli/fulcio"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Init() error {
|
|
||||||
if fulcio.GetRoots() == nil {
|
|
||||||
return fmt.Errorf("failed to initialize Fulcio roots")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue