Skip to content

RyanSiu1995/kubebuilder-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Kubebuilder installation docker action

This action provides a sugar syntax to install the kubebuilder in the ubuntu machine. The installation process is based on kubebuilder v2.3.1.

Inputs

version

Required The version going to be installed. Default "2.3.1".

kubebuilderOnly

Optional a flag to install kubebuilder binary only. Default as false, which is default behavor in 2.x.x.

etcdVersion

Optional The etcd version going to be installed. Respected if kubebuilderOnly is false and major version of kubebuilder is greater than or equal to 3. Default "v3.2.32"

kubernetesVersion

Optional The kubectl and kube-apiserver version going to be installed. Respected if kubebuilderOnly is false and major version of kubebuilder is greater than or equal to 3. Default to use latest version.

useSudo

Optional use sudo command in most of the operations. This is useful when your machine has no sudo command preinstalled. Default as true.

Example usage

uses: RyanSiu1995/[email protected]
with:
  version: 3.0.0

How to run E2E test locally

Install act. Then, run act directly under the working repository.

If you encounter the following error,

[main.yml/test-workflow-4 ] ⭐  Run Test the workflow
| internal/modules/cjs/loader.js:818
|   throw err;
|   ^
|
| Error: Cannot find module '/kubebuilder-action/kubebuilder-action/index.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:667:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
|     at internal/main/run_main_module.js:17:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }

please add these two lines to workflow definition under checkout step.

with:
  path: ./

License

This software is released under Apache License 2.0. Please refer to LICENSE file for more details.