Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jjo/bd472233f84b795dc45f4546ac834d27 to your computer and use it in GitHub Desktop.
Save jjo/bd472233f84b795dc45f4546ac834d27 to your computer and use it in GitHub Desktop.
netfilter-exporter.grafana.com_netfilterclasses.yaml
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.5
name: netfilterclasses.netfilter-exporter.grafana.com
spec:
group: netfilter-exporter.grafana.com
names:
categories:
- netfilter
kind: NetfilterClass
listKind: NetfilterClassList
plural: netfilterclasses
singular: netfilterclass
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.class
name: Class
type: string
- jsonPath: .spec.subclass
name: SubClass
type: string
- jsonPath: .spec.cidrs
name: CIDRs
type: string
- jsonPath: .spec.labelSelectors
name: LabelSelectors
type: string
- jsonPath: .spec.fieldSelectors
name: FieldSelectors
type: string
- jsonPath: .spec.weight
name: Weight
type: integer
- jsonPath: .spec.onMatch
name: OnMatch
type: string
name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
description: |-
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
type: string
kind:
description: |-
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
type: string
metadata:
type: object
spec:
properties:
cidrs:
items:
type: string
type: array
class:
type: string
fieldSelectors:
items:
type: string
type: array
labelSelectors:
items:
description: |-
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
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.
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
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
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.
type: object
type: object
x-kubernetes-map-type: atomic
type: array
onMatch:
default: return
enum:
- return
- continue
type: string
subclass:
type: string
weight:
type: integer
required:
- cidrs
- class
- subclass
- weight
type: object
x-kubernetes-validations:
- message: At least one of labelSelectors or fieldSelectors must be specified
rule: has(self.labelSelectors) && size(self.labelSelectors) > 0 || has(self.fieldSelectors)
&& size(self.fieldSelectors) > 0
status:
properties:
phase:
type: string
required:
- phase
type: object
type: object
selectableFields:
- jsonPath: .spec.class
- jsonPath: .spec.subclass
served: true
storage: true
subresources:
status: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment