Skip to content

Commit

Permalink
Add Insecure registry configuration (medyagh#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste authored and spowelljr committed Jan 12, 2023
1 parent 71099ad commit 3cb775a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ jobs:
# Test that minikube max-pods extraConfig has been set
- run: |
cat ~/.minikube/profiles/minikube/config.json | jq '.KubernetesConfig.ExtraOptions[0].Key' | grep max-pods
test-insecure-registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: ./
with:
insecure-registry: '192.168.0.0/16'

# Test that minikube max-pods extraConfig has been set
- run: |
minikube ssh cat /lib/systemd/system/docker.service | grep 192.168.0.0/16
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ By default setup-minikube caches the ISO, kicbase, and preload using GitHub Acti
</pre>
</details>

<details>
<summary>insecure-registry (optional)</summary>
<pre>
- default: ''
- value: Any container registry address which is insecure
- example: localhost:5000,10.0.0.0/24
</pre>
</details>

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

Expand Down Expand Up @@ -250,6 +259,7 @@ jobs:
addons: registry,ingress
extra-config: 'kubelet.max-pods=10'
mount-path: '/Users/user1/test-files:/testdata'
insecure-registry: localhost:5000,10.0.0.0/24
# 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 @@ -61,6 +61,10 @@ inputs:
description: 'comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to "apiserver,system_pods", available options: "apiserver,system_pods,default_sa,apps_running,node_ready,kubelet". Other acceptable values are "all" or "none", "true" and "false"'
required: false
default: 'all'
insecure-registry:
description: 'Enable insecure communication with the given registries'
required: false
default: ''
runs:
using: 'node16'
main: 'dist/index.js'
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const setArgs = (args: string[]) => {
{key: 'cpus', flag: '--cpus'},
{key: 'driver', flag: '--driver'},
{key: 'extra-config', flag: '--extra-config'},
{key: 'insecure-registry', flag: '--insecure-registry'},
{key: 'kubernetes-version', flag: '--kubernetes-version'},
{key: 'listen-address', flag: '--listen-address'},
{key: 'memory', flag: '--memory'},
Expand Down

0 comments on commit 3cb775a

Please sign in to comment.