func GenerateBases(args language.GenerateArgs, bases []string) ([]string, []resolve.ImportSpec, error)
GenerateBases generates (deprecated) base references to file srcs as well as Kustomization dependencies
func GenerateComponents(args language.GenerateArgs, components []string) []resolve.ImportSpec
GenerateComponents returns a list of resolve.ImportSpecs referring to any Component dependencies
func GenerateConfigmapGenerators(args language.GenerateArgs, cmGens []types.ConfigMapArgs) []string
GenerateConfigmapGenerators
func GenerateConfigurations(args language.GenerateArgs, configurations []string) []string
GenerateConfigurations takes a Kustomization's configurations attributes and returns a list of file srcs
func GenerateImages(resource string, imgs []string) ([]string, error)
func GeneratePatches(args language.GenerateArgs, patches []types.Patch) []string
GeneratePatches returns a list of file srcs for Patch items
func GeneratePatchesJSON6902(args language.GenerateArgs, patchesJSON6902 []types.Patch) []string
GeneratePatchesJSON6902 returns a list of file srcs for PatchesJSON6902
func GeneratePatchesStrategicMerge(args language.GenerateArgs, patchesStrategicMerge []types.Patch) ([]string, []resolve.ImportSpec, error)
GeneratePatchesStrategicMerge returns a list of file srcs for PatchStrategicMerge items
func GenerateResources(args language.GenerateArgs, resources []string) ([]string, []string, []resolve.ImportSpec, error)
GenerateResources takes a Kustomization's resource attributes and returns a list of file srcs and Kustomization dependencies as resolve.ImportSpecs
func NewLanguage() language.Language
type Kustomize struct { language.BaseLang }
func (k *Kustomize) ApparentLoads(_ func(string) string) []rule.LoadInfo
ApparentLoads maps module loads to import paths. Because this ruleset is checked in, we always return the constant path to the package.
func (k *Kustomize) GenerateRules(args language.GenerateArgs) language.GenerateResult
GenerateRules for Kustomize implements the GenerateRules function for the Gazelle Language interface
func (k *Kustomize) Imports(_ *config.Config, _ *rule.Rule, f *rule.File) []resolve.ImportSpec
Imports returns a list of ImportSpecs that can be used to import the rule r. This is used to populate RuleIndex.
If nil is returned, the rule will not be indexed. If any non-nil slice is returned, including an empty slice, the rule will be indexed.
Kustomizations refer to each other by relative path, and only allow one Kustomization per directory. This means that each Kustomization has a unique path relative to the repository root, which can be normalized from any other package.
func (k *Kustomize) Kinds() map[string]rule.KindInfo
func (k *Kustomize) KnownDirectives() []string
func (k *Kustomize) Name() string
Name returns the name of the language. It is used to identify the plugin.
func (k *Kustomize) Resolve(c *config.Config, ix *resolve.RuleIndex, _ *repo.RemoteCache, r *rule.Rule, imports interface{}, _ label.Label)