Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boilerplate: Update to 309c34dc461b882681142051706cc3d5b5af5f8b
Conventions: - openshift/golang-osd-operator: Update --- openshift/boilerplate@25bf147...309c34d commit: 5f1d9a464728641d0c5ea1828fed7b5b2361c99f author: Arjun Naik Small improvements to make it easier to run csv-generate test locally Signed-off-by: Arjun Naik <anaik@redhat.com> commit: b926c8703e255748b632d0dabdb061f439b581d4 author: Arjun Naik Updated the hack generation script Signed-off-by: Arjun Naik <anaik@redhat.com> commit: 639160e9a92475f0a446c44aff3ad202d935e83e author: Arjun Naik Updated test case for CSV generation Signed-off-by: Arjun Naik <anaik@redhat.com> commit: 1dc94f0588ad8177e8804a8adf3bed94333453ec author: Arjun Naik Use trim_index and add default namespace for rolebinding subject SA Signed-off-by: Arjun Naik <anaik@redhat.com> commit: 2c6032115302c4449b8843b076a59d0cf2d25fa9 author: Arjun Naik Add roles into CSV permissions Signed-off-by: Arjun Naik <anaik@redhat.com> commit: a9321bb73ef42b9e30d3ec7673ddc1b7f3c99876 author: Eric Fried csv-generate: Use the project's major.minor Finishes resolving a [TODO](openshift/boilerplate@8e99ebe#diff-424ddf34b68cef0633f4520f756a919d70a24880b5ab931d3cd85d17f8659b5fL93-R110) whereby the csv generator scripts were hardcoding the operator's major.minor version to 0.1. With this commit, common-generate-operator-bundle.py no longer accepts separate arguments for commit number or hash to construct the `{major}.{minor}.{commit-count}-{commit-hash}`. It now accepts `-V operator-version` where `operator-version` is already in that form. commit: b707cd183bce5fbe1281109cdbf211c607d054f8 author: Eric Fried Generate operator bundle generically and inclusively This is an almost-total rewrite of the common operator bundle generator script to accommodate variations in boilerplate consumers. Before: The script looked for specific files by name. This wasn't a big deal as long as consumers had the right corresponding file they could simply rename. However, it would blow up if those files weren't present or didn't contain exactly what was expected; or (importantly) if more than one file of that kind was needed. After: The script processes all yaml documents under the deploy/ subdirectory, regardless of filename, including cases where multiple yaml documents exist in a single file, and processes them based on their Kind. The following are treated specially: - CustomResourceDefinitions: These are registered as "owned" in the CSV. Otherwise they are copied into the bundle directory as usual. - ClusterRoles: These are folded into the CSV's `clusterPermissions` and *not* copied into the bundle directory. - ClusterRoleBindings: These are only used to discover the appropriate `serviceAccountName` for their corresponding ClusterRoles. They are not copied into the bundle directory. If any ClusterRoleBindings are "left over" at the end (not used to find a ServiceAccount), an error is raised. - Deployment: We explicitly validate that there is exactly one of these. We fold the contents into the CSV's `deployments`. The Deployment is *not* copied to the bundle directory. - ServiceAccounts: These are *ignored*, as we assume they correspond exactly to those listed in ClusterRoleBindings or the Deployment's Pod spec. TODO:s - The CSV [schema](https://docs.openshift.com/container-platform/4.5/rest_api/operatorhub_apis/clusterserviceversion-operators-coreos-com-v1alpha1.html) appears to support Role[Binding]s in a manner similar to ClusterRole[Binding]s. Assuming OLM supports that, we should use it. For now, this commit treats Role[Binding]s as generic resources and simply copies them into the bundle, as consumers appeared to be doing. - We should validate ServiceAccounts to make sure they correspond to [Cluster]RoleBindings or Pod specs in the Deployment, and error if any are "left over". commit: bfcccf9262c7f9cd1fa7b9c0676a03fe476a579c author: James Harrington Removed to pass tests commit: fa055ee00a16f0f25aba8542b4c441be161ce8cb author: James Harrington Include package.yaml in OLM bundle commit: 32fa7dc294da442d1333551c5554652095c3306c author: Eric Fried golang-osd-operator: Pull operator image by digest This commit tweaks the common CSV generator logic such that the operator image is referenced by digest (`{registry}/{repo}/{operator}@sha256:{digest}`) rather than by tag (`{registry}/{repo}/{operator}:v{major}.{minor}.{count}-{commit-sha}`). **NOTE:** This does not affect how the catalog image is pulled. That requires changes in the app-interface saas file and the consuming repository's OLM template. commit: 4bba942de7a8d389a46f606c798a512c0f903d9b author: Eric Fried golang-osd-operator: Enable app-sre build and deploy This commit adds the top-level script to perform the end-to-end app-sre build and deploy sequence, and enables it by default for consumers via the `build-push` make target. It also enables (and documents) local testing of this sequence without changing code. commit: dec995b5d0a456d48898807f617580ec3c54d079 author: Eric Fried Enable selecting test cases With this commit, you can use a `CASE_GLOB` variable to restrict which tests are run by `make test` (aka `make pr-check`). The value of `CASE_GLOB` is passed to `find ... -name`, so may be anything that will accept. For example, to run just the test case named `06-csv-generate`, you can run: ``` make CASE_GLOB=06-csv-generate test ``` This also works via `container-make`, which can be convenient for debugging CI failures: ``` ./boilerplate/_lib/container-make CASE_GLOB=06-csv-generate pr-check ``` commit: 8e99ebe14d1c7c547c9de3fa5d94e876fd674f8d author: Eric Fried golang-osd-operator: Pull operator image by digest This commit tweaks the common CSV generator logic such that the operator image is referenced by digest (`{registry}/{repo}/{operator}@sha256:{digest}`) rather than by tag (`{registry}/{repo}/{operator}:v{major}.{minor}.{count}-{commit-sha}`). **NOTE:** This does not affect how the catalog image is pulled. That requires changes in the app-interface saas file and the consuming repository's OLM template. commit: aeca64eaa1fee9b69d0797e7d8bf06f792a907b8 author: Eric Fried golang-osd-operator: Enable app-sre build and deploy This commit adds the top-level script to perform the end-to-end app-sre build and deploy sequence, and enables it by default for consumers via the `build-push` make target. It also enables (and documents) local testing of this sequence without changing code. commit: c937d6ab7756ea4f287ae828cd21dbd0e5415f20 author: Eric Fried Enable container-make in boilerplate itself Previously in order for `container-make` to function in the boilerplate repository itself, you had to set the `LATEST_IMAGE_TAG` environment variable manually. With this commit, if it's unset and we're in boilerplate, we discover it from git. commit: 05f546cc7e24911477b504df585f63dbd53445ba author: Eric Fried Document subscribers Add documentation for the `subscribers.yaml` file and the `subscriber` utility. commit: 10166fa7731ab847c291a85e78b4f0318f52a0b2 author: Benjamin Dematteo Fixing the bad variable used for calling the generate scripts commit: 0813021e913229a7f0c62a4f86c3a0814b627bc7 author: James Harrington Erroneous additional parameter specified commit: d7c8056d99bade30bed6fdc4d376ce979bfa8558 author: Eric Fried Pin yq to 3.4.1 in csv-generate.sh See openshift/osd-metrics-exporter#43 for details. commit: cf31f7abe2964e70b6fdef249ac984822bce0cef author: Eric Fried image-v0.5.1: registry.svc.ci.openshift.org is dead We need to build our image `FROM registry.ci.openshift.org` now, since `registry.svc.ci.openshift.org` has been decommissioned. image-v0.5.0 will never build and is therefore unusable. commit: 96415a636afa0e304dbdab60318fd4f9e2bbc825 author: Manuel Dewald add operator-sdk v1.2.0 commit: 19951d141e1c7a2b371a5ec34784e7005c073345 author: Eric Fried image-v0.5.0: more go helpers Add the following to the backing image: - controller-gen - kustomize - go-bindata commit: 262eaba2a0a13e3220e7586b5b9cd6b9be733d6e author: Rafa Porres Molina Do not evaluate main with an or conditional Not only it is not needed, it can deactivate the effect of set -e Signed-off-by: Rafa Porres Molina <rporresm@redhat.com> commit: a8324a4e572ba4568cd92d5b69c9c74d11cdce8b author: Eric Fried Fix container-make for openapi-gen `openapi-gen` is really picky about how `GOPATH` is set with respect to the path to the repo clone it's working on. And CI is really picky about where things like `go mod download` are allowed to write. With this change, we make sure the path inside `container-make`'s container gels with `GOPATH` so `openapi-gen` works as expected. Co-Authored-By: Kirk Bater <kbater@redhat.com> commit: f700776ea385de430a71398ee3e05c5304a2e502 author: Kirk Bater Adds extra debug output to isclean commit: d6e0c61cf1cba062b0ae9281adbdbf4bbf6c954b author: Benjamin Dematteo Removing explicit call to python3 commit: 048e344dd49f9fb8070808b404721c75ddfd0f72 author: Manuel Dewald Allow configuration of MAINPACKAGE and TESTTARGETS * Consuming operators may want to have a different set of TESTTARGETS * MAINPACKAGE differs for operator-sdk v1, allowing to override it will help onboarding operators on operator-sdk v1 commit: 9ac2810dcaf56eaacd9e3cc2d076961ca49ab212 author: Benjamin Dematteo Integrating comments from MR review commit: 60959312e1f456a47968bc8cc5839ee3435e6cdd author: Eric Fried golang-osd-operator: Cap concurrency for codecov Some consumers were regularly having their coverage CI pods OOM-killed. Experimenting with the prow configuration, we found we needed to set the memory limits unreasonably high to make it work. By default, cover tool runs with a number of threads equal to the detected number of CPUs. In the CI environment at this time, that appears to be 16. With this commit, we cap it at 4, which brings the memory usage down to a manageable level without unduly affecting the runtime of the job. commit: 5cf48e3eb539b9c26d8ae4999758f790175a28da author: Benjamin Dematteo Fixing tests commit: f5a20e2644ff854ff42ff7881d1e8788878d48d6 author: Benjamin Dematteo First commit for the bundle-generate commit: b86c5e0dcd7a2f664a55236dc42de87658814d4c author: Eric Fried Update subscribers The following have been onboarded and are marked as such: - aws-account-operator - aws-efs-operator - managed-upgrade-operator commit: 3dd1657739fe1ab4604f25bd5b777c8a66e9dd4c author: Rafa Porres Molina Add dry run mode to test to avoid pushes Signed-off-by: Rafa Porres Molina <rporresm@redhat.com> commit: ed0062e80fd0d826b303e87632eca0dba88f81ed author: Rafa Porres Molina Add missing push in git operations This was left behind in the refactoring made in #104 Signed-off-by: Rafa Porres Molina <rporresm@redhat.com> commit: dce934aab89c2a423ebc848c0621ecf1e6df52e6 author: Eric Fried Improvements to container-make - Run the container as self. Previously it was running as root, which had some unintended consequences, including leaving root-owned files in your repo. - If the target fails, stay in the container so you can debug. - Prints a usage statement if invoked with -h/--help.
- Loading branch information