catalog
catalog copied to clipboard
[WIP] Adds openfaas operator addon
Description of your changes
Fixes #5056
How has this code been tested?
Checklist
I have:
- [x] Title of the PR starts with type (e.g.
[Addon]
,[example]
or[Doc]
). - [ ] Updated/Added any relevant documentation and examples.
- [ ] New addon should be put in experimental.
- [x] Update addon should modify the
version
inmetadata.yaml
to generate a new version.
Verified Addon promotion rules
If this pr wants to promote an experimental addon to verified, you must check whether meet these conditions too:
- [ ] This addon must be tested by addon's e2e-test to guarantee this addon can be enabled successfully.
- This addon must have some basic but necessary information.
- [ ] An accessible icon url and source url defined in addon's
metadata.yaml
. - [ ] A detail introduction include a basic example about how to use and what's the benefit of this addon in
README.md
. - [ ] Also provide an introduction in KubeVela documentation.
- [ ] It's more likely to be accepted if useful examples provided in example dir.
- [ ] An accessible icon url and source url defined in addon's
Hi @afzalbin64, is this pr still in progress?
Hello @wangyikewxgm! You can review it up till what I did. Also, LMK how I can find resources to write its template for openfaas operator definitions and generate its example. Thanks. Although I found this doc, it is limited one. 😉
Hi @wangyikewxgm ! I just found this docs where I got to know how to go further. https://kubevela.io/docs/platform-engineers/components/custom-component. I had been waiting for you. Thanks
eg vela def init stateless -t component --template-yaml ./stateless.yaml -o stateless.cue
I apologize for the delayed reply. First, you can review the primary CRD in this Helm chart and manually create it by writing a native CRD YAML file. Next, you can follow this documentation to write a CUE template in the definition and generate a CRD using KubeVela.
Also, I highly recommend taking a look at this informative guide on how to create a workload in OpenFaaS, which can be found here. By gaining a deeper understanding of OpenFaaS, you can then create the add-on.
Hi there, if I try to use type helm
, would it be sufficient to use it for Function
custom resource?
the updated template.yaml
would be like
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: openfaas-operator
namespace: openfaas-sys
spec:
components:
- name: openfaas-required
type: k8s-objects # Set to k8s-objects
properties:
objects:
- apiVersion: v1
kind: Namespace
metadata:
name: openfaas
- apiVersion: v1
kind: Namespace
metadata:
name: openfaas-fn
- name: openfaas-operator
type: helm
properties:
chart: openfaas
version: 0.16.4
repoType: helm
url: https://openfaas.github.io/faas-netes
releaseName: my-openfaas
targetNamespace: openfaas
values:
ingress.enabled: true
Ref: https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/README.md https://www.openfaas.com/blog/howto-package-functions-with-helm/ cc @barnettZQG