Proposal: improved `func environment` command to also show local function information
lance opened this issue · 8 comments
We currently have a func environment
command that displays the global configuration for the function developer. Here is an example from my laptop.
func.yaml
{
"Version": "v0.37.0-105-g4719a435",
"GitRevision": "4719a435",
"SpecVersion": "0.35.0",
"SocatImage": "quay.io/boson/alpine-socat:1.7.4.3-r1-non-root",
"TarImage": "quay.io/boson/alpine-socat:1.7.4.3-r1-non-root",
"Languages": [
"go",
"node",
"python",
"quarkus",
"rust",
"springboot",
"typescript"
],
"DefaultImageBuilders": {
"buildpacks": {
"go": "gcr.io/paketo-buildpacks/builder:base",
"node": "gcr.io/paketo-buildpacks/builder:base",
"nodejs": "gcr.io/paketo-buildpacks/builder:base",
"python": "gcr.io/paketo-buildpacks/builder:base",
"quarkus": "gcr.io/paketo-buildpacks/builder:base",
"rust": "gcr.io/paketo-buildpacks/builder:full-cf",
"springboot": "gcr.io/paketo-buildpacks/builder:base",
"typescript": "gcr.io/paketo-buildpacks/builder:base"
},
"s2i": {
"node": "registry.access.redhat.com/ubi8/nodejs-16",
"nodejs": "registry.access.redhat.com/ubi8/nodejs-16",
"python": "registry.access.redhat.com/ubi8/python-39",
"quarkus": "registry.access.redhat.com/ubi8/openjdk-17",
"typescript": "registry.access.redhat.com/ubi8/nodejs-16"
}
},
"Templates": {
"go": [
"cloudevents",
"http"
],
"node": [
"cloudevents",
"http"
],
"python": [
"cloudevents",
"flask",
"http",
"wsgi"
],
"quarkus": [
"cloudevents",
"http"
],
"rust": [
"cloudevents",
"http"
],
"springboot": [
"cloudevents",
"http"
],
"typescript": [
"cloudevents",
"http"
]
},
"Environment": [
"FUNC_REGISTRY=quay.io/lanceball"
],
"Cluster": "https://127.0.0.1:61405",
"Defaults": {
"Builder": "pack",
"Confirm": false,
"Language": "",
"Namespace": "default",
"Registry": "",
"Verbose": false
}
}
I think the command should be improved to show information about the current function if the developer is in a function project directory or if they have used the --path
or -p
flags.
Information that could be provided for a specific function may primarily be the contents of func.yaml
with any unspecified values in the file shown in the command output with the default value.
The information provided in this command should also include output from func describe
but should not fail if there is no current cluster information, which is the current behavior of func describe
.
func describe -p ~/demo/viewer
Error: Get "https://127.0.0.1:61405/apis/serving.knative.dev/v1/namespaces/default/services/viewer": dial tcp 127.0.0.1:61405: connect: connection refused
This also could instead (or in addition) be an improvement to func describe
/assign
/good-first-issue
@lance:
This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue
command.
In response to this:
/good-first-issue
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.
/kind good-first-issue
Unassigning this due to inactivity
Please feel free to re-assign yourself @nitishchauhan0022 if you're still working on it!
Hey@lkingland Thanks for reminding. I will update the pr by tomorrow.
/assign