A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: v1.11

About this workload

  • Netlify is a SaaS platform that can serve website especially for frontend service, it provides free allowances that was pretty cool to be used for demo and test. We can create an addon which provides a netlify component type for frontend service.
  • This workload will launch a K8s job for deploying a fronten service to https://app.netlify.com/.

Quick start

# Properties
+---------------+---------------------------------------------------------------------+--------+----------+------------------------------------------------+
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
+---------------+---------------------------------------------------------------------+--------+----------+------------------------------------------------+
| token | Your Netlify personal access token, base64-encoded | string | false | your-own-token-after-base64 |
| sitename | The site name on app.netlify.com; the component needs it to render | string | true | |
| gitrepo | Address of the git repository holding the site | string | false | https://github.com/oeular/oeular.github.io.git |
| reponame | Directory to clone the repository into | string | false | oeular.github.io |
| backofflimit | backoffLimit of the deploy Job | int | false | 5 |
| completions | completions and parallelism of the deploy Job | int | false | 1 |
| restartPolicy | Restart policy of the deploy Job's pod | string | false | OnFailure |
+---------------+---------------------------------------------------------------------+--------+----------+------------------------------------------------+

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: netlify-app
namespace: default
spec:
components:
- name: netlify
type: netlify
properties:
backofflimit: 5
completions: 1
reponame: <github reponame>
gitrepo: <github repo address>
restartPolicy: OnFailure
sitename: <sitename>
token: <Here needs your own token from https://app.netlify.com/user/applications/personal which you should base64 >
  • Check the app status
vela ls netlify-app
APP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIME
netlify-app netlify netlify running healthy 2022-06-14 23:42:43 +0800 CST
vela status netlify-app
About:

Name: netlify-app
Namespace: default
Created at: 2022-06-14 23:42:43 +0800 CST
Status: running

Workflow:

mode: DAG
finished: true
Suspend: false
Terminated: false
Steps
- id:k25g896t2o
name:netlify
type:apply-component
phase:succeeded
message:

Services:

- Name: netlify
Cluster: local Namespace: default
Type: netlify
Healthy
No trait applied
  • Get the website url for visit
vela logs netlify-app -n default | grep "Website URL"
netlify--1-b4fcg netlify 2022-06-14T15:43:30.641036980Z Website URL: https://deploy-from-vela.netlify.app