Commit Graph

60 Commits

Author SHA1 Message Date
Jerome Brette
2faf4a491b Force the namespace value for the "default" service object.
The clusterrolebinding and rolebinding is pointing at a resource
which is not listed in the kustomize
2019-07-25 22:43:59 +00:00
Jerome Brette
f649b62629 Update Namespace and Name simultaneously (1/2)
- Removed RoleBinding and Webhook specific code in the namespacetransformer.
  That code was attempting to perform the task of the namereference
- Updated namereference transformer configuration to suppport the
  Webhooks.
- Prevent the namereference from wiping out the namespace value if
  no referral candidate was selected
- Added unit tests.
2019-07-23 11:04:52 -05:00
Jerome Brette
579995dc8a Address simultaneous transformation of name and namespace
Namereference handler needs to address simulatenous change of
name and namespace in ClusterRoleBinding for instance.
2019-07-16 18:17:33 -05:00
Jerome Brette
c4d899f7f3 Improve NameReference Test cases
- Add more NameReference Namespace tests
- Address issue when mixing empty/no namespace and default namespace.
- Address ClusterRoleBinding subjects field pointing at multiple namespaces.
2019-07-16 18:17:33 -05:00
Yujun Zhang
08d7c35da7 Add storage class name ref 2019-07-14 10:05:19 +08:00
Yujun Zhang
876f2a8236 Fix missing nameReference in default config
Related to #1322
2019-07-11 19:46:29 +08:00
Matthew M. Boedicker
0d87cd6ba1 Add support for nginx.ingress.kubernetes.io/auth-tls-secret 2019-07-02 20:17:16 -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
Jerome Brette
e3a46cb6ce Leverage new variables during testing
Extract the HTTP port (int) from the container section end
use it in the service definition.

Also enable variable replacement for Service object.
2019-06-18 18:37:20 -05:00
Jeff Regan
7ce6181bce Merge pull request #610 from twz123/transformer-no-create-arrays
Proposal: Make transformer configs array-aware
2019-06-17 16:22:09 -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
Tom Wieczorek
03e518f0ea Merge branch 'master' into transformer-no-create-arrays 2019-05-29 12:18:59 +02:00
wlezzar
e6d1de0d72 fix commonLabels spec for volumeClaimTemplates 2019-05-28 22:27:28 +02:00
Tom Wieczorek
c2eda0a172 Merge branch 'master' into transformer-no-create-arrays 2019-05-28 11:27:04 +02:00
Tom Wieczorek
c470982ce5 Make transformer configs array-aware
If path segments end with the special marker `[]` in transformer configs, this
indicates that the respective path segment is supposed to be an array. That
information may be used to suppress the meaningless creation of non-existent
paths that should be arrays, not objects.
2019-05-28 11:26:33 +02:00
Jian Qiu
68f6b0be6e Add Webhookconfiguration in default name references 2019-05-28 14:02:32 +08:00
jregan
47c965481f Reduce k8ds deps 2019-05-27 15:37:03 -07:00
Jian Qiu
8f413f523c Add name reference of storageClass 2019-05-22 14:43:15 +08:00
rohitsardesai83
b67d713bc0 Remove dependency on ghodss/yaml 2019-04-25 23:47:01 +05:30
Jeffrey Regan
8991bcb399 Collect existing internal pkgs under one roof. 2019-04-23 11:53:50 -07:00
Alastair Firth
5be42092af Vars should expand in ingress/spec/tls/secretName
https://github.com/kubernetes-sigs/kustomize/issues/799
2019-04-16 23:36:05 +02:00
Michael Heyvaert
4848987a1f fix configmap/secret name references for cronjobs with projected volumes 2019-03-29 09:00:00 +01:00
Kubernetes Prow Robot
2c0c0c9497 Merge pull request #841 from yujunz/transformers/image
Support custom configuration for image transformer
2019-03-19 14:08:22 -07:00
Yujun Zhang
7130e3ff1d Leave defautconfig empty for images
`containers` and `initContainers` of *ANY* kind in *ANY*
path are builtin supported in code
2019-03-17 16:43:31 +08:00
Yujun Zhang
f311ba8d4f Support custom config for image transformer 2019-03-17 16:43:31 +08:00
Yujun Zhang
3e85c4589b Load default config for image transformer 2019-03-17 16:43:31 +08:00
Jesse Dubay
31091a8df2 Fix missing varrefs for CronJob, Job, ReplicaSet 2019-03-16 19:15:56 -07:00
Jesse Dubay
e207ae4c01 Fix incorrect default varrefs for CronJob volumeMounts 2019-03-16 19:12:58 -07:00
Jesse Dubay
3011f18047 Sort default varReference config by kind, path 2019-03-16 19:11:42 -07:00
Yordi Pauptit
62d3200e4f fix typo in namereference where serviceaccount name would not resolve 2019-03-14 09:36:21 +01:00
Yordi Pauptit
f7cd44be42 add job initcontainer to varreference config 2019-03-11 15:13:58 +01:00
mnatsu31
559efd6477 Fix typo in namereference path for cronjobs initContainers. 2019-03-08 13:20:34 +09:00
Jingfang Liu
28cefb3bd1 improve error message for loading files listed under crds 2019-03-04 16:32:01 -08:00
Yujun Zhang
901455eb0b Add Pod initContainer to var reference 2019-02-24 11:36:09 +08:00
Nestor
8c93f7ba74 add support for varref in maps values 2019-02-14 08:02:32 +01:00
Nestor
9837b5b429 add volumeMounts/mountPath to varreference
Signed-off-by: Nestor <nesterran@gmail.com>
2019-02-11 07:52:45 +01:00
Michael Goodness
bf18cf2d9e Add Service nameReference to APIService
Signed-off-by: Michael Goodness <mgoodness@gmail.com>
2019-01-31 09:20:49 -06:00
jregan
35daae1715 Delete some dead code and fix nits. 2019-01-29 14:13:46 -08:00
Christopher Schmidt
feb0502cb4 added DaemonSet 2019-01-28 12:39:44 +01:00
Jeffrey Regan
60dc3aa09d Don't force all config to be explicit. 2019-01-11 11:34:12 -08:00
jregan
032fffe111 Drain more code from kusttarget. 2019-01-06 14:44:46 -08:00
jregan
93ad371400 Fix some comments and format nits. 2018-12-30 07:40:30 -08:00
jregan
8c994725cb Check for config merge conflicts and duplication. 2018-12-29 08:31:59 -08:00
Maximilian Gaß
8cecccbc88 Add spec/jobTemplate/metadata/labels to common labels transformer 2018-12-14 14:52:25 +01:00
Richard Marshall
506c4a330d Add projected secret path to transformer config
Projected volumes can include values sourced from secrets that might be
managed by kustomize. To support this use case this patch updates the
name reference transformer configuration to include a field spec for
projected secrets.
2018-12-10 12:41:58 -08:00
Steffen Kreutz
252cf3723c Add support for variable subsitution in Ingress hosts 2018-12-07 10:02:08 +01:00
Jingfang Liu
931f43f8d7 resolve namereference in an array 2018-12-04 15:42:26 -08:00
jregan
4f9d00c021 Enforce relocatabile kustomizations. 2018-11-22 09:07:05 -08:00
zoncoen
d481dbad62 combine transformers 2018-11-15 18:49:36 +09:00
zoncoen
93094c78eb add transformer for appending suffix 2018-11-14 12:46:58 +09:00