Last generated August 20, 2026

PolicyExceptionDraft

PolicyExceptionDraft is the Schema for the policyexceptiondrafts API

Full name:
policyexceptiondrafts.policy.giantswarm.io
Group:
policy.giantswarm.io
Singular name:
policyexceptiondraft
Plural name:
policyexceptiondrafts
Scope:
Namespaced
Versions:
v1alpha1

Version v1alpha1

Example CR

apiVersion: policy.giantswarm.io/v1alpha1
kind: PolicyExceptionDraft
metadata:
  labels:
    app.kubernetes.io/managed-by: exception-recommender
  name: my-custom-operator
  namespace: policy-exceptions
spec:
  policies:
  - disallow-privilege-escalation
  - require-run-as-nonroot
  targets:
  - kind: Deployment
    names:
    - my-custom-operator
    namespaces:
    - default

Properties

.apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

.kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

.metadata

object

.spec

object

PolicyExceptionSpec defines the desired state of PolicyException

.spec.policies

array Required

Policies defines the list of policies to be excluded

.spec.policies[*]

string

.spec.targets

array Required

Targes defines the list of target workloads where the exceptions will be applied

.spec.targets[*]

object

Target defines a resource to which a PolicyException applies

.spec.targets[*].kind

string Required

.spec.targets[*].names

array Required

.spec.targets[*].names[*]

string

.spec.targets[*].namespaces

array Required

.spec.targets[*].namespaces[*]

string

This documentation page shows information based on exception-recommender v0.3.0.