Commit Graph

53 Commits

Author SHA1 Message Date
Frank Farzan
f4e6816338 Expand documentation of annotations used in manifests and KRM functions API (#3995)
* Expand documentation of annotations used in manifests and KRM function wire format.

- Reserve `internal.config.kubernetes.io` for control annotations
- Document `local-config` annotation in a seperate document (It's
  orthogonal to KRM functions).
- There is a internal annotation that uses `config.k8s.io` instead of
  `config.kubernetes.io` used by other annotations. See [1] and [2]. We
  should avoid using two seperate annotation prefixes and audit the
  codebase for any other annotation. Given the `id` control annotation is used
  for comment preservation (no existing function should be modifying
  it), I suggest moving this over to use
  `fn-ctrl.config.kubernets.io/id`.

[1]: 7e8ba62e9f/kyaml/fn/runtime/runtimeutil/runtimeutil.go (L195)
[2]: https://github.com/kubernetes-sigs/kustomize/pull/2465

* Move path/index annotation to use internal prefix

* Clarify MUST NOT vs SHOULD NOT for internal annotations

* Update cmd/config/docs/api-conventions/functions-spec.md

Co-authored-by: Katrina Verey <kn.verey@gmail.com>

* Update cmd/config/docs/api-conventions/functions-spec.md

Co-authored-by: Katrina Verey <kn.verey@gmail.com>

* Update cmd/config/docs/api-conventions/manifest-annotations.md

Co-authored-by: Katrina Verey <kn.verey@gmail.com>

* Remove kusotmization as example

Co-authored-by: Katrina Verey <kn.verey@gmail.com>
2021-07-13 11:58:00 -07:00
Frank Farzan
58165dfc89 comments 2021-06-02 10:53:49 -07:00
Frank Farzan
0e8257c387 comments 2021-06-02 10:50:39 -07:00
Frank Farzan
3ee1579688 Fully specify KRM Functions Spec and graduate it to v1.
- Define the OpenAPI schema for ResourceList
- Graduate `ResourceList` to apiVersion `v1`. Many functions have been implemented
  and we are effectively treating the spec as backwards compatible.
- Add `results` field to the spec. This has been implemented in the
  orchestrator and couple of functions libraries for a while, but hasn't been
  yet standardized leading to minor discrepencies. Concurrent to this PR,
  we need to udpate the fn framework (kyaml) to be compatible with
  the standard and update the orchestrator to be backwards compatible.
- Include per-resource annotations (previously a seperate doc)
- Remove support for non-ResourceList wire formats. In practice, this is
  not widely used and complicates the standard. The orchestrators can
  easily covert a List to a ResourceList.
2021-05-25 16:09:32 -07:00
Asbjørn Apeland
9d0fba81f0 Use Cobra for shell completion 2020-10-16 18:55:54 +02:00
Jeff Regan
6c6b5f744d Merge pull request #2641 from jijiew/doc
doc for kustomize config delete setter
2020-07-13 11:38:43 -07:00
Pedro Tôrres
94095a63ff Update function annotation on docs
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com>
2020-07-04 18:19:28 -03:00
Jijie Wei
b92de5cb80 revert change in generated doc 2020-06-23 14:17:39 -07:00
Mikhail Mazurskiy
0772540214 Drop github.com/ghodss/yaml dependency 2020-06-21 20:35:50 +10:00
Phillip Wittrock
701c217791 Refactor kustomize config command structure
- Create cfg, fn, live parent commands
2020-06-06 08:50:41 -07:00
Kubernetes Prow Robot
72dc895c52 Merge pull request #2552 from pwittrock/krm
Write setter definitions to `Krmfile` instead of `kustomization`
2020-06-05 10:01:46 -07:00
Phillip Wittrock
075846c731 Support initializing a directory with a Krmfile 2020-06-03 11:56:59 -07:00
Dan Slinky @ Cookpad
8d148c7ee4 Update set.md examples to use correct field name 2020-05-28 13:36:12 +01:00
Tobias Bradtke
8c18970b56 Fix formating of example 2020-04-20 18:33:22 +02:00
bzub
24988df444 config: update docs to use list-setters. 2020-03-30 12:42:37 -05:00
Phillip Wittrock
90e1dbe5d0 cmd/config: support for stdin/stdout in source/sink 2020-02-05 17:24:45 -08:00
HowJMay
00f68c12a8 fix typos
Fix typos
2020-01-23 23:35:38 +08:00
Phillip Wittrock
d49b8cdf90 add annotate command to cmd/config 2020-01-15 21:03:22 -08:00
Phillip Wittrock
77b59760c1 Support for source and sink with functions 2020-01-07 16:24:52 -08:00
Phillip Wittrock
0cae0feb9b rename config.k8s.io/function to config.kubernetes.io/function 2020-01-07 16:24:49 -08:00
Frank Farzan
3276e74d2d Generalize configuration functions spec in RFC format.
As defined in `kustomize config docs-fn-spec`, configuration functions can be
implemented using any toolchain and invoked using any container workflow orchestrator
(e.g. Tekton, Cloud Build) or run directly using docker run.

functions-impl describes using `kustomize config run` as an example
orchestrator for invoking configuration functions.
2020-01-07 12:51:24 -08:00
Kubernetes Prow Robot
837df94d67 Merge pull request #2027 from prachirp/configFnDocs
Docs and examples use config.k8s.io/function annotation
2020-01-06 11:00:19 -08:00
Prachi Pendse
6b90f13281 Clarify docs messaging 2020-01-06 13:05:24 +05:30
Phillip Wittrock
d489bdedd7 publish list-setters command 2020-01-04 09:39:56 -08:00
Prachi Pendse
5ee6380b1c Docs and examples use config.k8s.io/function annotation
- Update function docs to recommend new annotation
- Update examples to use config.k8s.io/function annotation
2020-01-03 10:52:56 +05:30
Phillip Wittrock
b37abbf057 Refactor set
- Implement inline setters as OpenAPI extensions
- Naming cleanup substitute -> set
- Documentation cleanup
- Simplify implementation
2020-01-02 08:32:38 -08:00
Kubernetes Prow Robot
3bef339186 Merge pull request #1890 from joncwong/merge3
Integrate merge3 as command for 3-way merges
2020-01-02 07:43:41 -08:00
Katrina Verey
24cf0c1fdc config tree defaults to graph structure when ownerRefs available 2019-12-23 16:36:25 -05:00
Jonathan Wong
e35e0bff60 Update docs for merge3 2019-12-20 03:48:29 -08:00
Jonathan Wong
aafeb75ef1 Rebase merge3 branch into master 2019-12-20 03:43:11 -08:00
Kubernetes Prow Robot
32b55109f7 Merge pull request #1978 from oke-py/doc
Fixed a wrong path and run `make all`
2019-12-17 16:39:58 -08:00
Phillip Wittrock
502f86a982 rename ownedBy json value to setBy 2019-12-17 11:50:18 -08:00
Naoki Oketani
7a384bc0d8 Fixed a wrong path and run make all 2019-12-17 18:22:49 +09:00
Kubernetes Prow Robot
b38c0bc5c1 Merge pull request #1962 from pwittrock/sub
Support for set / substitution
2019-12-16 13:39:38 -08:00
Phillip Wittrock
62e969c719 cmd/config set: Support for setting fields imperatively from the cli 2019-12-16 10:39:55 -08:00
Phillip Wittrock
53db9b8de4 Revert "Fixed a wrong path and run make generate" 2019-12-16 09:29:22 -08:00
Kubernetes Prow Robot
2fc224c2ff Merge pull request #1965 from prachirp/config-doc
Clarify removing annotations in config-io
2019-12-16 09:27:38 -08:00
Naoki Oketani
6fbab07df5 Fixed a wrong path and run make generate 2019-12-16 12:57:15 +09:00
Prachi Pendse
b5dba5b4da Clarify removing annotation in config-io 2019-12-13 16:43:50 -08:00
bzub
3803541bfd Remove extraneous whitespace.
make all (generate docs)

Update examples in cmd docs.

make all (generate docs)

functions/examples: Whitespace cleanup.

functions/examples: Fix some example commands.
2019-12-11 12:12:32 -06:00
Frank Farzan
b0f1f66d9a Document the default value 2019-12-10 12:27:02 -08:00
Frank Farzan
8c037ba109 Index is a number not a string 2019-12-10 12:15:28 -08:00
Frank Farzan
5e5e3b19f5 Expand and format Configuration IO API Semantics. 2019-12-10 12:02:49 -08:00
Phillip Wittrock
2eacbeaa87 shell completion for kustomize commands 2019-12-09 09:22:14 -08:00
Jonathan Wong
49287a0f8f Fix verb noun agreement mistake 2019-12-02 02:01:00 -08:00
Jonathan Wong
1433ea4faa Fix two typos 2019-12-02 01:55:20 -08:00
Phillip Wittrock
52a5e6ec99 rename run-fns to run 2019-11-27 12:40:10 -08:00
Phillip Wittrock
7ce1f7e95a Update cmd/config docs from using yaml to using kustomize config 2019-11-27 11:59:45 -08:00
Phillip Wittrock
dc66de6bf3 cmd/config: Add examples and tutorials for config functions
- Add examples under `functions`
- Add built-in tutorial for functions
2019-11-26 20:08:23 -08:00
Phillip Wittrock
5876a8cce0 cmd/config: add built-in tutorials 2019-11-25 22:48:21 -08:00