Don't embed plural exceptions in tools
This commit is contained in:
		| @@ -37,6 +37,7 @@ API_KNOWN_VIOLATIONS_DIR="${API_KNOWN_VIOLATIONS_DIR:-"${KUBE_ROOT}/api/api-rule | |||||||
| OUT_DIR="_output" | OUT_DIR="_output" | ||||||
| BOILERPLATE_FILENAME="hack/boilerplate/boilerplate.generatego.txt" | BOILERPLATE_FILENAME="hack/boilerplate/boilerplate.generatego.txt" | ||||||
| APPLYCONFIG_PKG="k8s.io/client-go/applyconfigurations" | APPLYCONFIG_PKG="k8s.io/client-go/applyconfigurations" | ||||||
|  | PLURAL_EXCEPTIONS="Endpoints:Endpoints" | ||||||
|  |  | ||||||
| # Any time we call sort, we want it in the same locale. | # Any time we call sort, we want it in the same locale. | ||||||
| export LC_ALL="C" | export LC_ALL="C" | ||||||
| @@ -642,6 +643,7 @@ function codegen::clients() { | |||||||
|         --output-pkg="k8s.io/client-go" \ |         --output-pkg="k8s.io/client-go" \ | ||||||
|         --clientset-name="kubernetes" \ |         --clientset-name="kubernetes" \ | ||||||
|         --input-base="k8s.io/api" \ |         --input-base="k8s.io/api" \ | ||||||
|  |         --plural-exceptions "${PLURAL_EXCEPTIONS}" \ | ||||||
|         --apply-configuration-package "${APPLYCONFIG_PKG}" \ |         --apply-configuration-package "${APPLYCONFIG_PKG}" \ | ||||||
|         $(printf -- " --input %s" "${gv_dirs[@]}") \ |         $(printf -- " --input %s" "${gv_dirs[@]}") \ | ||||||
|         "$@" |         "$@" | ||||||
| @@ -682,6 +684,7 @@ function codegen::listers() { | |||||||
|         --go-header-file "${BOILERPLATE_FILENAME}" \ |         --go-header-file "${BOILERPLATE_FILENAME}" \ | ||||||
|         --output-dir "${KUBE_ROOT}/staging/src/k8s.io/client-go/listers" \ |         --output-dir "${KUBE_ROOT}/staging/src/k8s.io/client-go/listers" \ | ||||||
|         --output-pkg "k8s.io/client-go/listers" \ |         --output-pkg "k8s.io/client-go/listers" \ | ||||||
|  |         --plural-exceptions "${PLURAL_EXCEPTIONS}" \ | ||||||
|         "${ext_apis[@]}" \ |         "${ext_apis[@]}" \ | ||||||
|         "$@" |         "$@" | ||||||
|  |  | ||||||
| @@ -724,6 +727,7 @@ function codegen::informers() { | |||||||
|         --single-directory \ |         --single-directory \ | ||||||
|         --versioned-clientset-package "k8s.io/client-go/kubernetes" \ |         --versioned-clientset-package "k8s.io/client-go/kubernetes" \ | ||||||
|         --listers-package "k8s.io/client-go/listers" \ |         --listers-package "k8s.io/client-go/listers" \ | ||||||
|  |         --plural-exceptions "${PLURAL_EXCEPTIONS}" \ | ||||||
|         "${ext_apis[@]}" \ |         "${ext_apis[@]}" \ | ||||||
|         "$@" |         "$@" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -69,7 +69,6 @@ func New() *Args { | |||||||
| 		ClientsetAPIPath:          "/apis", | 		ClientsetAPIPath:          "/apis", | ||||||
| 		ClientsetOnly:             false, | 		ClientsetOnly:             false, | ||||||
| 		FakeClient:                true, | 		FakeClient:                true, | ||||||
| 		PluralExceptions:          []string{"Endpoints:Endpoints"}, |  | ||||||
| 		ApplyConfigurationPackage: "", | 		ApplyConfigurationPackage: "", | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
| @@ -40,8 +40,7 @@ type Args struct { | |||||||
| // New returns default arguments for the generator. | // New returns default arguments for the generator. | ||||||
| func New() *Args { | func New() *Args { | ||||||
| 	return &Args{ | 	return &Args{ | ||||||
| 		SingleDirectory:  false, | 		SingleDirectory: false, | ||||||
| 		PluralExceptions: []string{"Endpoints:Endpoints"}, |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -35,9 +35,7 @@ type Args struct { | |||||||
|  |  | ||||||
| // New returns default arguments for the generator. | // New returns default arguments for the generator. | ||||||
| func New() *Args { | func New() *Args { | ||||||
| 	return &Args{ | 	return &Args{} | ||||||
| 		PluralExceptions: []string{"Endpoints:Endpoints"}, |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
| // AddFlags add the generator flags to the flag set. | // AddFlags add the generator flags to the flag set. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tim Hockin
					Tim Hockin