mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-02-15 00:07:52 +08:00
Generate applyconfigurations and openapi for sample-controller
Signed-off-by: Maciej Szulik <soltysh@gmail.com> Kubernetes-commit: c45c6f184233227e49ab9bceacb709a229b756dd
This commit is contained in:
committed by
Kubernetes Publisher
parent
911fcef705
commit
c7133c2f84
@@ -29,8 +29,26 @@ kube::codegen::gen_helpers \
|
||||
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
|
||||
"${SCRIPT_ROOT}/pkg/apis"
|
||||
|
||||
if [[ -n "${API_KNOWN_VIOLATIONS_DIR:-}" ]]; then
|
||||
report_filename="${API_KNOWN_VIOLATIONS_DIR}/sample_controller_violation_exceptions.list"
|
||||
if [[ "${UPDATE_API_KNOWN_VIOLATIONS:-}" == "true" ]]; then
|
||||
update_report="--update-report"
|
||||
fi
|
||||
fi
|
||||
|
||||
kube::codegen::gen_openapi \
|
||||
--output-dir "${SCRIPT_ROOT}/pkg/generated/openapi" \
|
||||
--output-pkg "k8s.io/${THIS_PKG}/pkg/generated/openapi" \
|
||||
--report-filename "${report_filename:-"/dev/null"}" \
|
||||
--output-model-name-file "zz_generated.model_name.go" \
|
||||
${update_report:+"${update_report}"} \
|
||||
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
|
||||
"${SCRIPT_ROOT}/pkg/apis"
|
||||
|
||||
kube::codegen::gen_client \
|
||||
--with-watch \
|
||||
--with-applyconfig \
|
||||
--applyconfig-openapi-schema <(go run k8s.io/sample-controller/pkg/generated/openapi/cmd/models-schema) \
|
||||
--output-dir "${SCRIPT_ROOT}/pkg/generated" \
|
||||
--output-pkg "${THIS_PKG}/pkg/generated" \
|
||||
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
|
||||
|
||||
Reference in New Issue
Block a user