Skip to content

Commit

Permalink
allow snapshot of kaniko certs so kaniko can build kaniko
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed Apr 16, 2018
1 parent 0ddc211 commit c7bcc67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cmd/executor/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/fs_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c7bcc67

Please sign in to comment.