-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Policy CRD + cluster role rule (#25)
Closes #22 --------- Co-authored-by: Aviram Hassan <[email protected]>
- Loading branch information
Showing
3 changed files
with
95 additions
and
2 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
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,86 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: mirrordpolicies.policies.mirrord.metalbear.co | ||
spec: | ||
group: policies.mirrord.metalbear.co | ||
names: | ||
categories: [] | ||
kind: MirrordPolicy | ||
plural: mirrordpolicies | ||
shortNames: [] | ||
singular: mirrordpolicy | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: [] | ||
name: v1alpha | ||
schema: | ||
openAPIV3Schema: | ||
description: Auto-generated derived type for MirrordPolicySpec via `CustomResource` | ||
properties: | ||
spec: | ||
description: Custom resource for policies that limit what mirrord features users can use. | ||
properties: | ||
block: | ||
description: List of features and operations blocked by this policy. | ||
items: | ||
description: Features and operations that can be blocked by a `MirrordPolicy`. | ||
enum: | ||
- steal | ||
- steal-without-filter | ||
type: string | ||
type: array | ||
selector: | ||
description: If specified in a policy, the policy will only apply to targets with labels that match all of the selector's rules. | ||
nullable: true | ||
properties: | ||
matchExpressions: | ||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. | ||
items: | ||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. | ||
properties: | ||
key: | ||
description: key is the label key that the selector applies to. | ||
type: string | ||
operator: | ||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. | ||
enum: | ||
- In | ||
- NotIn | ||
- Exists | ||
- DoesNotExist | ||
type: string | ||
values: | ||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. | ||
items: | ||
type: string | ||
nullable: true | ||
type: array | ||
required: | ||
- key | ||
- operator | ||
type: object | ||
nullable: true | ||
type: array | ||
matchLabels: | ||
additionalProperties: | ||
type: string | ||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. | ||
nullable: true | ||
type: object | ||
type: object | ||
targetPath: | ||
description: Specify the targets for which this policy applies, in the pod/my-pod deploy/my-deploy notation. Targets can be matched using `*` and `?` where `?` matches exactly one occurrence of any character and `*` matches arbitrary many (including zero) occurrences of any character. If not specified, this policy does not depend on the target's path. | ||
nullable: true | ||
type: string | ||
required: | ||
- block | ||
type: object | ||
required: | ||
- spec | ||
title: MirrordPolicy | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: {} | ||
|