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 support for kind Job #370

Merged
merged 1 commit into from
Nov 1, 2021
Merged

Conversation

superbrothers
Copy link
Contributor

Description

This PR adds support for kind Job. Currently, Job is an unsupported resource in kubeaudit.

---------------- Results for ---------------

  apiVersion: batch/v1
  kind: Job

--------------------------------------------

-- [warning] Unsupported resource
   Message: Resource is not currently supported.
Type of change
  • Bug fix πŸ›
  • New feature ✨
  • This change requires a documentation update πŸ“–
  • Breaking changes ⚠️
How Has This Been Tested?
$ make test
./test.sh
Starting tests. This may take a while...
make[1]: Entering directory '/home/ksuda/src/github.com/Shopify/kubeaudit'
kind create cluster --name "kubeaudit-test" --image kindest/node:v1.15.0
Creating cluster "kubeaudit-test" ...
 βœ“ Ensuring node image (kindest/node:v1.15.0) πŸ–Ό
 βœ“ Preparing nodes πŸ“¦
 βœ“ Writing configuration πŸ“œ
 βœ“ Starting control-plane πŸ•ΉοΈ
 βœ“ Installing CNI πŸ”Œ
Could not read storage manifest, falling back on old k8s.io/host-path default ...
 βœ“ Installing StorageClass πŸ’Ύ
Set kubectl context to "kind-kubeaudit-test"
You can now use your cluster with:

kubectl cluster-info --context kind-kubeaudit-test

Thanks for using kind! 😊
make[1]: Leaving directory '/home/ksuda/src/github.com/Shopify/kubeaudit'
ok      github.com/Shopify/kubeaudit    0.256s  coverage: 71.6% of statements
ok      github.com/Shopify/kubeaudit/auditors/all       37.277s coverage: 92.6% of statements
ok      github.com/Shopify/kubeaudit/auditors/apparmor  21.842s coverage: 100.0% of statements
ok      github.com/Shopify/kubeaudit/auditors/asat      22.415s coverage: 100.0% of statements
ok      github.com/Shopify/kubeaudit/auditors/capabilities      22.476s coverage: 94.8% of statements
ok      github.com/Shopify/kubeaudit/auditors/hostns    22.451s coverage: 92.1% of statements
ok      github.com/Shopify/kubeaudit/auditors/image     22.081s coverage: 96.4% of statements
ok      github.com/Shopify/kubeaudit/auditors/limits    22.299s coverage: 98.6% of statements
ok      github.com/Shopify/kubeaudit/auditors/mounts    107.929s        coverage: 89.2% of statements
ok      github.com/Shopify/kubeaudit/auditors/netpols   6.172s  coverage: 90.4% of statements
ok      github.com/Shopify/kubeaudit/auditors/nonroot   84.773s coverage: 95.7% of statements
ok      github.com/Shopify/kubeaudit/auditors/privesc   22.208s coverage: 100.0% of statements
ok      github.com/Shopify/kubeaudit/auditors/privileged        22.170s coverage: 95.5% of statements
ok      github.com/Shopify/kubeaudit/auditors/rootfs    22.169s coverage: 95.5% of statements
ok      github.com/Shopify/kubeaudit/auditors/seccomp   22.105s coverage: 100.0% of statements
?       github.com/Shopify/kubeaudit/cmd        [no test files]
?       github.com/Shopify/kubeaudit/cmd/commands       [no test files]
ok      github.com/Shopify/kubeaudit/config     0.053s  coverage: 57.1% of statements
?       github.com/Shopify/kubeaudit/internal/color     [no test files]
ok      github.com/Shopify/kubeaudit/internal/k8sinternal       0.298s  coverage: 83.9% of statements
?       github.com/Shopify/kubeaudit/internal/test      [no test files]
ok      github.com/Shopify/kubeaudit/internal/yaml      0.028s  coverage: 89.0% of statements
ok      github.com/Shopify/kubeaudit/pkg/fix    0.050s  coverage: 94.4% of statements
?       github.com/Shopify/kubeaudit/pkg/k8s    [no test files]
?       github.com/Shopify/kubeaudit/pkg/override       [no test files]
make[1]: Entering directory '/home/ksuda/src/github.com/Shopify/kubeaudit'
kind delete cluster --name "kubeaudit-test"
Deleting cluster "kubeaudit-test" ...
make[1]: Leaving directory '/home/ksuda/src/github.com/Shopify/kubeaudit'
Checklist:
  • I have 🎩 my changes (A 🎩 specifically includes pulling down changes, setting them up, and manually testing the changed features and potential side effects to make sure nothing is broken)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The test coverage did not decrease: I added a new fixture.: I could not check coverage decreased or not because tests failed on the main branch.
  • I have signed the appropriate Contributor License Agreement

Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
@ghost
Copy link

ghost commented Nov 1, 2021

Thanks for opening this pull request! Please check out our contributing guidelines and sign the CLA.

Copy link
Contributor

@genevieveluyt genevieveluyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks so much for your contribution @superbrothers !

@genevieveluyt genevieveluyt enabled auto-merge (squash) November 1, 2021 14:42
@genevieveluyt genevieveluyt merged commit 6cc7a75 into Shopify:main Nov 1, 2021
@ghost
Copy link

ghost commented Nov 1, 2021

Congrats on merging your first pull request, keep em coming!

@genevieveluyt genevieveluyt mentioned this pull request Nov 1, 2021
2 tasks
@superbrothers superbrothers deleted the kind-job branch November 2, 2021 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants