-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Description of the change** Code generation wasn't working. This PR fixes it and updates the generated code: - Use latest version of `controller-gen` to generate the manifests for the CRD - Use `kube_codegen.sh` to generate the client code. The `generate_groups.sh` script we were using previously has been deprecated and removed. - Code generation is now done from a `hack` directory following the [Kubernetes sample-controller example](https://github.com/kubernetes/sample-controller/blob/master/hack/update-codegen.sh). - `make manifests` has been run to update the manifests. - `make generate` has been run to update the generated code. --------- Signed-off-by: Alejandro Moreno <[email protected]>
- Loading branch information
Showing
10 changed files
with
120 additions
and
48 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
File renamed without changes.
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||
CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)} | ||
|
||
source "${CODEGEN_PKG}/kube_codegen.sh" | ||
|
||
THIS_PKG="github.com/bitnami-labs/sealed-secrets" | ||
|
||
kube::codegen::gen_helpers \ | ||
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \ | ||
"${SCRIPT_ROOT}/pkg/apis" | ||
|
||
kube::codegen::gen_client \ | ||
--with-watch \ | ||
--output-dir "${SCRIPT_ROOT}/pkg/client" \ | ||
--output-pkg "${THIS_PKG}/pkg/client" \ | ||
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \ | ||
"${SCRIPT_ROOT}/pkg/apis" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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