Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Insecure registry configuration (#49) #50

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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