Skip to content

Commit

Permalink
Add trafficControlController to handle TrafficControl requests
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Apr 12, 2022
1 parent 7fea8d3 commit 31e4dd0
Show file tree
Hide file tree
Showing 28 changed files with 1,784 additions and 26 deletions.
129 changes: 125 additions & 4 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,120 @@ spec:
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
name: trafficcontrols.crd.antrea.io
spec:
group: crd.antrea.io
names:
kind: TrafficControl
plural: trafficcontrols
shortNames:
- tc
singular: trafficcontrol
scope: Cluster
versions:
- additionalPrinterColumns:
- description: Specifies the traffic control direction for the selected workloads.
jsonPath: .spec.direction
name: Direction
type: string
- description: Specifies the traffic control action for the selected workloads.
jsonPath: .spec.action
name: Action
type: string
- description: Specifies the traffic control device for the selected workloads.
jsonPath: .spec.device
name: Device
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha2
schema:
openAPIV3Schema:
properties:
spec:
properties:
action:
type: string
appliedTo:
properties:
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
podSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
type: object
device:
type: string
direction:
type: string
required:
- appliedTo
- direction
- action
- device
type: object
status:
properties:
pods:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -2404,6 +2518,7 @@ rules:
- crd.antrea.io
resources:
- egresses
- trafficcontrols
verbs:
- get
- watch
Expand All @@ -2412,6 +2527,7 @@ rules:
- crd.antrea.io
resources:
- egresses/status
- trafficcontrols/status
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -2659,6 +2775,7 @@ rules:
- crd.antrea.io
resources:
- egresses
- trafficcontrols
verbs:
- get
- watch
Expand Down Expand Up @@ -2787,6 +2904,8 @@ data:
# Enable managing external IPs of Services of LoadBalancer type.
# ServiceExternalIP: false
# TrafficControl: false
# Name of the OpenVSwitch bridge antrea-agent will create and use.
# Make sure it doesn't conflict with your existing OpenVSwitch bridges.
#ovsBridge: br-int
Expand Down Expand Up @@ -3025,6 +3144,8 @@ data:
# Enable managing external IPs of Services of LoadBalancer type.
# ServiceExternalIP: false
# TrafficControl: false
# The port for the antrea-controller APIServer to serve on.
# Note that if it's set to another value, the `containerPort` of the `api` port of the
# `antrea-controller` container must be set to the same value.
Expand Down Expand Up @@ -3076,7 +3197,7 @@ kind: ConfigMap
metadata:
labels:
app: antrea
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -3147,7 +3268,7 @@ spec:
fieldRef:
fieldPath: spec.serviceAccountName
- name: ANTREA_CONFIG_MAP_NAME
value: antrea-config-82h2mk24gg
value: antrea-config-7gmkb9gfmt
image: projects.registry.vmware.com/antrea/antrea-ubuntu:latest
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down Expand Up @@ -3198,7 +3319,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -3437,7 +3558,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
129 changes: 125 additions & 4 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,120 @@ spec:
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
name: trafficcontrols.crd.antrea.io
spec:
group: crd.antrea.io
names:
kind: TrafficControl
plural: trafficcontrols
shortNames:
- tc
singular: trafficcontrol
scope: Cluster
versions:
- additionalPrinterColumns:
- description: Specifies the traffic control direction for the selected workloads.
jsonPath: .spec.direction
name: Direction
type: string
- description: Specifies the traffic control action for the selected workloads.
jsonPath: .spec.action
name: Action
type: string
- description: Specifies the traffic control device for the selected workloads.
jsonPath: .spec.device
name: Device
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha2
schema:
openAPIV3Schema:
properties:
spec:
properties:
action:
type: string
appliedTo:
properties:
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
podSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
type: object
device:
type: string
direction:
type: string
required:
- appliedTo
- direction
- action
- device
type: object
status:
properties:
pods:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -2404,6 +2518,7 @@ rules:
- crd.antrea.io
resources:
- egresses
- trafficcontrols
verbs:
- get
- watch
Expand All @@ -2412,6 +2527,7 @@ rules:
- crd.antrea.io
resources:
- egresses/status
- trafficcontrols/status
verbs:
- update
- apiGroups:
Expand Down Expand Up @@ -2659,6 +2775,7 @@ rules:
- crd.antrea.io
resources:
- egresses
- trafficcontrols
verbs:
- get
- watch
Expand Down Expand Up @@ -2787,6 +2904,8 @@ data:
# Enable managing external IPs of Services of LoadBalancer type.
# ServiceExternalIP: false
# TrafficControl: false
# Name of the OpenVSwitch bridge antrea-agent will create and use.
# Make sure it doesn't conflict with your existing OpenVSwitch bridges.
#ovsBridge: br-int
Expand Down Expand Up @@ -3025,6 +3144,8 @@ data:
# Enable managing external IPs of Services of LoadBalancer type.
# ServiceExternalIP: false
# TrafficControl: false
# The port for the antrea-controller APIServer to serve on.
# Note that if it's set to another value, the `containerPort` of the `api` port of the
# `antrea-controller` container must be set to the same value.
Expand Down Expand Up @@ -3076,7 +3197,7 @@ kind: ConfigMap
metadata:
labels:
app: antrea
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -3147,7 +3268,7 @@ spec:
fieldRef:
fieldPath: spec.serviceAccountName
- name: ANTREA_CONFIG_MAP_NAME
value: antrea-config-82h2mk24gg
value: antrea-config-7gmkb9gfmt
image: projects.registry.vmware.com/antrea/antrea-ubuntu:latest
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down Expand Up @@ -3198,7 +3319,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -3439,7 +3560,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-82h2mk24gg
name: antrea-config-7gmkb9gfmt
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
Loading

0 comments on commit 31e4dd0

Please sign in to comment.