Commit Graph

99 Commits

Author SHA1 Message Date
Andrew Lavery
2e7ad48b44 properly omitempty for 'inventory' in 'kustomize'
with the current 'yaml:"inventory:omitempty"', 'inventory:omitempty' is used as the literal name for the yaml field
2019-08-29 14:41:03 -07:00
jingfangliu
35481ec6d9 add inline patch support for Strategic Merge Patch and JSON patch 2019-07-29 14:10:57 -07:00
Jerome Brette
b7405f3872 Test new types.Var.DeepEqual method. 2019-07-25 03:50:28 +00:00
Jerome Brette
abc419b5f9 Add Absorb method to VarSet and DeepEqual to Var 2019-07-25 03:42:40 +00:00
Kubernetes Prow Robot
5747c417c4 Merge pull request #1363 from Liujingfang1/patch
update edit fix to convert the old patches to patchesStrategicMerge
2019-07-23 13:16:14 -07:00
jingfangliu
8c53d77111 update edit fix to convert the old patches to patchesStrategicMerge 2019-07-23 10:38:48 -07:00
Jerome Brette
99eb08eb1e Add Namespace to var definition to allow disambiguation 2019-07-19 12:08:38 -05:00
jingfangliu
a85f297f31 enable extended patch transformer and add tests 2019-07-15 15:45:08 -07:00
Jeff Regan
58faa762cb Merge pull request #1275 from Liujingfang1/patches
add function to find all matched patch targets
2019-06-29 09:36:53 -07:00
jingfangliu
349cfff1cb add function to find all matched patch targets 2019-06-28 17:12:02 -07:00
Jeffrey Regan
233b3613ae Add ObjectMeta type. 2019-06-28 14:39:56 -07:00
jingfangliu
039f7669df add type for extended patches 2019-06-26 09:01:17 -07:00
jregan
a7df00c07a Starting v3 release for plugin developers.
[doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Per this Go modules [doc] a repo or branch that's
already tagged v2 or higher should increment the major
version (e.g. go to v3) when releasing their first Go
module-based packages.

At the moment, the kustomize repo has these top level
packages in the sigs.k8s.io/kustomize module:

 - `cmd` - holds main program for kustomize

	 Conceivably someone can depend on this
	 package for integration tests.

 - `internal` - intentionally unreleased subpackages

 - `k8sdeps` - an adapter wrapping k8s dependencies

	 This exists only for use in pre-Go-modules kustomize-into-kubectl
	 integration and won't live much longer (as everything involved is
	 switching to Go modules).

 - `pkg` - kustomize packages for export

	 This should shrink in later versions, since
	 the surface area is too large, containing
	 sub-packages that should be in 'internal'.

 - `plugin` - holds main programs for plugins

This PR changes the top level go.mod file from

```
module sigs.k8s.io/kustomize
```

to

```
module sigs.k8s.io/kustomize/v3
```

and adjusts all import statements to
reflect the change.
2019-06-23 15:05:59 -07:00
Ian Howell
b1cdf581d0 Change the backing data structure of VarSet from slice to map
This will speed up most operations performed on a large set of Vars
2019-06-21 17:28:57 -05:00
Jeff Regan
7dd02c1766 Merge pull request #1111 from keleustes/master
Improvment var and varRefs handling
2019-06-18 14:17:27 -07:00
Ian Howell
ed03818e20 This commit enhances the UnstructAdapter
* Added support for arbitrary data types rather than just strings
* Added support for integer index-able arrays
* Improve code coverage for kunstruct
  - kunstruct around 90%
  - helper at 100%
* Update expansion.Expand method to preserve the original type of the variable
* Ensure the int field such .spec.replicas can be used
  as a source in a first Deployment or as destination of a variable (in the
  second Deployment variable).
2019-06-18 13:43:01 -05:00
Jeffrey Regan
cc531af665 Deprecate 'bases:' field. 2019-06-18 10:36:58 -07:00
Damien Robichaud
8d4b6452d4 Make the replica transformer kind aware.
The previous implementation had a bug and poorly handled
types that should not have a `spec: replica:` field.

Documentation is updated to reflect the change in behavior,
and better highlights the cases where a patch should be
used instead of this shorthand.
2019-06-17 11:33:31 -07:00
Jeffrey Regan
798b61c8ef Add copy method to VarSet 2019-06-07 13:22:07 -07:00
Jeffrey Regan
d9b0c4c84c Add copy method to VarSet 2019-06-07 13:01:34 -07:00
Jeffrey Regan
81c98c855f Convert inventory transformer to plugin, reduce k8sdeps. 2019-06-02 10:49:01 -07:00
Damien Robichaud
d4842ebd90 Cleanup the replica plugin implementation. 2019-05-31 13:28:51 -07:00
Damien Robichaud
5000a2e503 Implement replica transformer as patch alternative 2019-05-31 13:10:34 -07:00
jregan
47c965481f Reduce k8ds deps 2019-05-27 15:37:03 -07:00
Jeffrey Regan
6a10654618 Delete the KV plugin code. 2019-05-24 16:49:16 -07:00
Jeffrey Regan
b28aaae66b Break a bad dep. 2019-05-22 07:39:36 -07:00
jregan
a352ff3923 True and false are mysterious. 2019-05-21 10:58:43 -07:00
Jingfang Liu
61d46c26b8 fix the boilerplate copyright header (#1064) 2019-05-10 10:20:20 -07:00
Jeffrey Regan
529db0493b Introduce envs field. 2019-05-06 14:35:48 -07:00
Jingfang Liu
b4fc1e4357 change field name: prune -> inventory 2019-04-22 11:25:14 -07:00
Jingfang Liu
f6e01cfda7 add support for exec plugins 2019-04-16 09:26:38 -07:00
Jingfang Liu
e9a3f9f5f6 address comments 2019-04-08 15:17:18 -07:00
Jingfang Liu
826affb8dd generate configmap for pruning 2019-04-08 14:10:49 -07:00
jregan
16fe7ced6a Cleanup plugin builds. 2019-04-06 13:16:46 -07:00
Jingfang Liu
deaf0779a1 add generators/transformers fields in kusotmization.yaml 2019-04-03 14:05:25 -07:00
Jeffrey Regan
3a7c8a03f4 Make builtin the default pluginType 2019-03-18 10:21:24 -07:00
jregan
103c1b3a4f Put goplugins behind flag. 2019-03-17 13:39:48 -07:00
Seth Pollack
18f6328284 add secret and configmap generator plugins 2019-03-15 14:28:18 -04:00
CodeLingo Bot
9a4692e6ee Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-03-11 00:45:21 +00:00
Jeffrey Regan
48717f3f30 Switch to black box testing of KustTarget and Resource 2019-02-11 16:40:09 -08:00
Jingfang Liu
e905704b0c allow apiVersion and Kind to be empty or specific values 2019-02-04 13:08:09 -08:00
Kubernetes Prow Robot
713c06354f Merge pull request #748 from Liujingfang1/version
add group name as kustomize.config.k8s.io
2019-02-01 13:54:36 -08:00
Jingfang Liu
84057436d6 Combine generatorArgs and generatorOptions into options of Resource 2019-01-31 15:32:32 -08:00
Jingfang Liu
199763dec8 add group name to kustomize.config.k8s.io 2019-01-30 09:48:12 -08:00
Jingfang Liu
c461f1f766 remove patches and imageTags from kustomization.yaml 2019-01-25 14:26:17 -08:00
Jeff Regan
a9dff35a24 Merge pull request #707 from narg95/feature/add-set-image-command
add set image command
2019-01-23 09:29:57 -08:00
jregan
d141b2421c DataSources is now common to Secrets and ConfigMaps. 2019-01-22 18:57:11 -08:00
Nestor
b22e43a4a7 add set image command 2019-01-21 11:01:15 +01:00
Kubernetes Prow Robot
2c1be17fe7 Merge pull request #704 from narg95/feature/add-image-transformer
Add image transformer
2019-01-18 09:17:06 -08:00
Nestor
6616b25d66 fix comment 2019-01-17 16:02:14 +01:00