We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vela ql create <view.cue>
Is your feature request related to a problem? Please describe.
We have a great velaql to help query K8s resources from CUE: https://kubevela.io/docs/platform-engineers/system-operation/velaql
We have supported using vela ql command to query in #4196
vela ql
vela ql --query "<query>" vela ql --file my-view.cue
But we can't share the view in cue format to others.
Describe the solution you'd like
we need a way to create the view into K8s system, such as:
It will generate view from CUE to YAML, the render logic is aligned with:
0c190ef#diff-dfc3f6e3b7231b7b41cf82b8e561f3cbf8191d214886e21d798f287f693806dbR997
Generally follow the format:
apiVersion: v1 kind: ConfigMap metadata: name: test-component-pod-view namespace: vela-system data: template: | <CUE template>
As a result, the working process would be:
import ( "vela/ql" ) parameter: { name: string namespace: *"default" | string key: string } // You can use configmap.value.data after this action. configmap: ql.#Read & { value: { kind: "Secret" apiVersion: "v1" metadata: { name: parameter.name namespace: parameter.namespace } } } status: configmap.value.data["\(parameter.key)"]
This view can help load value from K8s secret.
vela ql create -f secret-view.cue
If no name, we can use the file as name "secret-view", the command line can also specify the name:
vela ql create -f secret-view.cue --name my-secret-view
vela ql --query "my-secret-view{name=my-secret,key=password}"
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
/assign
Sorry, something went wrong.
vela ql apply
charlie0129
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
We have a great velaql to help query K8s resources from CUE: https://kubevela.io/docs/platform-engineers/system-operation/velaql
We have supported using
vela ql
command to query in #4196But we can't share the view in cue format to others.
Describe the solution you'd like
we need a way to create the view into K8s system, such as:
It will generate view from CUE to YAML, the render logic is aligned with:
0c190ef#diff-dfc3f6e3b7231b7b41cf82b8e561f3cbf8191d214886e21d798f287f693806dbR997
Generally follow the format:
As a result, the working process would be:
This view can help load value from K8s secret.
If no name, we can use the file as name "secret-view", the command line can also specify the name:
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: