Skip to content

Instantly share code, notes, and snippets.

@f9n
Last active March 29, 2021 11:23
Show Gist options
  • Select an option

  • Save f9n/a8abc6c7077f63a85ecadd1f342b3dba to your computer and use it in GitHub Desktop.

Select an option

Save f9n/a8abc6c7077f63a85ecadd1f342b3dba to your computer and use it in GitHub Desktop.

Revisions

  1. f9n revised this gist Mar 29, 2021. No changes.
  2. f9n created this gist Mar 29, 2021.
    9 changes: 9 additions & 0 deletions privileged-container.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    apiVersion: constraints.gatekeeper.sh/v1beta1
    kind: K8sPSPPrivilegedContainer
    metadata:
    name: psp-privileged-container
    spec:
    match:
    kinds:
    - apiGroups: [""]
    kinds: ["Pod"]
    9 changes: 9 additions & 0 deletions psp-allow-privilege-escalation-container.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    apiVersion: constraints.gatekeeper.sh/v1beta1
    kind: K8sPSPAllowPrivilegeEscalationContainer
    metadata:
    name: psp-allow-privilege-escalation-container
    spec:
    match:
    kinds:
    - apiGroups: [""]
    kinds: ["Pod"]
    9 changes: 9 additions & 0 deletions psp-host-namespace.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    apiVersion: constraints.gatekeeper.sh/v1beta1
    kind: K8sPSPHostNamespace
    metadata:
    name: psp-host-namespace
    spec:
    match:
    kinds:
    - apiGroups: [""]
    kinds: ["Pod"]
    11 changes: 11 additions & 0 deletions psp-host-network-ports.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    apiVersion: constraints.gatekeeper.sh/v1beta1
    kind: K8sPSPHostNetworkingPorts
    metadata:
    name: psp-host-network-ports
    spec:
    match:
    kinds:
    - apiGroups: [""]
    kinds: ["Pod"]
    parameters:
    hostNetwork: false