-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For the integration tests, we're deploying k8s and deploy the webhook present in this repository. We then tests various scenarios in which the webhook should act or not. One of the integration tests runs a rock with a readOnlyRootFilesystem security context and ensures that it starts properly with this webhook.
- Loading branch information
1 parent
cd60143
commit 418f119
Showing
6 changed files
with
258 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-has-mount | ||
spec: | ||
containers: | ||
- name: test | ||
image: busybox:1.28 | ||
command: ["sleep", "3600"] | ||
volumeMounts: | ||
- name: foo | ||
mountPath: /var/lib/pebble/default | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
volumes: | ||
- name: foo | ||
emptyDir: {} |
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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-mixed | ||
spec: | ||
containers: | ||
- name: test-normal | ||
image: busybox:1.28 | ||
command: ["sleep", "3600"] | ||
- name: test-readonly | ||
image: busybox:1.28 | ||
command: ["sleep", "3600"] | ||
securityContext: | ||
readOnlyRootFilesystem: true |
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,9 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-noop | ||
spec: | ||
containers: | ||
- name: test | ||
image: busybox:1.28 | ||
command: ["sleep", "3600"] |
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,10 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-rock | ||
spec: | ||
containers: | ||
- name: test-rock | ||
image: ghcr.io/canonical/mutating-pebble-webhook:0.0.1-ck0 | ||
securityContext: | ||
readOnlyRootFilesystem: true |
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,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-update-envs | ||
spec: | ||
containers: | ||
- name: test | ||
image: busybox:1.28 | ||
command: ["sleep", "3600"] | ||
env: | ||
- name: PEBBLE | ||
value: "/var/lib/foo/lish" | ||
securityContext: | ||
readOnlyRootFilesystem: true |