Working manually configured firewall group entries
This commit is contained in:
130
config/crd/bases/unifi.engen.priv.no_firewallgroups.yaml
Normal file
130
config/crd/bases/unifi.engen.priv.no_firewallgroups.yaml
Normal file
@@ -0,0 +1,130 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
name: firewallgroups.unifi.engen.priv.no
|
||||
spec:
|
||||
group: unifi.engen.priv.no
|
||||
names:
|
||||
kind: FirewallGroup
|
||||
listKind: FirewallGroupList
|
||||
plural: firewallgroups
|
||||
singular: firewallgroup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: FirewallGroup is the Schema for the firewallgroups API.
|
||||
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:
|
||||
description: FirewallGroupSpec defines the desired state of FirewallGroup.
|
||||
properties:
|
||||
addressType:
|
||||
description: AddressType can be "ip", "cidr", or "both"
|
||||
enum:
|
||||
- ip
|
||||
- cidr
|
||||
- both
|
||||
type: string
|
||||
autoIncludeSelector:
|
||||
description: AutoIncludeSelector defines which services to extract
|
||||
addresses from
|
||||
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
|
||||
manualAddresses:
|
||||
description: ManualAddresses is a list of manual IPs or CIDRs (IPv4
|
||||
or IPv6)
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
matchServicesInAllNamespaces:
|
||||
type: boolean
|
||||
name:
|
||||
description: |-
|
||||
Foo is an example field of FirewallGroup. Edit firewallgroup_types.go to remove/update
|
||||
Description is a human-readable explanation for the object
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: FirewallGroupStatus defines the observed state of FirewallGroup.
|
||||
properties:
|
||||
lastSyncTime:
|
||||
description: LastSyncTime is the last time the object was synced
|
||||
format: date-time
|
||||
type: string
|
||||
resolvedAddresses:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
syncedWithUnifi:
|
||||
description: SyncedWithUnifi indicates whether the addresses are successfully
|
||||
pushed
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -7,6 +7,7 @@ rules:
|
||||
- apiGroups:
|
||||
- unifi.engen.priv.no
|
||||
resources:
|
||||
- firewallgroups
|
||||
- networkconfigurations
|
||||
verbs:
|
||||
- create
|
||||
@@ -19,12 +20,14 @@ rules:
|
||||
- apiGroups:
|
||||
- unifi.engen.priv.no
|
||||
resources:
|
||||
- firewallgroups/finalizers
|
||||
- networkconfigurations/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- unifi.engen.priv.no
|
||||
resources:
|
||||
- firewallgroups/status
|
||||
- networkconfigurations/status
|
||||
verbs:
|
||||
- get
|
||||
|
||||
17
config/samples/unifi_v1beta1_firewallgroup.yaml
Normal file
17
config/samples/unifi_v1beta1_firewallgroup.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: unifi.engen.priv.no/v1beta1
|
||||
kind: FirewallGroup
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: unifi-network-operator
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
name: firewallgroup-sample
|
||||
spec:
|
||||
name: Test
|
||||
manualAddresses:
|
||||
- 192.168.1.153
|
||||
- 192.168.1.154
|
||||
- 192.168.1.155
|
||||
- 2a01::3
|
||||
- 2a01:0::5
|
||||
- 2a01:2a01::/32
|
||||
# TODO(user): Add fields here
|
||||
Reference in New Issue
Block a user