Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arv1nt3 committed Jan 12, 2024
1 parent 4a66994 commit 329b60d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 14 deletions.
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,35 @@ This GitHub Action deploys an application using a Docker image to a Kubernetes-i
Create a workflow YAML file in your `.github/workflows` directory. [Example workflows](#example-workflow) are available below. For more information, see the GitHub Help Documentation for [Creating a workflow file](https://docs.github.com/en/actions/using-workflows#creating-a-workflow-file).

### Inputs

#### Kubernetes Action Inputs
| Input | Description | Required | Default |
|--------------------|------------------------------------------------------------------------------------------------------|----------|----------|
| `image_name` | The full name of the image (format it accordingly to registry specifications). | Yes | N/A |
| `use_local_image` | Set to true to use a local Docker image with `kind load docker-image`, false to pull from registry. | Yes | `false` |
| `cluster_config` | Path to the Kind config file. | No | N/A |
| `registry_url` | The URL of the registry. | No | `ghcr.io`|
| `registry_username`| The username for the registry. | No | N/A |
| `registry_token` | Token or password used to connect to the specified container registry. | No | N/A |
| `command` | Command to run at container startup. Check [example workflows](#example-workflows) to see the exact format expected. | No | N/A |
| `args` | Arguments for the command. Check [example workflows](#example-workflows) to see the exact format expected. | No | N/A |
| `env_vars` | Environment variables in YAML format. Check [example workflows](#example-workflows) to see the exact format expected. | No | N/A |
| `image_name` | The full name of the image (format it accordingly to registry specifications). | Yes | N/A |
| `use_local_image` | Set to true to use a local Docker image with `kind load docker-image`, false to pull from registry. | Yes | `false` |
| `cluster_config` | Path to the Kind config file. | No | N/A |
| `registry_url` | The URL of the registry. | No | `ghcr.io`|
| `registry_username`| The username for the registry. | No | N/A |
| `registry_token` | Token or password used to connect to the specified container registry. | No | N/A |
| `command` | Command to run at container startup. Check [example workflows](#example-workflows) for format. | No | N/A |
| `args` | Arguments for the command. Check [example workflows](#example-workflows) for format. | No | N/A |
| `env_vars` | Environment variables in YAML format. Check [example workflows](#example-workflows) for format. | No | N/A |
| `port` | The port of the application. | No | `80` |
| `path` | The path to test, also used for readiness and liveness probes. | No | `/` |
| `timeoutSeconds` | Number of seconds to wait for the pod to start. | No | `20` |
| `initialDelaySeconds` | Number of seconds after the container has started before liveness or readiness probes are initiated. | No | `5` |
| `periodSeconds` | How often (in seconds) to perform the probe. Minimum value is 1. | No | `10` |
| `timeoutSeconds` | Number of seconds to wait for the pod to start. | No | `20` |
| `initialDelaySeconds` | Number of seconds after container start before probes are initiated. | No | `5` |
| `periodSeconds` | Frequency (in seconds) of the probe. Minimum value is 1. | No | `10` |
#### Kind Action Inputs
| Input | Description | Required | Default |
|--------------------|------------------------------------------------------------------------------------------------------|----------|----------|
| `version` | The Kind version to use. | No | `v0.20.0`|
| `config` | Path to the Kind config file. | No | N/A |
| `node_image` | The Docker image for the cluster nodes. | No | N/A |
| `cluster_name` | Name of the cluster to create. | No | `chart-testing` |
| `wait` | Duration to wait for the control plane to become ready. | No | `60s` |
| `verbosity` | Verbosity level for Kind. | No | `0` |
| `kubectl_version` | The kubectl version to use. | No | `v1.26.4`|
| `install_only` | Skips cluster creation, only installs Kind. | No | N/A |
| `ignore_failed_clean` | Whether to ignore post-delete cluster failures. | No | `false` |

### Example Workflows

Expand Down
44 changes: 43 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,39 @@ inputs:
description: "How often (in seconds) to perform the probe. Minimum value is 1."
required: false
default: "5"
version:
description: "The kind version to use (default: v0.19.0)"
required: false
default: "v0.20.0"
config:
description: "The path to the kind config file"
required: false
node_image:
description: "The Docker image for the cluster nodes"
required: false
cluster_name:
description: "The name of the cluster to create (default: chart-testing)"
required: false
default: "chart-testing"
wait:
description: "The duration to wait for the control plane to become ready (default: 60s)"
required: false
default: "60s"
verbosity:
description: "The verbosity level for kind (default: 0)"
default: "0"
required: false
kubectl_version:
description: "The kubectl version to use (default: v1.26.4)"
required: false
default: "v1.26.4"
install_only:
description: "Skips cluster creation, only install kind (default: false)"
required: false
ignore_failed_clean:
description: "Whether to ignore the post-delete the cluster (default: false)"
default: false
required: false

runs:
using: "composite"
Expand Down Expand Up @@ -84,7 +117,16 @@ runs:
- name: Setup Kind
uses: helm/[email protected]
with:
config: ${{ inputs.cluster_config }}
version: ${{ inputs.version }}
config: ${{ inputs.config }}
node_image: ${{ inputs.node_image }}
cluster_name: ${{ inputs.cluster_name }}
wait: ${{ inputs.wait }}
verbosity: ${{ inputs.verbosity }}
kubectl_version: ${{ inputs.kubectl_version }}
install_only: ${{ inputs.install_only }}
ignore_failed_clean: ${{ inputs.ignore_failed_clean }}


- name: Load local Docker image
if: inputs.use_local_image == 'true'
Expand Down

0 comments on commit 329b60d

Please sign in to comment.