The FieldPath was not being set for nodes underneath a SequenceNode
during fieldspec's traversal. This is in part because handleSequence
uses VisitElements in contrast to a PathGetter as is done by handleMap.
The accuracy of FieldPath is more relevant now with the recently added
support of mutation trackers in filtersutil. This change fixes the
case where a mutation tracker callback is called on a SequenceNode
element and the node does not have an accurate FieldPath value.
This change updates the imagetag filter to implement the TrackableFilter
interface. This provides the functionality for the user to track which
fields were updated by the imagetag filter.
This change refactors imagetag to reuse the abstraction provided by
filtersutil. This change is intended to make imagetag more consistent
with other filters by using the same layer of abstraction (filtersutil),
and to prepare for upcoming changes which are planned to be implemented
at the filtersutil layer.
* add kio filter interface
This interface is an extension of the Filter interface which can be used
for filters which are capable of tracking which fields they mutate.
* add TrackableSetter struct to filtersutil
This struct provides an abstraction to help Filters implement the
TrackableFilter interface
* implement TrackableFilter with annotations
This updates the annotations filter to implement the TrackableFilter
interface by reusing the TrackableSetter abstraction provided by
filtersutil.
This is done to provide a generic and consistent experience across the
filters
* implement TrackableFilter with labels
This updates the labels filter to implement the TrackableFilter
interface by reusing the TrackableSetter abstraction provided by
filtersutil.
This is done to provide a generic and consistent experience across the
filters
Add a configurable callback that is invoked each time a label is applied
by the labels filter. This is useful for scenarios such as tracking
labels as they are applied.
* add origin annotation for resources generated by builtin and custom generators
* decouple origin data from generator data and account for inline generators
* Refactor prefix filter into its own filter, decoupled from the prefixsuffix filter
* Refactor prefix transformer into its own transformer, decoupled from the prefixsuffix transformer
* Refactor suffix filter into its own filter, decoupled from the prefixsuffix filter
* Refactor suffix transformer into its own transformer, decoupled from the prefixsuffix transformer
* Add a default nameSuffix field spec in addition to the namePrefix
* Remove the PrefixSuffixTransformer from the list of builtin transformers
* Add a multi-transformer to builtinhelpers.TransformFactories
* Remove the implementation of the prefixsuffixtransformer.PrefixSuffixTransformer
* Resolve style and format related feedback from the pull request
* Add test to test the legacy PrefixSuffixTransformer for BC purposes
When using the ConfigMap generator, a lease object entry is updated with the
generated configmap name. This should not happen as it's an unrelated object
type.
As a workaround a unique name can be used for the ConfigMap.
Fails on kustomize version 4.2.0 and kubectl version v1.21.2
GitHub release files like https://github.com/fluxcd/helm-controller/releases/download/v0.14.0/helm-controller.crds.yaml
seems to be hosted on Azure and it seems that there are egress limits that can be reached, e.g.:
```xml
<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>Egress is over the account limit.
RequestId:f4a46b38-001e-0046-2437-ec16e2000000
Time:2021-12-08T13:28:03.8542138Z</Message></Error>
```
This patch allows to have a clear Error message instead of just `missing Resource metadata`:
```
Error: accumulating resources: accumulation err='accumulating resources from 'https://github.com/fluxcd/source-controller/releases/download/v0.19.0/source-controller.crds.yaml': URL returned error 503 (Service Unavailable)': evalsymlink failure on '/private/var/folders/hq/ttl6jyh539q55fz6282w0jyc0000gn/T/kustomize-3508224975/releases/download/v0.19.0/source-controller.crds.yaml' : lstat /private/var/folders/hq/ttl6jyh539q55fz6282w0jyc0000gn/T/kustomize-3508224975/releases: no such file or directory
```
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Add a configurable callback that is invoked each time an
annotation is applied by the annotations filter. This is useful
for scenarios such as tracking annotations as they are applied.
Issues: GoogleContainerTools/kpt#2448