allow snapshot of kaniko certs so kaniko can build kaniko
This commit is contained in:
parent
0ddc2115a5
commit
c7bcc673fc
|
|
@ -100,10 +100,7 @@ func resolveSourceContext() error {
|
|||
if srcContext == "" && bucket == "" {
|
||||
return errors.New("please specify a path to the build context with the --context flag or a GCS bucket with the --bucket flag")
|
||||
}
|
||||
if srcContext != "" && bucket != "" {
|
||||
return errors.New("please specify either --bucket or --context as the desired build context")
|
||||
}
|
||||
if srcContext != "" {
|
||||
if bucket == "" {
|
||||
return nil
|
||||
}
|
||||
logrus.Infof("Using GCS bucket %s as source context", bucket)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ const (
|
|||
|
||||
// KanikoExecutor is the path to the kaniko executor
|
||||
KanikoExecutor = "/kaniko/executor"
|
||||
// KanikoCerts is the path to the kaniko certs
|
||||
KanikoCerts = "/kaniko/ssl/certs/ca-certificates.crt"
|
||||
|
||||
WhitelistPath = "/proc/self/mountinfo"
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ func ExtractFileSystemFromImage(img string) error {
|
|||
|
||||
// PathInWhitelist returns true if the path is whitelisted
|
||||
func PathInWhitelist(path, directory string) bool {
|
||||
if path == constants.KanikoExecutor {
|
||||
if path == constants.KanikoExecutor || path == constants.KanikoCerts {
|
||||
return false
|
||||
}
|
||||
for _, d := range whitelist {
|
||||
|
|
|
|||
Loading…
Reference in New Issue