File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ function cluster::codegen::internal::grep() {
126126# --plural-exceptions <string = "">
127127# An optional list of comma separated plural exception definitions in Type:PluralizedType form.
128128#
129+ # --exclude-packages <string = "">
130+ # An optional list of comma separate group verions to exclude from
131+ # client generation.
132+ #
129133function cluster::codegen::gen_client() {
130134 local in_dir=" "
131135 local one_input_api=" "
@@ -144,6 +148,7 @@ function cluster::codegen::gen_client() {
144148 local single_cluster_listers_pkg=" "
145149 local watchable=" false"
146150 local plural_exceptions=" "
151+ local exclude_pkgs=" "
147152 local v=" ${KUBE_VERBOSE:- 0} "
148153
149154 while [ " $# " -gt 0 ]; do
@@ -212,6 +217,10 @@ function cluster::codegen::gen_client() {
212217 plural_exceptions=" $2 "
213218 shift 2
214219 ;;
220+ " --exclude-packages" )
221+ exclude_pkgs=" $2 "
222+ shift 2
223+ ;;
215224 * )
216225 if [[ " $1 " =~ ^-- ]]; then
217226 echo " unknown argument: $1 " >&2
@@ -265,7 +274,13 @@ function cluster::codegen::gen_client() {
265274
266275 dir2=" $( dirname " ${dir} " ) "
267276 leaf2=" $( basename " ${dir2} " ) "
268- group_versions+=(" ${leaf2} /${leaf} " )
277+ gv=" ${leaf2} /${leaf} "
278+
279+ if [[ " ${exclude_pkgs} " == * " ${gv} " * ]]; then
280+ continue
281+ fi
282+
283+ group_versions+=(" ${gv} " )
269284 fi
270285 done < <(
271286 ( cluster::codegen::internal::grep -l --null \
You can’t perform that action at this time.
0 commit comments