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

[Feature] Support to use third-part cuelang packages when write x-definition. #2924

Open
leejanee opened this issue Dec 14, 2021 · 0 comments
Labels
area/cue CUE language related issue area/cue-template priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@leejanee
Copy link
Member

Is your feature request related to a problem? Please describe.

Support to use third-part cuelang packages when write x-definition. Because there are often the following demands:

  1. share user-defined packages.
  2. generate cuelang packages from golang code.

At the same time, processing packages will cause performance degradation on server side. Processing packages is more elegant on the client side.

Describe the solution you'd like

kubevela should embrace cuelang packages manage.

New definition on client side as follows:

import "user.io/common/deploy"

parameter: {
    image: string
    replicas: int
}

up: deploy.#Workload & {image: parameter.image, replicas: parameter.replicas}

user.io/common/deploy is a user-defined package.

Describe alternatives you've considered

If you want to use kubernetes api define in kubevela definition. You can use cue get go to generate third-part cuelang packages

Definition will be as follows:

import (
    "k8s.io/api/core"
    "vela/op"
)

apply: op.#Apply & core.#Pod 
apply: {
    spec: image: "busybox"
}

Additional context

@wonderflow wonderflow added this to the KubeVela-v1.3 milestone Dec 20, 2021
@wonderflow wonderflow removed this from the KubeVela-v1.3 milestone Mar 8, 2022
@wonderflow wonderflow added area/cue CUE language related issue priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. area/cue-template labels Aug 11, 2022
@wonderflow wonderflow added this to the KubeVela-v1.7 milestone Aug 11, 2022
@Somefive Somefive modified the milestones: KubeVela-v1.9, Kubevela-v1.10 Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cue CUE language related issue area/cue-template priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

3 participants