Merge pull request #123417 from soltysh/kube_codegen-applyexternal

kube_codegen: expose external-applyconfigurations flag for client generation
This commit is contained in:
Kubernetes Prow Robot 2024-02-25 16:41:31 -08:00 committed by GitHub
commit 4b3da38651
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -451,6 +451,10 @@ function kube::codegen::gen_openapi() {
# --applyconfig-name <string = "applyconfiguration">
# An optional override for the leaf name of the generated "applyconfiguration" directory.
#
# --applyconfig-externals <string = "">
# An optional list of comma separated external apply configurations locations
# in <type-package>.<type-name>:<applyconfiguration-package> form.
#
# --with-watch
# Enables generation of listers and informers for APIs which support WATCH.
#
@ -461,7 +465,7 @@ function kube::codegen::gen_openapi() {
# An optional override for the leaf name of the generated "informers" directory.
#
# --plural-exceptions <string = "">
# An optional list of comma separated plural exception definitions in Type:PluralizedType form.
# An optional list of comma separated plural exception definitions in Type:PluralizedType form.
#
function kube::codegen::gen_client() {
local in_pkg_root=""
@ -472,6 +476,7 @@ function kube::codegen::gen_client() {
local clientset_versioned_name="versioned"
local applyconfig="false"
local applyconfig_subdir="applyconfiguration"
local applyconfig_external=""
local watchable="false"
local listers_subdir="listers"
local informers_subdir="informers"
@ -517,6 +522,10 @@ function kube::codegen::gen_client() {
applyconfig_subdir="$2"
shift 2
;;
"--applyconfig-externals")
applyconfig_external="$2"
shift 2
;;
"--with-watch")
watchable="true"
shift
@ -624,6 +633,7 @@ function kube::codegen::gen_client() {
--go-header-file "${boilerplate}" \
--output-base "${out_base}" \
--output-package "${out_pkg_root}/${applyconfig_subdir}" \
--external-applyconfigurations "${applyconfig_external}" \
"${inputs[@]}"
fi