-
Notifications
You must be signed in to change notification settings - Fork 118
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
Resource extensions implementation #2230
Resource extensions implementation #2230
Conversation
Tests resultsI tested new feature in two scenarios (with/without cluster connection) and compare it to the built cli without this fueature. Keep in mind, that results are inaccurate and not deterministic, but show the trend and the scale. Before adding featurestime ./kyma-cli alpha
________________________________________________________
Executed in 27.30 millis fish external
usr time 11.74 millis 40.00 micros 11.70 millis
sys time 8.02 millis 703.00 micros 7.32 millis
New cli with cluster connectionexport KUBECONFIG=<PATH_TO_KUBECONFIG>
time ./kyma-cli-new alpha
________________________________________________________
Executed in 730.25 millis fish external
usr time 19.16 millis 0.09 millis 19.07 millis
sys time 27.89 millis 1.09 millis 26.80 millis
New without clusterexport KUBECONFIG="" # reset to default - no cluster
time ./kyma-cli-new alpha
________________________________________________________
Executed in 24.27 millis fish external
usr time 11.82 millis 37.00 micros 11.79 millis
sys time 8.83 millis 625.00 micros 8.21 millis
DataI've tested it with self-crafted example of the extension for the Function resources: ConfigMap: apiVersion: v1
kind: ConfigMap
metadata:
labels:
kyma-cli/extension: resource
name: function.extension.cli
data:
rootCommand: |
name: function
description: manage functions
descriptionLong: use this command to manage function resources on a cluster
resource: |
scope: namespace
kind: Function
group: serverless.kyma-project.io
version: v1alpha2
singular: function
plural: functions
templateCommands: |
explain:
description: explains Kyma Functions
descriptionLong: use this command to explain Kyma Serverless Function CR goal
output: |-
Kyma Serverless Module offers a Kubernetes-based platform on which you can build,
run, and manage serverless applications in Kubernetes. These applications are called Functions,
and they are based on the Function custom resource (CR) objects.
They contain simple code snippets that implement specific business logic.
For example, you can define that you want to use a Function as a proxy that saves all incoming
event details to an external database.
Such a Function can be:
- Triggered by other workloads in the cluster (in-cluster events) or business events coming from
external sources. You can subscribe to them using a Subscription CR.
- Exposed to an external endpoint (HTTPS). With an APIRule CR, you can define who can reach the endpoint
and what operations they can perform on it.
Read more about serverless Functions here:
https://kyma-project.io/#/serverless-manager/user/README?id=what-is-serverless After applying this ConfigMap it should be possible to run commands like these:
|
3514362
to
d51056f
Compare
fd23f57
to
1925d67
Compare
52eb33c
to
cd3229b
Compare
Description
Changes proposed in this pull request:
Related issue(s)