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

Add a general field to the Vineyardd CRD for supporting the most APIs of Kubernetes Deployment #1439

Open
dashanji opened this issue Jun 29, 2023 · 12 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers kubernetes stale

Comments

@dashanji
Copy link
Member

dashanji commented Jun 29, 2023

Describe your problem

At present, we have the Vineyardd CRD to deploy a Kubernetes Deployment, but it only contains the parts of Kubernetes Deployment APIs refer to vineyardd template file, it's better to add a field to the Vineyardd CRD which allows users to input their custom APIs rather than the fields of CRD.

Some examples:

apiVersion: k8s.v6d.io/v1alpha1
kind: Vineyardd
metadata:
  name: vineyardd-sample
spec:
  replicas: 3
  vineyard:
    image: vineyardcloudnative/vineyardd:latest
    imagePullPolicy: IfNotPresent
  # the patchFields are only patched into the vineyard deployment
  patchFields:
    spec:
      template:
        spec:
          tolerations:
          - effect: NoSchedule
            key: disktype
            value: ssd

Additional context

@dashanji dashanji added enhancement New feature or request good first issue Good for newcomers kubernetes labels Jun 29, 2023
@jingchu000
Copy link

I don't quite understand, do you want to say add a field, if the field is filled then execute the filled API, otherwise follow the original logic?

@dashanji
Copy link
Member Author

I'm sorry the extraFields maybe confuse you, it actually acts like patchFields. If the field is filled and then it will be patched into the original logic. As the general patch strategy:

  • if some fields defined in the patchFields exist in the original Deployment API, then Update.
  • if some fields do not exist, then Merge.

@jingchu000
Copy link

On the current CRD definition, an additional field called patchFields is added to listen to the registered payload, and then the patchFields field is typed on the created yaml, which is then handed over to Apiserver for execution. It sounds like a webhook.

@dashanji
Copy link
Member Author

dashanji commented Jul 10, 2023

Yeah, using webhook can also work, but we don't want to add a new one. Actually, we want to do the Patch during Rendering the Vineyardd CRD as the deployment. As you said, we just put some logic like a webhook in the Vineyardd controller.

@jingchu000
Copy link

I think I can try to fix it, but still need to look at the project and get a clear understanding of the requirements and changes.

@dashanji
Copy link
Member Author

No problem, assigned to you. If you have any question, feel free to contact us.

@jingchu000
Copy link

Thanks,Is there a community or other place for communication?

@dashanji
Copy link
Member Author

@jingchu000, we have a slack channel refer to doc. Also, we have a DingDing group for communication. You could choose the like one.

@jingchu000
Copy link

ok,I want to join Dingding

@jingchu000
Copy link

Can you invite me?

@dashanji
Copy link
Member Author

dashanji commented Jul 10, 2023

Ok, would you mind telling me your Dingding number here or via email caoye.cao@alibaba-inc.com.

Copy link
Contributor

/cc @jingchu000, this issus/pr has had no activity for for a long time, could you folks help to review the status ?
If the issue/pr is waiting for further response from the reporter/author, please help to add the label requires-further-info to suppress further notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers kubernetes stale
Projects
None yet
Development

No branches or pull requests

2 participants