1 // Copyright 2024 The Kubernetes Authors. 2 // SPDX-License-Identifier: Apache-2.0 3 4 // The build tag "kustomize_disable_go_plugin_support" is used to deactivate the 5 // kustomize API's dependency on the "plugins" package. This is beneficial for 6 // applications that need to embed it but do not have requirements for dynamic 7 // Go plugins. 8 // Including plugins as a dependency can lead to an increase in binary size due 9 // to the population of ELF's sections such as .dynsym and .dynstr. 10 // By utilizing this flag, applications have the flexibility to exclude the 11 // import if they do not require support for dynamic Go plugins. 12 //go:build kustomize_disable_go_plugin_support 13 14 package loader 15 16 import ( 17 "sigs.k8s.io/kustomize/api/resmap" 18 "sigs.k8s.io/kustomize/kyaml/errors" 19 "sigs.k8s.io/kustomize/kyaml/resid" 20 ) 21 22 func (l *Loader) loadGoPlugin(_ resid.ResId, _ string) (resmap.Configurable, error) { 23 return nil, errors.New("plugin load is disabled") 24 } 25