Skip to content
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

commands/.../scorecard: optionally use only a CSV manifest when deployed with OLM #1044

Merged
merged 42 commits into from
Feb 28, 2019
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
821bac7
* pkg/scaffold/olm-catalog/csv*.go: use afero Fs in CSV generation
estroz Jan 24, 2019
6a5567d
Merge branch 'master' into inject-fs
estroz Jan 25, 2019
70162b3
pkg/.../csv.go: getFS instead of naked field ref
estroz Jan 25, 2019
5632f73
internal/.../file_util.go: {NewFileWriter,Get}(FS)? instead of naked …
estroz Jan 25, 2019
977cb29
Merge branch 'master' into inject-fs
estroz Jan 28, 2019
a1c57f7
initFS in getFS
estroz Jan 29, 2019
70cbb26
remove os.Stat and check IfNotExists after reading file
estroz Jan 29, 2019
430dd50
Merge branch 'master' into inject-fs
estroz Jan 31, 2019
5dd0dcf
commands/.../scorecard/*: optionally get data from CSV only
estroz Feb 1, 2019
5157332
add ClusterRole to namespaced manifest
estroz Feb 1, 2019
c951783
add olm-deployed scorecard test
estroz Feb 1, 2019
789625b
Merge branch 'master' into olm-scorecard-integration
estroz Feb 1, 2019
7bea4a2
fix scaffold.CRDsDir name
estroz Feb 1, 2019
0cd061c
Merge branch 'master' into olm-scorecard-integration
estroz Feb 1, 2019
6bfc5d0
Merge branch 'master' into olm-scorecard-integration
estroz Feb 1, 2019
d2c7773
only get CR's from alm-examples if no CR is passed in
estroz Feb 1, 2019
dc872e8
add license header
estroz Feb 1, 2019
4e53bdd
bump expected number of scorecard points (CR example was added to CSV)
estroz Feb 1, 2019
761d4a4
add crd-dir flag
estroz Feb 1, 2019
14f2705
fix panic
estroz Feb 2, 2019
73ea529
pluralize crd/CRD
estroz Feb 5, 2019
4a72c06
* commands/.../scorecard/scorecard.go: grammar
estroz Feb 5, 2019
8c04d8d
Merge branch 'test-scorecard-config' into olm-scorecard-integration
estroz Feb 5, 2019
b96617a
create resources correctly when only using CSV
estroz Feb 5, 2019
60834b1
cleanup and reverting a few changes
estroz Feb 5, 2019
50c6502
use CRDsDir as flag default
estroz Feb 5, 2019
faf9362
Merge branch 'master' into olm-scorecard-integration
estroz Feb 5, 2019
e226820
deduplicate flags, add timeout and points to scorecard subcommand tests
estroz Feb 5, 2019
c30dc9a
fix unit test
estroz Feb 5, 2019
6ba075f
Merge branch 'master' into olm-scorecard-integration
estroz Feb 6, 2019
d294464
use --init-timeout for 3rd scorecard test
estroz Feb 6, 2019
1fb67df
revert unit test fix
estroz Feb 6, 2019
81e425f
commands/.../scorecard/*: conditionally create resources from CSV
estroz Feb 12, 2019
22e546d
Merge branch 'master' into olm-scorecard-integration
estroz Feb 12, 2019
cc9aa07
allow creation of operator resources outside of SDK
estroz Feb 13, 2019
6bc13eb
Merge branch 'master' into olm-scorecard-integration
estroz Feb 13, 2019
38fac62
get deploymentName from CSV if olm-deployed is true
estroz Feb 13, 2019
2d89e15
Merge branch 'master' into olm-scorecard-integration
estroz Feb 18, 2019
86c22cc
commands/.../scorecard*: if --olm-deployed, get proxyPod outside of r…
estroz Feb 19, 2019
963c418
Merge branch 'master' into olm-scorecard-integration
estroz Feb 27, 2019
6a28955
PR updates
estroz Feb 28, 2019
4e21ef2
CHANGELOG.md/docs/sdk-cli-reference.md: add --olm-deployed flag
estroz Feb 28, 2019
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
Prev Previous commit
Next Next commit
remove os.Stat and check IfNotExists after reading file
estroz committed Jan 29, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
estroz Eric Stroczynski
commit 70cbb26a6e066dd394fcee97217e58e5849584c7
6 changes: 3 additions & 3 deletions pkg/scaffold/olm-catalog/csv.go
Original file line number Diff line number Diff line change
@@ -136,11 +136,11 @@ func (s *CSV) getBaseCSVIfExists() (*olmapiv1alpha1.ClusterServiceVersion, bool,
}

func getCSVFromFSIfExists(fs afero.Fs, path string) (*olmapiv1alpha1.ClusterServiceVersion, bool, error) {
if _, err := fs.Stat(path); err != nil && os.IsNotExist(err) {
return nil, false, nil
}
csvBytes, err := afero.ReadFile(fs, path)
if err != nil {
if os.IsNotExist(err) {
return nil, false, nil
}
return nil, false, err
}
if len(csvBytes) == 0 {