Skip to content
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
9 changes: 5 additions & 4 deletions CronJob/simple.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
---
# https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: cronjob-simple
spec:
schedule: "*/1 * * * *"
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- args:
- command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster cronjob
image: busybox
image: busybox:1.28
imagePullPolicy: IfNotPresent
name: cronjob-simple-container
restartPolicy: OnFailure
7 changes: 3 additions & 4 deletions Endpoints/endpoint-slice.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/
apiVersion: discovery.k8s.io/v1beta1
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: endpoint-slices
Expand All @@ -15,6 +15,5 @@ endpoints:
conditions:
ready: true
hostname: pod-1
topology:
kubernetes.io/hostname: node-1
topology.kubernetes.io/zone: us-west2-a
nodeName: node-1
zone: us-west2-a
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: policy/v1beta1
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: pod-disruption-budget-max-unavailable-simple
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: policy/v1beta1
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: pod-disruption-budget-min-available-simple
Expand Down
11 changes: 3 additions & 8 deletions PodSecurityPolicy/restricted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ metadata:
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
allowedHostPaths:
# This allows "/foo", "/foo/", "/foo/bar" etc., but
# disallows "/fool", "/etc/foo" etc.
# "/foo/../" is never valid.
- pathPrefix: "/foo"
readOnly: true # only allow read-only mounts
allowPrivilegeEscalation: false
# This is redundant with non-root + disallow privilege escalation,
# but we can provide it for defense in depth.
Expand Down Expand Up @@ -54,5 +47,7 @@ spec:
- 'projected'
- 'secret'
- 'downwardAPI'
# Assume that persistentVolumes set up by the cluster admin are safe to use.
# Assume that ephemeral CSI drivers & persistentVolumes set up by the cluster admin are safe to use.
- 'persistentVolumeClaim'
- 'csi'
- 'ephemeral'