tiltfile: add k8s_kind#1250
Merged
landism merged 2 commits intoMar 5, 2019
Merged
Conversation
maiamcc
approved these changes
Mar 5, 2019
| filterYamlN = "filter_yaml" | ||
| k8sResourceN = "k8s_resource" | ||
| portForwardN = "port_forward" | ||
| k8sExtraImageLocation = "k8s_extra_image_location" |
Contributor
There was a problem hiding this comment.
not thrillllled about this function name... k8s_extra_image_location_for_kind? (That's also not great... feel free to leave it for now if you can't come up w/ anything better.)
Member
Author
There was a problem hiding this comment.
Yeah, naming this thing is causing me grief. I'll come up with a few options and bounce them off people on slack.
Member
Author
There was a problem hiding this comment.
ok, this seems not as terrible as most options:
k8s_kind('Environment', image_json_path='{.spec.runtime.image}')
landism
force-pushed
the
mlandis/ch1724/implement-support-for-specifying-json-path
branch
from
March 5, 2019 19:20
26a2b79 to
ef3d9ba
Compare
landism
deleted the
mlandis/ch1724/implement-support-for-specifying-json-path
branch
March 5, 2019 21:23
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems:
k8s_resource, which felt kind of clunky.k8s_resourceonly takes one image, which meant this didn't work with CRDs with multiple images.Solution:
Add
k8s_extra_image_locationmethod, which says where to find the image definitions for a given k8s object type, so now CRDs can have multiple images and don't need a call tok8s_resource, but can just use the normal tiltfile joining logic.