-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
examples/operator: Fix port-forward command. #6418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait a bit and see if there's other feedback.
@@ -1,13 +1,13 @@ | |||
#!/bin/sh | |||
|
|||
kubectl port-forward --address localhost deployment/"$(kubectl get deployment --selector="planetscale.com/component=vtctld" -o=jsonpath="{.items..metadata.name}")" 15000 15999 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this from some planetscale documentation. We have to find out where that was and fix it there too.
examples/operator/README.md
Outdated
@@ -9,47 +9,47 @@ kubectl apply -f operator.yaml | |||
|
|||
# Bring up initial cluster and commerce keyspace | |||
kubectl apply -f 101_initial_cluster.yaml | |||
vtctlclient ApplySchema -sql="$(cat create_commerce_schema.sql)" commerce | |||
vtctlclient ApplyVSchema -vschema="$(cat vschema_commerce_initial.json)" commerce | |||
kvtctl ApplySchema -sql="$(cat create_commerce_schema.sql)" commerce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morgo wanted to use the original names. The intent was that we'll have a config directory like kubectl does. But we haven't done that part yet.
But I'm ok with using a different name until that part is done. This has confused me also a couple of times.
It just occurred to me that we have to fix the documentation to match this change. Will you have time for it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the website docs (Getting started guides). We have a unified flow for all the flavors (operator, local and helm), which means the same aliases have to be used by all 3 examples.
The other changes (pf, logging) are important. Can we keep just those and revert the alias changes?
Ah I didn't know that. Good catch.
Yes I'll update the PR. |
Previously, the command would fail if `kubectl get` returned multiple entries, as would happen if there are multiple cells deployed. Also send vtctl output to the console by default instead of log files. Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
cbf33ff
to
04eb5a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests are passing here: https://github.com/vitessio/vitess/actions?query=branch%3Aoperator-example-aliases
Naming the aliases the same as the underlying command has been tripping up users.Also fix port-forwarding for the possibility ofmultiple query results, and send vtctl output to the console by default instead of log files.
cc @askdba