-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create rule S6596 add Ansible (#4442)
* Add ansible to rule S6596 * Create rule S6596 add Ansible --------- Co-authored-by: mstachniuk <[email protected]> Co-authored-by: Marcin Stachniuk <[email protected]>
- Loading branch information
1 parent
3d0af4f
commit b835eba
Showing
4 changed files
with
68 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
:image_type: container | ||
|
||
include::../common/description.adoc[] | ||
|
||
== How to fix it | ||
|
||
include::../common/how-to-fix.adoc[] | ||
|
||
=== Code examples | ||
|
||
==== Noncompliant code example | ||
[source,yaml,diff-id=1,diff-type=noncompliant] | ||
---- | ||
- name: Create Pod | ||
kubernetes.core.k8s: | ||
definition: | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: example | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx # Noncompliant | ||
- name: nginx | ||
image: nginx:latest # Noncompliant | ||
---- | ||
|
||
==== Compliant solution | ||
|
||
[source,yaml,diff-id=1,diff-type=compliant] | ||
---- | ||
- name: Create Pod | ||
kubernetes.core.k8s: | ||
definition: | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: example | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.14.2 # Compliant, fixed tag | ||
- name: nginx | ||
image: nginx@sha256:b0ad43f7ee5edbc0effbc14645ae7055e21bc1973aee5150745632a24a752661 # Compliant, SHA of the image | ||
---- | ||
|
||
include::../common/how-does-this-work.adoc[] | ||
|
||
include::../common/extra-mile.adoc[] | ||
|
||
include::../common/resources.adoc[] | ||
|
||
include::../common/implementation-specific.adoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
== Resources | ||
=== Documentation | ||
|
||
* https://helm.sh/docs/chart_best_practices/pods/#images[Helm chart best practices - Images] | ||
* https://kubernetes.io/docs/concepts/containers/images/[Kubernetes - Images] | ||
* https://docs.docker.com/engine/reference/commandline/image_pull/#pull-an-image-by-digest-immutable-identifier[Pull an image by digest (immutable identifier)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters