kuma

Форк
0
/
resource.yaml 
156 строк · 4.8 Кб
1
components:
2
  schemas:
3
    ResourceTypeDescription:
4
      description: Description of a resource type, this is useful for dynamically generated clients and the gui
5
      type: object
6
      required: [name, scope, readOnly, path, singularDisplayName, pluralDisplayName, includeInFederation]
7
      properties:
8
        name:
9
          description: the name of the resource type
10
          type: string
11
        scope:
12
          type: string
13
          enum: [Global, Mesh]
14
        readOnly:
15
          type: boolean
16
        path:
17
          description: the path to use for accessing this resource. If scope is `Global` then it will be `/<path>` otherwise it will be `/meshes/<path>`
18
          type: string
19
        singularDisplayName:
20
          type: string
21
        pluralDisplayName:
22
          type: string
23
        includeInFederation:
24
          description: description resources of this type should be included in federetion-with-policies export profile (especially useful for moving from non-federated to federated or migrating to a new global).
25
          type: boolean
26
        policy:
27
          $ref: "#/components/schemas/PolicyDescription"
28
    PolicyDescription:
29
      type: object
30
      required: [hasToTargetRef, hasFromTargetRef, isTargetRef]
31
      description: information about a policy
32
      properties:
33
        isTargetRef:
34
          description: whether this policy uses targetRef matching
35
          type: boolean
36
        hasToTargetRef:
37
          description: indicates that this policy can be used as an outbound policy
38
          type: boolean
39
        hasFromTargetRef:
40
          description: indicates that this policy can be used as an inbound policy
41
          type: boolean
42
    Meta:
43
      type: object
44
      required: [type, mesh, name]
45
      properties:
46
        type:
47
          type: string
48
          example: Dataplane
49
          description: the type of this resource
50
        mesh:
51
          type: string
52
          example: default
53
          description: the mesh this resource is part of
54
        name:
55
          type: string
56
          example: my-resource
57
          description: the name of the resource
58
    InspectRule:
59
      type: object
60
      required: [type]
61
      properties:
62
        type:
63
          type: string
64
          example: MeshRetry
65
          description: the type of the policy
66
        proxyRule:
67
          description: a rule that affects the entire proxy
68
          $ref: '#/components/schemas/ProxyRule'
69
        toRules:
70
          type: array
71
          description: a set of rules for the outbounds of this proxy
72
          items:
73
            $ref: '#/components/schemas/Rule'
74
        fromRules:
75
          type: array
76
          description: a set of rules for each inbound of this proxy
77
          items:
78
            $ref: '#/components/schemas/FromRule'
79
        warnings:
80
          type: array
81
          description: a set of warnings to show in policy matching
82
          example: ["Mesh is not Mtls enabled this policy will have no effect"]
83
          items:
84
            type: string
85
    FromRule:
86
     type: object
87
     required: [rules, inbound]
88
     properties:
89
       inbound:
90
         $ref: '#/components/schemas/Inbound'
91
       rules:
92
         type: array
93
         items:
94
           $ref: '#/components/schemas/Rule'
95
    Inbound:
96
      type: object
97
      required: [tags, port]
98
      properties:
99
        tags:
100
          type: object
101
          x-go-type: 'map[string]string'
102
        port:
103
          type: integer
104
    ProxyRule:
105
      type: object
106
      required: [conf, origin]
107
      properties:
108
        conf:
109
          description: The actual conf generated
110
          type: object
111
          x-go-type: 'interface{}'
112
        origin:
113
          type: array
114
          items:
115
            $ref: '#/components/schemas/Meta'
116
    Rule:
117
      type: object
118
      required: [matchers, conf, origin]
119
      properties:
120
        matchers:
121
          type: array
122
          items:
123
            $ref: '#/components/schemas/RuleMatcher'
124
        conf:
125
          description: The actual conf generated
126
          type: object
127
          x-go-type: 'interface{}'
128
        origin:
129
          type: array
130
          items:
131
            $ref: '#/components/schemas/Meta'
132
    RuleMatcher:
133
      type: object
134
      required: [key, value, not]
135
      description: A matcher to select which traffic this conf applies to
136
      properties:
137
        key:
138
          type: string
139
          description: the key to match against
140
          example: kuma.io/service
141
        value:
142
          type: string
143
          description: the value for the key to match against
144
          example: my-cool-service
145
        not:
146
          type: boolean
147
          description: whether we check on the absence of this key:value pair
148
    HttpMatch:
149
      type: object
150
      required: [hash, match]
151
      properties:
152
        hash:
153
          type: string
154
        match:
155
          type: object
156
          x-go-type: interface{}
157

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.