Skip to content

WIP: Improve version output 2617 #4976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cailyn-codes
Copy link
Contributor

working from: #4630

Still need to do more testing

KnVerey and others added 30 commits November 25, 2022 19:03
* Calculate localized path for remote file

* Add documentation
* Load and filter built-in plugins

* Improve readability

* Process plugins as resources instead of bytes

* Throw error for validators

* Differentiate generators, transformers processing

* Enable validators

* add wrapper error
* improve documentation
Fixed bug where an explicitly set null value in yaml was
cleared, even when the patch did not operate on that field.
* encapsulate kusttarget params
* change dst to string
* ConfirmDir
This allows name references to them to be correctly resolved
kubernetes-sigs#4900)

* initial commit to refactor 7 return values in parseGitUrl to RepoSpec

* fix review comments
* api: Add new types for customizeable resource ordering

Signed-off-by: Yannis Zarkadas <[email protected]>

* plugins: Implement SortOrderTransformer plugin

Implement the SortOrderTransformer plugin. This plugin allows the user
to customize the order that kustomize will output resources in.

The API for the plugin is the following:

sortOptions:
  order: legacy | fifo
  legacySortOptions:
    orderFirst:
    - {GVK}
    orderLast:
    - {GVK}

Signed-off-by: Yannis Zarkadas <[email protected]>

* plugins: Add boilerplate and generate code for new SortOrderTransformer

Signed-off-by: Yannis Zarkadas <[email protected]>

* build: Add option to denote if the reorder flag was set by the user

We want to take different actions if the reorder flag was set by the
user or filled by the default value. Thus, we propagate this information
from build to the krusty options.

Signed-off-by: Yannis Zarkadas <[email protected]>

* api/krusty: Ensure sort ordering works with CLI flag and kustomization

Sort order can be defined in two places:
- (new) kustomization file
- (old) CLI flag
We want the kustomization file to take precedence over the CLI flag.

Eventually, we may want to move away from having a CLI flag altogether:
kubernetes-sigs#3947

Case 1: Sort order set in kustomization file AND in CLI flag.
Print a warning and let the kustomization file take precedence.

Case 2: Sort order set in CLI flag only or not at all.
Follow the CLI flag (defaults to legacy) and reorder at the end.

Case 3: Sort order set in kustomization file only.
Simply build the kustomization.

Signed-off-by: Yannis Zarkadas <[email protected]>

* krusty: Add e2e test for SortOrderTransformer

Signed-off-by: Yannis Zarkadas <[email protected]>

* plugins: Purge LegacyOrderTransformer

Signed-off-by: Yannis Zarkadas <[email protected]>

* Update go.work.sum

Signed-off-by: Yannis Zarkadas <[email protected]>

* review: Make review changes

Signed-off-by: Yannis Zarkadas <[email protected]>

Signed-off-by: Yannis Zarkadas <[email protected]>
Signed-off-by: Yannis Zarkadas <[email protected]>
…4894)

* Localize configMapGenerator, secretGenerator fields

* Improve readability

* Expose kv parseFileSource

* Add localizeGenerator to Localizer

* Improve and test ParseFileSource error messages
…4789)

* Replacements should throw errors on invalid targets

* Refactor to satisfy complexity linter

* Move new tests to filter suite
…igs#4886)

* Ahead-of-time wildcard path expansion solution

* Wrapped PathGetter solution

This approach doesn't work when multiple existing sequence elements
should match, i.e. because the sequence contains maps and we're
searching on a key they all contain (target all containers with a certain
image would be one use case for this). PathGetter just takes the first
match in that case, which is not what we want.

* Add creation support to PathMatcher

* Regression test for existing bug when creation is enabled and sequence query should match multiple elements

* PathMatcher Create tests and support for sequence appending

* revert hyphen append support

PathGetter treats it as meaning 'last' not 'append' and does not have test coverage for its handling of this when create is set. Semantics are dubious given that multiple Replacement fieldPaths may be specified, which would cause successive appends.

* This also provides a solution to issue 1493

* Review feedback
* drop support for legacy patches

* fix CI
Add a short description of the namespace transformer and example
usage to examples/transformerconfigs/README.md.

References: kubernetes-sigs#629
Signed-off-by: Lars Kellogg-Stedman <[email protected]>
…etes-sigs#4904)

* Localize patchesJson6902, patchesStrategicMerge, replacements

* Address code review feedback

* Improve readability
* Remove deprecation warning check
* Load legacy kustomization

* Expose loadKustFile in kusttarget
* remove deprecated cfg and fn commands

* fix lint error

* run gofmt
…4920)

* Localize patches, patchesJson6902 custom transformers

* Improve readability
* Localize openapi, configurations, crds

* Add integration test

* Move krusty test

* Address code review feedback
KnVerey and others added 19 commits January 11, 2023 15:05
* initial changes to rename OrgRepo to RepoPath

* changes to rename Path to KustRootPath

* addressed review comments

* addressed review comments

* docs: Add documentation for namespace transformer

Add a short description of the namespace transformer and example
usage to examples/transformerconfigs/README.md.

References: kubernetes-sigs#629
Signed-off-by: Lars Kellogg-Stedman <[email protected]>

* Localize patchesJson6902, patchesStrategicMerge, replacements (kubernetes-sigs#4904)

* Localize patchesJson6902, patchesStrategicMerge, replacements

* Address code review feedback

* Improve readability
* Remove deprecation warning check

* Load legacy kustomization fields for `localize` (kubernetes-sigs#4918)

* Load legacy kustomization

* Expose loadKustFile in kusttarget

* remove FixKustomizationPreUnmarshalling

* remove deprecated cfg and fn commands (kubernetes-sigs#4930)

* remove deprecated cfg and fn commands

* fix lint error

* run gofmt

* Localize PatchTransformer, PatchJson6902Transformer (kubernetes-sigs#4920)

* Localize patches, patchesJson6902 custom transformers

* Improve readability

* Localize fields: openapi, configurations, crds (kubernetes-sigs#4907)

* Localize openapi, configurations, crds

* Add integration test

* Move krusty test

* Address code review feedback

* Implement locRootPath (kubernetes-sigs#4909)

* Implement locRootPath, and include userinfo, port in locFilePath

* Strip userinfo, port

* Improve readability

* Localize legacy fields

* Localize resources (kubernetes-sigs#4912)

* Localize resources

* Improve readability

* Add integration tests

* Group test helper functions

* Remove Functionality that Pulls Env Variables from Empty Keys

* Update api/kv/kv.go

Co-authored-by: Katrina Verey <[email protected]>

* refactor Unmarshal Kustomization struct code

* improve error messages

* Run go mod tidy on all modules before update

* Update sigs.k8s.io/yaml to 1.3.0

* fixed test failure because of latest commits

Signed-off-by: Lars Kellogg-Stedman <[email protected]>
Co-authored-by: Lars Kellogg-Stedman <[email protected]>
Co-authored-by: Anna Song <[email protected]>
Co-authored-by: yugo kobayashi <[email protected]>
Co-authored-by: Natasha Sarkar <[email protected]>
Co-authored-by: Cailyn Edwards <[email protected]>
Co-authored-by: Cailyn <[email protected]>
Co-authored-by: Katrina Verey <[email protected]>
Co-authored-by: Katrina Verey <[email protected]>
Fix ssh parsing in issue 4847
@k8s-ci-robot
Copy link
Contributor

@cailynse: This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cailynse
Once this PR has been reviewed and has the lgtm label, please assign knverey for approval by writing /assign @knverey in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 12, 2023
@cailyn-codes
Copy link
Contributor Author

I've obviously botched getting the other branch - I'll clean up

@cailyn-codes
Copy link
Contributor Author

Going to start fresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.