Skip to content

Allow preprepared CoreDNS image to be used #3906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conformance/base/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ spec:
- -conf
- /root/Corefile
image: coredns/coredns
imagePullPolicy: IfNotPresent
name: coredns
securityContext:
allowPrivilegeEscalation: false
Expand Down
13 changes: 8 additions & 5 deletions conformance/utils/kubernetes/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,18 +340,21 @@ func getContentsFromPathOrURL(manifestFS []fs.FS, location string, timeoutConfig
}
return manifests, nil
}
var err error
var buf []byte

var buffer bytes.Buffer
for _, mfs := range manifestFS {
buf, err = fs.ReadFile(mfs, location)
buf, err := fs.ReadFile(mfs, location)
if err != nil && errors.Is(err, fs.ErrNotExist) {
continue
} else if err != nil {
return nil, err
}
return bytes.NewBuffer(buf), nil
_, err = buffer.Write(buf)
if err != nil {
return nil, err
}
}
return nil, err
return &buffer, nil
}

// convertGatewayAddrsToPrimitives converts a slice of Gateway addresses
Expand Down