Skip to content

Commit

Permalink
added extra-options flag
Browse files Browse the repository at this point in the history
  • Loading branch information
bushwhackr committed Oct 20, 2022
1 parent 80eeebf commit fb374ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@
</pre>
</details>

<details>
<summary>extra-config (optional)</summary>
<pre>
- default: ''
- value: Any extra config fields (see [docs](https://minikube.sigs.k8s.io/docs/handbook/config/#kubernetes-configuration))
</pre>
</details>

## Example 1:
#### Start Kubernetes on pull request

Expand Down Expand Up @@ -181,6 +189,7 @@ jobs:
name: job1
steps:
- name: start minikube
uses: medyagh/setup-minikube@master
id: minikube
with:
minikube-version: 1.24.0
Expand All @@ -190,7 +199,8 @@ jobs:
cpus: 4
memory: 4000m
cni: bridge
uses: medyagh/setup-minikube@master
addons: registry,ingress
extra-config: 'kubelet.max-pods=10'
# now you can run kubectl to see the pods in the cluster
- name: kubectl
run: kubectl get pods -A
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
description: 'Choose optional addons to install. Valid options: ingress, gcp-auth, registry ...'
required: false
default: ''
extra-config:
description: 'Extra configuration (--extra-config) to pass into "minikube start".'
required: false
default: ''
runs:
using: 'node16'
main: 'dist/index.js'
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function setArgs(args) {
{ key: 'memory', flag: '--memory' },
{ key: 'cni', flag: '--cni' },
{ key: 'addons', flag: '--addons' },
{ key: 'extra-config', flag: '--extra-config' },
];
inputs.forEach((input) => {
const value = (0, core_1.getInput)(input.key).toLowerCase();
Expand Down
1 change: 1 addition & 0 deletions src/minikube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function setArgs(args: string[]) {
{key: 'memory', flag: '--memory'},
{key: 'cni', flag: '--cni'},
{key: 'addons', flag: '--addons'},
{key: 'extra-config', flag: '--extra-config'},
]
inputs.forEach((input) => {
const value = getInput(input.key).toLowerCase()
Expand Down

0 comments on commit fb374ba

Please sign in to comment.