Skip to content

Commit

Permalink
fix: Correct selector used to find installer specs when redacting (#1456
Browse files Browse the repository at this point in the history
)
  • Loading branch information
banjoh authored Feb 7, 2024
1 parent 41134ca commit e2adfa3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ E2EPATHS = ./test/e2e/...
TESTFLAGS ?= -v -coverprofile cover.out

.DEFAULT_GOAL := all
all: build test
all: clean build test

.PHONY: ffi
ffi: fmt vet
Expand Down
2 changes: 1 addition & 1 deletion pkg/redact/redact.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func getRedactors(path string) ([]Redactor, error) {

uniqueCRs := map[string]bool{}
for _, cr := range customResources {
fileglob := fmt.Sprintf("%s/%s/%s/*", constants.CLUSTER_RESOURCES_DIR, constants.CLUSTER_RESOURCES_CUSTOM_RESOURCES, cr.resource)
fileglob := fmt.Sprintf("%s/%s/%s/*.yaml", constants.CLUSTER_RESOURCES_DIR, constants.CLUSTER_RESOURCES_CUSTOM_RESOURCES, cr.resource)
redactors = append(redactors, NewYamlRedactor(cr.yamlPath, fileglob, ""))

// redact kubectl last applied annotation once for each resource since it contains copies of
Expand Down
5 changes: 1 addition & 4 deletions pkg/redact/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bufio"
"bytes"
"io"
"io/ioutil"
"path/filepath"
"strconv"
"strings"
Expand Down Expand Up @@ -50,7 +49,7 @@ func (r *YamlRedactor) Redact(input io.Reader, path string) io.Reader {
reader := bufio.NewReader(input)

var doc []byte
doc, err = ioutil.ReadAll(reader)
doc, err = io.ReadAll(reader)
var yamlInterface interface{}
err = yaml.Unmarshal(doc, &yamlInterface)
if err != nil {
Expand Down Expand Up @@ -84,8 +83,6 @@ func (r *YamlRedactor) Redact(input io.Reader, path string) io.Reader {
File: path,
IsDefaultRedactor: r.isDefault,
})

return
}()
return reader
}
Expand Down

0 comments on commit e2adfa3

Please sign in to comment.