Skip to content

Commit f29c136

Browse files
authored
Merge pull request #51 from eminalemdar/api-version-updates
Api version updates
2 parents 897a020 + 4c8bcdb commit f29c136

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

CronJob/simple.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
22
# https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
3-
apiVersion: batch/v1beta1
3+
apiVersion: batch/v1
44
kind: CronJob
55
metadata:
66
name: cronjob-simple
77
spec:
8-
schedule: "*/1 * * * *"
8+
schedule: "* * * * *"
99
jobTemplate:
1010
spec:
1111
template:
1212
spec:
1313
containers:
14-
- args:
14+
- command:
1515
- /bin/sh
1616
- -c
1717
- date; echo Hello from the Kubernetes cluster cronjob
18-
image: busybox
18+
image: busybox:1.28
19+
imagePullPolicy: IfNotPresent
1920
name: cronjob-simple-container
2021
restartPolicy: OnFailure

Endpoints/endpoint-slice.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/
3-
apiVersion: discovery.k8s.io/v1beta1
3+
apiVersion: discovery.k8s.io/v1
44
kind: EndpointSlice
55
metadata:
66
name: endpoint-slices
@@ -15,6 +15,5 @@ endpoints:
1515
conditions:
1616
ready: true
1717
hostname: pod-1
18-
topology:
19-
kubernetes.io/hostname: node-1
20-
topology.kubernetes.io/zone: us-west2-a
18+
nodeName: node-1
19+
zone: us-west2-a

PodDisruptionBudget/pod-disruption-budget-max-unavailable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: policy/v1beta1
2+
apiVersion: policy/v1
33
kind: PodDisruptionBudget
44
metadata:
55
name: pod-disruption-budget-max-unavailable-simple

PodDisruptionBudget/pod-disruption-budget-min-available.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: policy/v1beta1
2+
apiVersion: policy/v1
33
kind: PodDisruptionBudget
44
metadata:
55
name: pod-disruption-budget-min-available-simple

PodSecurityPolicy/restricted.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ metadata:
99
annotations:
1010
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
1111
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
12-
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
1312
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
1413
spec:
15-
allowedHostPaths:
16-
# This allows "/foo", "/foo/", "/foo/bar" etc., but
17-
# disallows "/fool", "/etc/foo" etc.
18-
# "/foo/../" is never valid.
19-
- pathPrefix: "/foo"
20-
readOnly: true # only allow read-only mounts
2114
allowPrivilegeEscalation: false
2215
# This is redundant with non-root + disallow privilege escalation,
2316
# but we can provide it for defense in depth.
@@ -54,5 +47,7 @@ spec:
5447
- 'projected'
5548
- 'secret'
5649
- 'downwardAPI'
57-
# Assume that persistentVolumes set up by the cluster admin are safe to use.
50+
# Assume that ephemeral CSI drivers & persistentVolumes set up by the cluster admin are safe to use.
5851
- 'persistentVolumeClaim'
52+
- 'csi'
53+
- 'ephemeral'

0 commit comments

Comments
 (0)