Skip to content

Commit

Permalink
Merge pull request #793 from bryantbiggs/fix/codegen
Browse files Browse the repository at this point in the history
fix: Correct codgen script due to deprecated script removal
  • Loading branch information
k8s-ci-robot authored Dec 26, 2024
2 parents e9aa152 + f863e9e commit 3ff7f15
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 327 deletions.
26 changes: 15 additions & 11 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
CODE_GEN_VERSION=$(go mod edit -print |grep 'k8s.io/code-generator' | cut -f2 -d' ')
CODE_GEN_PKG=${CODE_GEN_PKG:-$GOPATH/pkg/mod/k8s.io/code-generator\@${CODE_GEN_VERSION}}
chmod +x ${CODE_GEN_PKG}/kube_codegen.sh
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
"${CODE_GEN_PKG}"/kube_codegen.sh "deepcopy,client,informer,lister" \
sigs.k8s.io/aws-iam-authenticator/pkg/mapper/crd/generated sigs.k8s.io/aws-iam-authenticator/pkg/mapper/crd/apis \
iamauthenticator:v1alpha1 \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt

# To use your own boilerplate text append:
# --go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt
AUTHENTICATOR_ROOT="${SCRIPT_ROOT}/pkg/mapper/crd"
AUTHENTICATOR_PKG="sigs.k8s.io/aws-iam-authenticator"

source "${CODE_GEN_PKG}/kube_codegen.sh"

kube::codegen::gen_helpers \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
"${AUTHENTICATOR_ROOT}/apis" \

kube::codegen::gen_client \
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
--output-dir "${AUTHENTICATOR_ROOT}/generated" \
--output-pkg "${AUTHENTICATOR_PKG}/pkg/mapper/crd/generated" \
--with-watch \
"${AUTHENTICATOR_ROOT}/apis" \

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 33 additions & 10 deletions pkg/mapper/crd/generated/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions pkg/mapper/crd/generated/clientset/versioned/doc.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ff7f15

Please sign in to comment.