This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from Shopify/fix-138-PSC
Inherit Pod SecurityContext incase Container SecurityContext is not defined #138
- Loading branch information
Showing
16 changed files
with
240 additions
and
19 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
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
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
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
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
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
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
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
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
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,17 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_false_allowed | ||
labels: | ||
apps: fakeSecurityContext | ||
audit.kubernetes.io/allow-run-as-root: "Superuser privileges needed" | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR | ||
resources: {} | ||
securityContext: {} | ||
status: {} |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_psc_false_csc_false | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: false | ||
status: {} |
19 changes: 19 additions & 0 deletions
19
fixtures/run_as_non_root_psc_false_csc_nil_multiple_cont_v1.yml
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,19 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_psc_false_csc_nil_multiple | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
hostname: multiple_containers | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR1 | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: true | ||
- name: fakeContainerRANR2 | ||
resources: {} | ||
securityContext: {} | ||
status: {} |
20 changes: 20 additions & 0 deletions
20
fixtures/run_as_non_root_psc_false_csc_true_multiple_cont_v1.yml
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,20 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_psc_false_csc_true_multiple | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
hostname: multiple_containers | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR1 | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: true | ||
- name: fakeContainerRANR2 | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: true | ||
status: {} |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_psc_false_csc_false | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: true | ||
status: {} |
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,17 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_false | ||
labels: | ||
apps: fakeSecurityContext | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
hostname: fakeRANR | ||
securityContext: | ||
runAsNonRoot: false | ||
containers: | ||
- name: fakeContainerRANR | ||
resources: {} | ||
securityContext: {} | ||
status: {} |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: run_as_non_root_psc_true_csc_false | ||
namespace: fakeDeploymentRANR | ||
spec: | ||
securityContext: | ||
runAsNonRoot: true | ||
containers: | ||
- name: fakeContainerRANR | ||
resources: {} | ||
securityContext: | ||
runAsNonRoot: false | ||
status: {} |