Skip to content

Commit 31e4dd0

Browse files
committed
Add trafficControlController to handle TrafficControl requests
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
1 parent 7fea8d3 commit 31e4dd0

28 files changed

Lines changed: 1784 additions & 26 deletions

File tree

build/yamls/antrea-aks.yml

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,120 @@ spec:
20552055
subresources:
20562056
status: {}
20572057
---
2058+
apiVersion: apiextensions.k8s.io/v1
2059+
kind: CustomResourceDefinition
2060+
metadata:
2061+
labels:
2062+
app: antrea
2063+
name: trafficcontrols.crd.antrea.io
2064+
spec:
2065+
group: crd.antrea.io
2066+
names:
2067+
kind: TrafficControl
2068+
plural: trafficcontrols
2069+
shortNames:
2070+
- tc
2071+
singular: trafficcontrol
2072+
scope: Cluster
2073+
versions:
2074+
- additionalPrinterColumns:
2075+
- description: Specifies the traffic control direction for the selected workloads.
2076+
jsonPath: .spec.direction
2077+
name: Direction
2078+
type: string
2079+
- description: Specifies the traffic control action for the selected workloads.
2080+
jsonPath: .spec.action
2081+
name: Action
2082+
type: string
2083+
- description: Specifies the traffic control device for the selected workloads.
2084+
jsonPath: .spec.device
2085+
name: Device
2086+
type: string
2087+
- jsonPath: .metadata.creationTimestamp
2088+
name: Age
2089+
type: date
2090+
name: v1alpha2
2091+
schema:
2092+
openAPIV3Schema:
2093+
properties:
2094+
spec:
2095+
properties:
2096+
action:
2097+
type: string
2098+
appliedTo:
2099+
properties:
2100+
namespaceSelector:
2101+
properties:
2102+
matchExpressions:
2103+
items:
2104+
properties:
2105+
key:
2106+
type: string
2107+
operator:
2108+
enum:
2109+
- In
2110+
- NotIn
2111+
- Exists
2112+
- DoesNotExist
2113+
type: string
2114+
values:
2115+
items:
2116+
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
2117+
type: string
2118+
type: array
2119+
type: object
2120+
type: array
2121+
matchLabels:
2122+
x-kubernetes-preserve-unknown-fields: true
2123+
type: object
2124+
podSelector:
2125+
properties:
2126+
matchExpressions:
2127+
items:
2128+
properties:
2129+
key:
2130+
type: string
2131+
operator:
2132+
enum:
2133+
- In
2134+
- NotIn
2135+
- Exists
2136+
- DoesNotExist
2137+
type: string
2138+
values:
2139+
items:
2140+
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
2141+
type: string
2142+
type: array
2143+
type: object
2144+
type: array
2145+
matchLabels:
2146+
x-kubernetes-preserve-unknown-fields: true
2147+
type: object
2148+
type: object
2149+
device:
2150+
type: string
2151+
direction:
2152+
type: string
2153+
required:
2154+
- appliedTo
2155+
- direction
2156+
- action
2157+
- device
2158+
type: object
2159+
status:
2160+
properties:
2161+
pods:
2162+
type: string
2163+
type: object
2164+
required:
2165+
- spec
2166+
type: object
2167+
served: true
2168+
storage: true
2169+
subresources:
2170+
status: {}
2171+
---
20582172
apiVersion: v1
20592173
kind: ServiceAccount
20602174
metadata:
@@ -2404,6 +2518,7 @@ rules:
24042518
- crd.antrea.io
24052519
resources:
24062520
- egresses
2521+
- trafficcontrols
24072522
verbs:
24082523
- get
24092524
- watch
@@ -2412,6 +2527,7 @@ rules:
24122527
- crd.antrea.io
24132528
resources:
24142529
- egresses/status
2530+
- trafficcontrols/status
24152531
verbs:
24162532
- update
24172533
- apiGroups:
@@ -2659,6 +2775,7 @@ rules:
26592775
- crd.antrea.io
26602776
resources:
26612777
- egresses
2778+
- trafficcontrols
26622779
verbs:
26632780
- get
26642781
- watch
@@ -2787,6 +2904,8 @@ data:
27872904
# Enable managing external IPs of Services of LoadBalancer type.
27882905
# ServiceExternalIP: false
27892906
2907+
# TrafficControl: false
2908+
27902909
# Name of the OpenVSwitch bridge antrea-agent will create and use.
27912910
# Make sure it doesn't conflict with your existing OpenVSwitch bridges.
27922911
#ovsBridge: br-int
@@ -3025,6 +3144,8 @@ data:
30253144
# Enable managing external IPs of Services of LoadBalancer type.
30263145
# ServiceExternalIP: false
30273146
3147+
# TrafficControl: false
3148+
30283149
# The port for the antrea-controller APIServer to serve on.
30293150
# Note that if it's set to another value, the `containerPort` of the `api` port of the
30303151
# `antrea-controller` container must be set to the same value.
@@ -3076,7 +3197,7 @@ kind: ConfigMap
30763197
metadata:
30773198
labels:
30783199
app: antrea
3079-
name: antrea-config-82h2mk24gg
3200+
name: antrea-config-7gmkb9gfmt
30803201
namespace: kube-system
30813202
---
30823203
apiVersion: v1
@@ -3147,7 +3268,7 @@ spec:
31473268
fieldRef:
31483269
fieldPath: spec.serviceAccountName
31493270
- name: ANTREA_CONFIG_MAP_NAME
3150-
value: antrea-config-82h2mk24gg
3271+
value: antrea-config-7gmkb9gfmt
31513272
image: projects.registry.vmware.com/antrea/antrea-ubuntu:latest
31523273
imagePullPolicy: IfNotPresent
31533274
livenessProbe:
@@ -3198,7 +3319,7 @@ spec:
31983319
key: node-role.kubernetes.io/master
31993320
volumes:
32003321
- configMap:
3201-
name: antrea-config-82h2mk24gg
3322+
name: antrea-config-7gmkb9gfmt
32023323
name: antrea-config
32033324
- name: antrea-controller-tls
32043325
secret:
@@ -3437,7 +3558,7 @@ spec:
34373558
operator: Exists
34383559
volumes:
34393560
- configMap:
3440-
name: antrea-config-82h2mk24gg
3561+
name: antrea-config-7gmkb9gfmt
34413562
name: antrea-config
34423563
- hostPath:
34433564
path: /etc/cni/net.d

build/yamls/antrea-eks.yml

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,6 +2055,120 @@ spec:
20552055
subresources:
20562056
status: {}
20572057
---
2058+
apiVersion: apiextensions.k8s.io/v1
2059+
kind: CustomResourceDefinition
2060+
metadata:
2061+
labels:
2062+
app: antrea
2063+
name: trafficcontrols.crd.antrea.io
2064+
spec:
2065+
group: crd.antrea.io
2066+
names:
2067+
kind: TrafficControl
2068+
plural: trafficcontrols
2069+
shortNames:
2070+
- tc
2071+
singular: trafficcontrol
2072+
scope: Cluster
2073+
versions:
2074+
- additionalPrinterColumns:
2075+
- description: Specifies the traffic control direction for the selected workloads.
2076+
jsonPath: .spec.direction
2077+
name: Direction
2078+
type: string
2079+
- description: Specifies the traffic control action for the selected workloads.
2080+
jsonPath: .spec.action
2081+
name: Action
2082+
type: string
2083+
- description: Specifies the traffic control device for the selected workloads.
2084+
jsonPath: .spec.device
2085+
name: Device
2086+
type: string
2087+
- jsonPath: .metadata.creationTimestamp
2088+
name: Age
2089+
type: date
2090+
name: v1alpha2
2091+
schema:
2092+
openAPIV3Schema:
2093+
properties:
2094+
spec:
2095+
properties:
2096+
action:
2097+
type: string
2098+
appliedTo:
2099+
properties:
2100+
namespaceSelector:
2101+
properties:
2102+
matchExpressions:
2103+
items:
2104+
properties:
2105+
key:
2106+
type: string
2107+
operator:
2108+
enum:
2109+
- In
2110+
- NotIn
2111+
- Exists
2112+
- DoesNotExist
2113+
type: string
2114+
values:
2115+
items:
2116+
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
2117+
type: string
2118+
type: array
2119+
type: object
2120+
type: array
2121+
matchLabels:
2122+
x-kubernetes-preserve-unknown-fields: true
2123+
type: object
2124+
podSelector:
2125+
properties:
2126+
matchExpressions:
2127+
items:
2128+
properties:
2129+
key:
2130+
type: string
2131+
operator:
2132+
enum:
2133+
- In
2134+
- NotIn
2135+
- Exists
2136+
- DoesNotExist
2137+
type: string
2138+
values:
2139+
items:
2140+
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
2141+
type: string
2142+
type: array
2143+
type: object
2144+
type: array
2145+
matchLabels:
2146+
x-kubernetes-preserve-unknown-fields: true
2147+
type: object
2148+
type: object
2149+
device:
2150+
type: string
2151+
direction:
2152+
type: string
2153+
required:
2154+
- appliedTo
2155+
- direction
2156+
- action
2157+
- device
2158+
type: object
2159+
status:
2160+
properties:
2161+
pods:
2162+
type: string
2163+
type: object
2164+
required:
2165+
- spec
2166+
type: object
2167+
served: true
2168+
storage: true
2169+
subresources:
2170+
status: {}
2171+
---
20582172
apiVersion: v1
20592173
kind: ServiceAccount
20602174
metadata:
@@ -2404,6 +2518,7 @@ rules:
24042518
- crd.antrea.io
24052519
resources:
24062520
- egresses
2521+
- trafficcontrols
24072522
verbs:
24082523
- get
24092524
- watch
@@ -2412,6 +2527,7 @@ rules:
24122527
- crd.antrea.io
24132528
resources:
24142529
- egresses/status
2530+
- trafficcontrols/status
24152531
verbs:
24162532
- update
24172533
- apiGroups:
@@ -2659,6 +2775,7 @@ rules:
26592775
- crd.antrea.io
26602776
resources:
26612777
- egresses
2778+
- trafficcontrols
26622779
verbs:
26632780
- get
26642781
- watch
@@ -2787,6 +2904,8 @@ data:
27872904
# Enable managing external IPs of Services of LoadBalancer type.
27882905
# ServiceExternalIP: false
27892906
2907+
# TrafficControl: false
2908+
27902909
# Name of the OpenVSwitch bridge antrea-agent will create and use.
27912910
# Make sure it doesn't conflict with your existing OpenVSwitch bridges.
27922911
#ovsBridge: br-int
@@ -3025,6 +3144,8 @@ data:
30253144
# Enable managing external IPs of Services of LoadBalancer type.
30263145
# ServiceExternalIP: false
30273146
3147+
# TrafficControl: false
3148+
30283149
# The port for the antrea-controller APIServer to serve on.
30293150
# Note that if it's set to another value, the `containerPort` of the `api` port of the
30303151
# `antrea-controller` container must be set to the same value.
@@ -3076,7 +3197,7 @@ kind: ConfigMap
30763197
metadata:
30773198
labels:
30783199
app: antrea
3079-
name: antrea-config-82h2mk24gg
3200+
name: antrea-config-7gmkb9gfmt
30803201
namespace: kube-system
30813202
---
30823203
apiVersion: v1
@@ -3147,7 +3268,7 @@ spec:
31473268
fieldRef:
31483269
fieldPath: spec.serviceAccountName
31493270
- name: ANTREA_CONFIG_MAP_NAME
3150-
value: antrea-config-82h2mk24gg
3271+
value: antrea-config-7gmkb9gfmt
31513272
image: projects.registry.vmware.com/antrea/antrea-ubuntu:latest
31523273
imagePullPolicy: IfNotPresent
31533274
livenessProbe:
@@ -3198,7 +3319,7 @@ spec:
31983319
key: node-role.kubernetes.io/master
31993320
volumes:
32003321
- configMap:
3201-
name: antrea-config-82h2mk24gg
3322+
name: antrea-config-7gmkb9gfmt
32023323
name: antrea-config
32033324
- name: antrea-controller-tls
32043325
secret:
@@ -3439,7 +3560,7 @@ spec:
34393560
operator: Exists
34403561
volumes:
34413562
- configMap:
3442-
name: antrea-config-82h2mk24gg
3563+
name: antrea-config-7gmkb9gfmt
34433564
name: antrea-config
34443565
- hostPath:
34453566
path: /etc/cni/net.d

0 commit comments

Comments
 (0)