@@ -50,13 +50,6 @@ NetworkPolicy 描述针对一组 Pod 所允许的网络流量。
50
50
-->
51
51
spec 表示 NetworkPolicy 预期行为的规约。
52
52
53
- - ** status** (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicyStatus" >}}">NetworkPolicyStatus</a >)
54
- <!--
55
- status represents the current state of the NetworkPolicy. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
56
- -->
57
- status 表示 NetworkPolicy 的当前状态。更多信息:
58
- https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
59
-
60
53
## NetworkPolicySpec {#NetworkPolicySpec}
61
54
62
55
<!--
@@ -421,111 +414,6 @@ NetworkPolicySpec 定义特定 NetworkPolicy 所需的所有信息.
421
414
422
415
protocol 表示流量必须匹配的网络协议(TCP、UDP 或 SCTP)。如果未指定,此字段默认为 TCP。
423
416
424
- ## NetworkPolicyStatus {#NetworkPolicyStatus}
425
-
426
- <!--
427
- NetworkPolicyStatus describes the current state of the NetworkPolicy.
428
- -->
429
- NetworkPolicyStatus 描述有关此 NetworkPolicy 的当前状态。
430
-
431
- <hr >
432
-
433
- <!--
434
- - **conditions** ([]Condition)
435
-
436
- *Patch strategy: merge on key `type`*
437
-
438
- *Map: unique values on key type will be kept during a merge*
439
-
440
- conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state
441
-
442
- <a name="Condition"></a>
443
- *Condition contains details for one aspect of the current state of this API Resource.*
444
- -->
445
-
446
- - ** conditions** ([ ] Condition)
447
-
448
- ** 补丁策略:根据 ` type ` 键执行合并操作**
449
-
450
- ** Map:键 type 的唯一值将在合并期间被保留**
451
-
452
- conditions 包含描述此 NetworkPolicy 状态的 metav1.Condition 数组,即当前服务状态。
453
-
454
- <a name =" Condition " ></a >
455
- ** Condition 包含此 API 资源当前状态的一个方面的详细信息。**
456
-
457
- <!--
458
- - **conditions.lastTransitionTime** (Time), required
459
-
460
- lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
461
-
462
- <a name="Time"></a>
463
- *Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
464
- -->
465
-
466
- - ** conditions.lastTransitionTime** (Time),必需
467
-
468
- lastTransitionTime 是状况最近一次从一种状态转换到另一种状态的时间。
469
- 这种变化通常出现在下层状况发生变化的时候。如果无法了解下层状况变化,使用 API 字段更改的时间也是可以接受的。
470
-
471
- <a name =" Time " ></a >
472
- ** Time 是 time.Time 的包装器,它支持对 YAML 和 JSON 的正确编组。
473
- time 包的许多工厂方法提供了包装器。**
474
-
475
- <!--
476
- - **conditions.message** (string), required
477
-
478
- message is a human readable message indicating details about the transition. This may be an empty string.
479
- -->
480
-
481
- - ** conditions.message** (string),必需
482
-
483
- message 是一条人类可读的消息,指示有关转换的详细信息。它可能是一个空字符串。
484
-
485
- <!--
486
- - **conditions.reason** (string), required
487
-
488
- reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
489
- -->
490
-
491
- - ** conditions.reason** (string),必需
492
-
493
- reason 包含一个程序标识符,指示状况最后一次转换的原因。
494
- 特定状况类型的生产者可以定义该字段的预期值和含义,以及这些值是否可被视为有保证的 API。
495
- 该值应该是 CamelCase 字符串。此字段不能为空。
496
-
497
- <!--
498
- - **conditions.status** (string), required
499
-
500
- status of the condition, one of True, False, Unknown.
501
- -->
502
-
503
- - ** conditions.status** (string),必需
504
-
505
- 状况的状态为 True、False、Unknown 之一。
506
-
507
- <!--
508
- - **conditions.type** (string), required
509
-
510
- type of condition in CamelCase or in foo.example.com/CamelCase.
511
- -->
512
-
513
- - ** conditions.type** (string),必需
514
-
515
- CamelCase 或 foo.example.com/CamelCase 形式的状况类型。
516
-
517
- <!--
518
- - **conditions.observedGeneration** (int64)
519
-
520
- observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
521
- -->
522
-
523
- - ** conditions.observedGeneration** (int64)
524
-
525
- observedGeneration 表示设置状况时所基于的 ` .metadata.generation ` 。
526
- 例如,如果 ` .metadata.generation ` 当前为 12,但 ` .status.conditions[x].observedGeneration ` 为 9,
527
- 则状况相对于实例的当前状态已过期。
528
-
529
417
## NetworkPolicyList {#NetworkPolicyList}
530
418
531
419
<!--
@@ -618,57 +506,6 @@ GET /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
618
506
619
507
401: Unauthorized
620
508
621
- <!--
622
- ### `get` read status of the specified NetworkPolicy
623
-
624
- #### HTTP Request
625
- -->
626
-
627
- ### ` get ` 读取指定的 NetworkPolicy 的状态
628
-
629
- GET /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status
630
-
631
- <!--
632
- #### Parameters
633
- -->
634
- #### 参数
635
-
636
- <!--
637
- - **name** (*in path*): string, required
638
-
639
- name of the NetworkPolicy
640
- -->
641
- - ** name** (** 路径参数** ): string,必需
642
-
643
- NetworkPolicy 的名称。
644
-
645
- <!--
646
- - **namespace** (*in path*): string, required
647
-
648
- <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
649
- -->
650
- - ** namespace** (** 路径参数** ): string,必需
651
-
652
- <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
653
-
654
- <!--
655
- - **pretty** (*in query*): string
656
-
657
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
658
- -->
659
- - ** pretty** (** 查询参数** ): string
660
-
661
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
662
-
663
- <!--
664
- #### Response
665
- -->
666
- #### 响应
667
-
668
- 200 (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >): OK
669
-
670
- 401: Unauthorized
671
-
672
509
<!--
673
510
### `list` list or watch objects of kind NetworkPolicy
674
511
@@ -1029,96 +866,16 @@ PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
1029
866
- **namespace** (*in path*): string, required
1030
867
1031
868
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
1032
- -->
1033
- - ** namespace** (** 路径参数** ): string,必需
1034
-
1035
- <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
1036
-
1037
- <!--
1038
- - **body**: <a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a>,必需
1039
-
1040
- - **dryRun** (*in query*): string
1041
-
1042
- <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
1043
-
1044
- - **fieldManager** (*in query*): string
1045
-
1046
- <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
1047
-
1048
- - **fieldValidation** (*in query*): string
1049
-
1050
- <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>
1051
-
1052
- - **pretty** (*in query*): string
1053
-
1054
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
1055
- -->
1056
- - ** body** : <a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >,必需
1057
-
1058
- - ** dryRun** (** 查询参数** ): string
1059
-
1060
- <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a >
1061
-
1062
- - ** fieldManager** (** 查询参数** ): string
1063
-
1064
- <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a >
1065
-
1066
- - ** fieldValidation** (** 查询参数** ): string
1067
-
1068
- <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
1069
-
1070
- - ** pretty** (** 查询参数** ): string
1071
-
1072
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
1073
-
1074
- <!--
1075
- #### Response
1076
- -->
1077
- #### 响应
1078
-
1079
- 200 (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >): OK
1080
-
1081
- 201 (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >): Created
1082
-
1083
- 401: Unauthorized
1084
-
1085
- <!--
1086
- ### `update` replace status of the specified NetworkPolicy
1087
-
1088
- #### HTTP Request
1089
- -->
1090
- ### ` update ` 替换指定的 NetworkPolicy 的状态
1091
-
1092
- #### HTTP 请求
1093
-
1094
- PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status
1095
-
1096
- <!--
1097
- #### Parameters
1098
- -->
1099
- #### 参数
1100
-
1101
- <!--
1102
- - **name** (*in path*): string, required
1103
-
1104
- name of the NetworkPolicy
1105
- -->
1106
- - ** name** (** 路径参数** ): string,必需
1107
-
1108
- NetworkPolicy 的名称。
1109
-
1110
- <!--
1111
- - **namespace** (*in path*): string, required
1112
869
1113
- <a href="{{< ref "../common-parameters/common-parameters#namespace " >}}">namespace </a>
870
+ - **body**: <a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy " >}}">NetworkPolicy </a>, required
1114
871
-->
1115
872
- ** namespace** (** 路径参数** ): string,必需
1116
873
1117
874
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
1118
875
1119
- <!--
1120
876
- ** body** : <a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >,必需
1121
877
878
+ <!--
1122
879
- **dryRun** (*in query*): string
1123
880
1124
881
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
@@ -1193,104 +950,16 @@ PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
1193
950
- **namespace** (*in path*): string, required
1194
951
1195
952
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
1196
- -->
1197
- - ** namespace** (** 路径参数** ): string,必需
1198
-
1199
- <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
1200
953
1201
- <!--
1202
954
- **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>, required
1203
-
1204
- - **dryRun** (*in query*): string
1205
-
1206
- <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
1207
-
1208
- - **fieldManager** (*in query*): string
1209
-
1210
- <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a>
1211
-
1212
- - **fieldValidation** (*in query*): string
1213
-
1214
- <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>
1215
-
1216
- - **force** (*in query*): boolean
1217
-
1218
- <a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a>
1219
-
1220
- - **pretty** (*in query*): string
1221
-
1222
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
1223
- -->
1224
- - ** body** : <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a >,必需
1225
-
1226
- - ** dryRun** (** 查询参数** ): string
1227
-
1228
- <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a >
1229
-
1230
- - ** fieldManager** (** 查询参数** ): string
1231
-
1232
- <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a >
1233
-
1234
- - ** fieldValidation** (** 查询参数** ): string
1235
-
1236
- <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
1237
-
1238
- - ** force** (_ in query_ ): boolean
1239
-
1240
- <a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a >
1241
-
1242
- - ** pretty** (** 查询参数** ): string
1243
-
1244
- <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
1245
-
1246
- <!--
1247
- #### Response
1248
- -->
1249
- #### 响应
1250
-
1251
- 200 (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >): OK
1252
-
1253
- 201 (<a href="{{< ref "../policy-resources/network-policy-v1#NetworkPolicy" >}}">NetworkPolicy</a >): Created
1254
-
1255
- 401: Unauthorized
1256
-
1257
- <!--
1258
- ### `patch` partially update status of the specified NetworkPolicy
1259
-
1260
- #### HTTP Request
1261
- -->
1262
- ### ` patch ` 部分更新指定的 NetworkPolicy 的状态
1263
-
1264
- #### HTTP 请求
1265
-
1266
- PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status
1267
-
1268
- <!--
1269
- #### Parameters
1270
- -->
1271
- #### 参数
1272
-
1273
- <!--
1274
- - **name** (*in path*): string, required
1275
-
1276
- name of the NetworkPolicy
1277
- -->
1278
- - ** name** (** 路径参数** ): string,必需
1279
-
1280
- NetworkPolicy 的名称。
1281
-
1282
- <!--
1283
- - **namespace** (*in path*): string, required
1284
-
1285
- <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
1286
955
-->
1287
956
- ** namespace** (** 路径参数** ): string,必需
1288
957
1289
958
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
1290
959
1291
- <!--
1292
- - **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>, required
960
+ - ** body** : <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a >,必需
1293
961
962
+ <!--
1294
963
- **dryRun** (*in query*): string
1295
964
1296
965
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a>
@@ -1311,8 +980,6 @@ PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/s
1311
980
1312
981
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
1313
982
-->
1314
- - ** body** : <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a >,必需
1315
-
1316
983
- ** dryRun** (** 查询参数** ): string
1317
984
1318
985
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a >
0 commit comments