-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[olm] Include script to generate olm bindata
- Loading branch information
1 parent
e5b0f37
commit 012b5a6
Showing
12 changed files
with
352 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
entries: | ||
- description: > | ||
Added feature to the command `operator-sdk olm install` that allows installing OLM version 0.15.1 without | ||
fetching the manifest from Github. | ||
kind: "addition" | ||
breaking: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
function get_olm_manifests() { | ||
mkdir olm-manifests | ||
echo "downloading olm manifests for version ${1}" | ||
wget -O olm-manifests/olm.yaml "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${1}/olm.yaml" | ||
wget -O olm-manifests/crds.yaml "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${1}/crds.yaml" | ||
} | ||
|
||
function remove_olm_manifests { | ||
rm -rf olm-manifests | ||
} | ||
|
||
# check for files starting with the name "olm-bindata" inside internal/olm folder | ||
function delete_old_olmbindata { | ||
echo "Deleting previous versions of olm-bindata files if they exist" | ||
find internal/bindata/olm -maxdepth 1 -type f -name manifests-* -exec rm {} \; | ||
} | ||
|
||
# TODO: | ||
# 1. Modify this to accept multiple versions and download bindata. | ||
# 2. Discuss on the number of olm versions of will be supported. | ||
FILE=internal/bindata/olm/"manifests-"$1.go | ||
if [ -f "$FILE" ]; then | ||
delete_old_olmbindata | ||
get_olm_manifests $1 | ||
|
||
go get -u github.com/go-bindata/go-bindata/... | ||
$(go env GOPATH)/bin/go-bindata -o manifests-$1.go -pkg olm olm-manifests/ | ||
mv manifests-$1.go internal/bindata/olm | ||
|
||
remove_olm_manifests | ||
fi | ||
|
||
go mod tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters