Skip to content
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

JSONPath template language #11738

Merged
merged 1 commit into from
Jul 31, 2015
Merged

Conversation

daizuozhuo
Copy link
Contributor

@brendandburns Thanks. This is the rebased version of #9296

  • "" quote string
  • . key operator
  • [] array operator
  • start : end : step slice operator
  • @ current object
  • * wildcard operator
  • ?() array filter
  • .. parent operator
  • [,] array indices as a set
  • range, end keyword

@k8s-bot
Copy link

k8s-bot commented Jul 23, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

`127.0.0.1 127.0.0.2 {cpu: 4} {cpu: 8}`},
{"range nodes capacity", "{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}", nodesData,
`[127.0.0.1, {cpu: 4}] [127.0.0.2, {cpu: 8}] `},
{"user passowrd", `{.users[?(@.name=="e2e")].user.password}`, nodesData, "secret"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry

@brendandburns
Copy link
Contributor

LGTM. Please squash the commits. and then I will add 'lgtm' label and get this merged.

@daizuozhuo
Copy link
Contributor Author

@brendandburns Thanks. I squashed them into 8 commits.

@brendandburns
Copy link
Contributor

Sorry, I wasn't clear. Please squash to 1 commit. If there really are multiple conceptual things, they should be broken out as separate PRs (but I think it's fine for there to be one commit for this)

Shippable appears to be a flake, I'm re-running.

@k8s-bot test this please

--brendan

@k8s-bot
Copy link

k8s-bot commented Jul 27, 2015

GCE e2e build/test passed for commit 8dcd077fb306ecf04cecda56fd5c280c79d2e38e.

@daizuozhuo
Copy link
Contributor Author

@brendandburns Thanks. There is only one commit now.

@brendandburns
Copy link
Contributor

LGTM, shippable is a flake, re-running.

@brendandburns
Copy link
Contributor

There is something severely borked in shippable. Its complaining about v1beta3, but there's nothing about v1beta3 in this PR.

@k8s-bot test this please

If this passes jenkins, I'm just going to merge it.

@k8s-bot
Copy link

k8s-bot commented Jul 30, 2015

GCE e2e build/test failed for commit 949704a.

@brendandburns
Copy link
Contributor

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Jul 30, 2015

GCE e2e build/test failed for commit 949704a.

@daizuozhuo
Copy link
Contributor Author

This is strange. The code of 8dcd077 and 949704a are the same, but GCE e2e build/test passed for commit 8dcd077 and failed on 949704a.

@brendandburns
Copy link
Contributor

@daizuozhuo I think it's a flake, I'm just going to merge this, and we'll see what happens...

brendandburns added a commit that referenced this pull request Jul 31, 2015
@brendandburns brendandburns merged commit c752bc6 into kubernetes:master Jul 31, 2015
@brendandburns
Copy link
Contributor

@daizuozhuo now that this is submitted, are you working on the integration with kubectl? We should create a new output format printer.

Thanks!
--brendan

@daizuozhuo
Copy link
Contributor Author

@brendanburns Yes, I will send pull request soon.

@timothysc
Copy link
Member

/cc @pmorie re: expressiveness.

@JeanMertz
Copy link

Awesome work here guys, looking forward to this. Given this work, I'm going to stick to Go templating for now, instead of searching for some 3rd-party json pre-processor to fill in variables and the likes.

ouch, spoke too soon, no Go templating support for kubectl create, so I'll have to do some pre-processing anyway for now.

@shiywang shiywang mentioned this pull request Jun 25, 2017
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants