# Copyright (C) 2015 The Gravitee team (http://gravitee.io) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 gravitee.io/operator.version: 4.12.0-rc name: apidefinitions.gravitee.io spec: group: gravitee.io names: kind: ApiDefinition listKind: ApiDefinitionList plural: apidefinitions shortNames: - graviteeapis singular: apidefinition scope: Namespaced versions: - additionalPrinterColumns: - description: API entrypoint. jsonPath: .spec.proxy.virtual_hosts[*].path name: Entrypoint type: string - description: API endpoint. jsonPath: .spec.proxy.groups[*].endpoints[*].target name: Endpoint type: string - description: API version. jsonPath: .spec.version name: Version type: string name: v1alpha1 schema: openAPIV3Schema: description: ApiDefinition is the Schema for the apidefinitions API. properties: apiVersion: description: APIVersion defines the versioned schema of this representation of an object. type: string kind: description: Kind is a string value representing the REST resource this object represents. type: string metadata: type: object spec: description: >- The API definition is the main resource handled by the Kubernetes Operator Most of the... properties: categories: default: [] description: The list of categories the API belongs to. items: type: string type: array consoleNotificationConfiguration: description: ConsoleNotification struct sent to the mAPI, not part of the CRD spec. properties: config_type: type: string groups: items: type: string type: array hooks: items: type: string type: array origin: type: string referenceId: type: string referenceType: type: string user: type: string required: - config_type - groups - hooks - origin type: object contextRef: properties: kind: type: string name: type: string namespace: type: string required: - name type: object crossId: description: |- When promoting an API from one environment to the other, this ID identifies the API across those... type: string definition_context: description: >- The definition context is used to inform a management API instance that this API definition is... properties: mode: default: fully_managed type: string origin: default: kubernetes type: string syncFrom: default: kubernetes type: string type: object deployedAt: description: Shows the time that the API is deployed format: int64 type: integer description: description: API description type: string execution_mode: default: v4-emulation-engine description: Execution mode that eventually runs the API in the gateway enum: - v3 - v4-emulation-engine type: string flow_mode: default: DEFAULT description: The flow mode of the API. The value is either `DEFAULT` or `BEST_MATCH`. enum: - DEFAULT - BEST_MATCH type: string flows: default: [] description: The flow of the API items: properties: condition: description: Flow condition type: string consumers: default: [] description: List of the consumers of this Flow items: properties: consumerId: description: Consumer ID type: string consumerType: description: Consumer type (possible values TAG) type: integer type: object type: array enabled: default: true description: Indicate if this flow is enabled or disabled type: boolean id: description: Flow ID type: string methods: default: [] description: A list of methods for this flow (GET;POST;PUT;PATCH;DELETE;OPTIONS;HEAD;CONNECT;TRACE;OTHER) items: enum: - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - CONNECT - TRACE - OTHER type: string type: array name: description: Flow name type: string path-operator: description: List of path operators properties: operator: default: STARTS_WITH description: Operator (possible values STARTS_WITH or EQUALS) enum: - STARTS_WITH - EQUALS type: string path: description: Operator path type: string type: object post: default: [] description: Flow post step items: properties: condition: description: FlowStep condition type: string configuration: description: FlowStep configuration is a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true description: description: FlowStep description type: string enabled: default: true description: Indicate if this FlowStep is enabled or not type: boolean name: description: FlowStep name type: string policy: description: FlowStep policy type: string required: - enabled type: object type: array pre: default: [] description: Flow pre step items: properties: condition: description: FlowStep condition type: string configuration: description: FlowStep configuration is a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true description: description: FlowStep description type: string enabled: default: true description: Indicate if this FlowStep is enabled or not type: boolean name: description: FlowStep name type: string policy: description: FlowStep policy type: string required: - enabled type: object type: array required: - enabled type: object type: array gravitee: default: 2.0.0 description: The definition version of the API. For v1alpha1 resources, this field should always set to `2.0.0`. type: string groupRefs: default: [] description: |- List of group references associated with the API These groups are references to Group custom... items: properties: kind: type: string name: type: string namespace: type: string required: - name type: object type: array groups: default: [] description: List of groups associated with the API. items: type: string type: array id: description: >- The API ID. If empty, this field will take the value of the `metadata.uid` field of the resource. type: string labels: default: [] description: List of labels of the API items: type: string type: array lifecycle_state: default: CREATED description: API life cycle state can be one of the values CREATED, PUBLISHED, UNPUBLISHED, DEPRECATED, ARCHIVED enum: - CREATED - PUBLISHED - UNPUBLISHED - DEPRECATED - ARCHIVED type: string local: default: false description: local defines if the api is local or not. type: boolean members: description: List of members associated with the API items: properties: role: default: USER description: The API role associated with this Member type: string source: description: Member source example: gravitee type: string sourceId: description: Member source ID example: user@email.com type: string required: - source - sourceId type: object type: array metadata: default: [] description: List of API metadata entries items: properties: defaultValue: description: Metadata Default value type: string format: description: Metadata Format enum: - STRING - NUMERIC - BOOLEAN - DATE - MAIL - URL type: string key: description: Metadata Key type: string name: description: Metadata Name type: string value: description: Metadata Value type: string required: - format - key - name type: object type: array name: description: API name type: string notificationsRefs: default: [] description: References to Notification custom resources to setup notifications. items: properties: kind: type: string name: type: string namespace: type: string required: - name type: object type: array notifyMembers: default: true description: |- If true, new members added to the API spec will be notified when the API is synced with APIM. type: boolean pages: additionalProperties: properties: accessControls: default: [] description: If the page is private, defines a set of user groups with access items: properties: referenceId: description: The ID denied or granted by the access control (currently only group names are supported) type: string referenceType: description: >- The type of reference denied or granted by the access control Currently only GROUP is supported enum: - GROUP type: string required: - referenceId - referenceType type: object type: array api: description: The API of the page. If empty, will be set automatically to the generated ID of the API. type: string configuration: additionalProperties: type: string description: Custom page configuration (e.g. page rendering can be changed to use Redoc instead of Swagger ui) type: object content: description: The content of the page, if any. type: string crossId: description: CrossID is designed to identified a page across environments. type: string excludedAccessControls: description: >- if true, the references defined in the accessControls list will be denied access instead of being... type: boolean homepage: default: false description: If true, this page will be displayed as the homepage of your API documentation. type: boolean hrid: type: string id: description: The ID of the page. type: string name: description: This is the display name of the page in APIM and on the portal. type: string order: description: The order used to display the page in APIM and on the portal. format: int64 type: integer parent: description: >- If your page contains a folder, setting this field to the map key associated to the folder entry... type: string parentHrid: type: string parentId: description: The parent ID of the page. type: string published: default: false description: If true, the page will be accessible from the portal (default is false) type: boolean source: description: >- Source allow you to fetch pages from various external sources, overriding page content each time... properties: configuration: type: object x-kubernetes-preserve-unknown-fields: true type: type: string required: - configuration - type type: object type: description: The type of the documentation page or folder. enum: - MARKDOWN - SWAGGER - ASYNCAPI - ASCIIDOC - FOLDER - SYSTEM_FOLDER - ROOT type: string visibility: default: PUBLIC description: The visibility of the page. enum: - PUBLIC - PRIVATE type: string required: - name - type type: object description: A map of pages objects. type: object path_mappings: description: API Path mapping items: type: string type: array plans: default: [] description: API plans items: properties: api: description: Specify the API associated with this plan type: string characteristics: description: List of plan characteristics items: type: string type: array comment_required: description: Indicate of comment is required for this plan or not type: boolean crossId: description: The plan Cross ID. type: string description: description: Plan Description type: string excluded_groups: default: [] description: List of excluded groups for this plan items: type: string type: array flows: default: [] description: List of different flows for this Plan items: properties: condition: description: Flow condition type: string consumers: default: [] description: List of the consumers of this Flow items: properties: consumerId: description: Consumer ID type: string consumerType: description: Consumer type (possible values TAG) type: integer type: object type: array enabled: default: true description: Indicate if this flow is enabled or disabled type: boolean id: description: Flow ID type: string methods: default: [] description: A list of methods for this flow (GET;POST;PUT;PATCH;DELETE;OPTIONS;HEAD;CONNECT;TRACE;OTHER) items: enum: - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - CONNECT - TRACE - OTHER type: string type: array name: description: Flow name type: string path-operator: description: List of path operators properties: operator: default: STARTS_WITH description: Operator (possible values STARTS_WITH or EQUALS) enum: - STARTS_WITH - EQUALS type: string path: description: Operator path type: string type: object post: default: [] description: Flow post step items: properties: condition: description: FlowStep condition type: string configuration: description: FlowStep configuration is a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true description: description: FlowStep description type: string enabled: default: true description: Indicate if this FlowStep is enabled or not type: boolean name: description: FlowStep name type: string policy: description: FlowStep policy type: string required: - enabled type: object type: array pre: default: [] description: Flow pre step items: properties: condition: description: FlowStep condition type: string configuration: description: FlowStep configuration is a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true description: description: FlowStep description type: string enabled: default: true description: Indicate if this FlowStep is enabled or not type: boolean name: description: FlowStep name type: string policy: description: FlowStep policy type: string required: - enabled type: object type: array required: - enabled type: object type: array id: description: Plan ID type: string name: description: Plan name type: string order: description: Plan order type: integer paths: additionalProperties: items: properties: description: description: Rule description type: string enabled: description: Indicate if the Rule is enabled or not type: boolean methods: description: List of http methods for this Rule (GET;POST;PUT;PATCH;DELETE;OPTIONS;HEAD;CONNECT;TRACE;OTHER) items: enum: - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - CONNECT - TRACE - OTHER type: string type: array policy: description: Rule policy properties: configuration: description: Policy configuration is a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true name: description: Policy name type: string type: object type: object type: array description: A map of different paths (alongside their Rules) for this Plan type: object security: description: Plan Security type: string securityDefinition: description: Plan Security definition type: string selection_rule: description: Plan selection rule type: string status: default: PUBLISHED description: The plan status enum: - PUBLISHED - DEPRECATED - STAGING type: string tags: default: [] description: List of plan tags items: type: string type: array type: default: API description: Plan type enum: - API - CATALOG type: string validation: default: AUTO description: Plan validation strategy enum: - AUTO - MANUAL type: string required: - description - name - security type: object type: array properties: default: [] description: List of Properties for the API items: properties: dynamic: description: Property is dynamic or not? type: boolean encryptable: description: Property is encryptable or not? type: boolean encrypted: description: Property Encrypted or not? type: boolean key: description: Property Key type: string value: description: Property Value type: string type: object type: array proxy: description: The proxy of the API that specifies its VirtualHosts and Groups. properties: cors: description: Proxy Cors properties: allowCredentials: description: Access Control - Allow credentials or not type: boolean allowHeaders: default: [] description: Access Control - List of allowed headers items: type: string type: array allowMethods: default: [] description: Access Control - List of allowed methods items: type: string type: array allowOrigin: default: [] description: Access Control - List of Allowed origins items: type: string type: array enabled: description: Indicate if the cors enabled or not type: boolean exposeHeaders: default: [] description: Access Control - List of Exposed Headers items: type: string type: array maxAge: description: Access Control - Max age type: integer runPolicies: default: false description: Run policies or not type: boolean required: - allowCredentials - enabled - maxAge type: object failover: description: Proxy Failover properties: cases: description: List of Failover cases items: type: string type: array maxAttempts: description: Maximum number of attempts type: integer retryTimeout: description: Retry timeout format: int64 type: integer type: object groups: default: [] description: List of endpoint groups of the proxy items: properties: endpoints: description: List of Endpoints belonging to this group items: properties: backup: description: Indicate that this ia a back-end endpoint type: boolean headers: default: [] description: List of headers for this endpoint items: properties: name: description: The HTTP header name type: string value: description: The HTTP header value type: string type: object type: array healthcheck: description: Specify EndpointHealthCheck service settings properties: enabled: default: false description: Is service enabled or not? type: boolean inherit: default: false type: boolean name: description: Service name type: string schedule: type: string steps: default: [] description: List of health check steps items: properties: name: description: Health Check Step Name type: string request: description: Health Check Step Request properties: body: description: Health Check Request Body type: string fromRoot: description: If true, the health check request will be issued without prepending the context path of the API. type: boolean headers: default: [] description: List of HTTP headers to include in the health check request items: properties: name: description: The HTTP header name type: string value: description: The HTTP header value type: string type: object type: array method: description: The HTTP method to use when issuing the health check request enum: - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - CONNECT - TRACE - OTHER type: string path: description: The path of the endpoint handling the health check request type: string required: - fromRoot type: object response: description: Health Check Step Response properties: assertions: items: type: string type: array type: object type: object type: array type: object http: description: Custom HTTP client options used for this endpoint properties: clearTextUpgrade: default: true description: Should HTTP/2 clear text upgrade be used or not ? type: boolean connectTimeout: description: Connection timeout of the http connection format: int64 type: integer followRedirects: default: false description: Should HTTP redirects be followed or not ? type: boolean idleTimeout: description: " Idle Timeout for the http connection" format: int64 type: integer keepAlive: default: true type: boolean keepAliveTimeout: default: 30000 description: Should keep alive be used for the HTTP connection ? format: int64 type: integer maxChunkSize: description: Maximum size of HTTP chunks type: integer maxConcurrentConnections: description: HTTP max concurrent connections type: integer maxHeaderSize: description: Maximum size of HTTP headers type: integer pipelining: default: false description: Should HTTP/1.1 pipelining be used for the connection or not ? type: boolean propagateClientAcceptEncoding: default: false description: Propagate Client Accept-Encoding header type: boolean readTimeout: description: Read timeout format: int64 type: integer useCompression: default: false description: Should compression be used or not ? type: boolean version: default: HTTP_1_1 description: HTTP Protocol Version (Possible values Http1 or Http2) enum: - HTTP_1_1 - HTTP_2 type: string required: - followRedirects - pipelining - useCompression type: object inherit: description: Is endpoint inherited or not type: boolean name: description: Name of the endpoint type: string proxy: description: Configure the HTTP Proxy settings to reach target if needed properties: enabled: default: false description: Specifies that the HTTP connection will be established through a proxy type: boolean host: description: Proxy host name type: string password: description: The HTTP proxy password (if the proxy requires authentication) type: string port: description: The HTTP proxy port type: integer type: description: The HTTP proxy type (possible values Http, Socks4, Socks5) type: string useSystemProxy: default: false description: If true, the proxy defined at the system level will be used type: boolean username: description: The HTTP proxy username (if the proxy requires authentication) type: string type: object ssl: description: Custom HTTP SSL client options used for this endpoint properties: headers: description: Http headers items: properties: name: description: The HTTP header name type: string value: description: The HTTP header value type: string type: object type: array hostnameVerifier: default: true description: Verify Hostname when establishing connection type: boolean keyStore: description: KeyStore type (possible values PEM, PKCS12, JKS) properties: certContent: description: KeyStore cert content (Only applicable for PEM KeyStore) type: string certPath: description: KeyStore cert path (Only applicable for PEM KeyStore) type: string content: description: The base64 encoded trustStore content, if not relying on a path to a file type: string keyContent: description: >- The base64 encoded trustStore content, if not relying on a path to a file (Only applicable for PEM... type: string keyPath: description: KeyStore key path (Only applicable for PEM KeyStore) type: string password: type: string path: description: KeyStore path type: string type: description: The KeyStore type to use (possible values are PEM, PKCS12, JKS) enum: - PEM - PKCS12 - JKS type: string type: object trustAll: default: false description: Whether to trust all issuers or not type: boolean trustStore: description: TrustStore type (possible values PEM, PKCS12, JKS) properties: content: description: The base64 encoded trustStore content, if not relying on a path to a file type: string password: description: TrustStore password (Not applicable for PEM TrustStore) type: string path: type: string type: description: The TrustStore type to use (possible values are PEM, PKCS12, JKS) enum: - PEM - PKCS12 - JKS type: string type: object required: - hostnameVerifier - trustAll type: object target: description: The end target of this endpoint (backend) type: string tenants: default: [] description: The endpoint tenants items: type: string type: array type: description: The type of endpoint (HttpEndpointType or GrpcEndpointType) type: string weight: description: Endpoint weight used for load-balancing type: integer type: object type: array headers: additionalProperties: type: string description: List of headers needed for this EndpointGroup type: object http: description: Custom HTTP SSL client options used for this EndpointGroup properties: clearTextUpgrade: default: true description: Should HTTP/2 clear text upgrade be used or not ? type: boolean connectTimeout: description: Connection timeout of the http connection format: int64 type: integer followRedirects: default: false description: Should HTTP redirects be followed or not ? type: boolean idleTimeout: description: " Idle Timeout for the http connection" format: int64 type: integer keepAlive: default: true type: boolean keepAliveTimeout: default: 30000 description: Should keep alive be used for the HTTP connection ? format: int64 type: integer maxChunkSize: description: Maximum size of HTTP chunks type: integer maxConcurrentConnections: description: HTTP max concurrent connections type: integer maxHeaderSize: description: Maximum size of HTTP headers type: integer pipelining: default: false description: Should HTTP/1.1 pipelining be used for the connection or not ? type: boolean propagateClientAcceptEncoding: default: false description: Propagate Client Accept-Encoding header type: boolean readTimeout: description: Read timeout format: int64 type: integer useCompression: default: false description: Should compression be used or not ? type: boolean version: default: HTTP_1_1 description: HTTP Protocol Version (Possible values Http1 or Http2) enum: - HTTP_1_1 - HTTP_2 type: string required: - followRedirects - pipelining - useCompression type: object load_balancing: description: The LoadBalancer Type properties: type: description: Type of the LoadBalancer (RoundRobin, Random, WeightedRoundRobin, WeightedRandom) type: string type: object name: description: EndpointGroup name type: string proxy: description: Configure the HTTP Proxy settings for this EndpointGroup if needed properties: enabled: default: false description: Specifies that the HTTP connection will be established through a proxy type: boolean host: description: Proxy host name type: string password: description: The HTTP proxy password (if the proxy requires authentication) type: string port: description: The HTTP proxy port type: integer type: description: The HTTP proxy type (possible values Http, Socks4, Socks5) type: string useSystemProxy: default: false description: If true, the proxy defined at the system level will be used type: boolean username: description: The HTTP proxy username (if the proxy requires authentication) type: string type: object services: description: Specify different Endpoint Services properties: discovery: description: Endpoint Discovery Service properties: configuration: description: Configuration, arbitrary map of key-values type: object x-kubernetes-preserve-unknown-fields: true enabled: default: false description: Is service enabled or not? type: boolean name: description: Service name type: string provider: description: Provider name type: string secondary: description: Is it secondary or not? type: boolean tenants: default: [] description: List of tenants items: type: string type: array type: object dynamic-property: description: Dynamic Property Service properties: configuration: description: Configuration, arbitrary map of key-values type: object x-kubernetes-preserve-unknown-fields: true enabled: default: false description: Is service enabled or not? type: boolean name: description: Service name type: string provider: enum: - HTTP type: string schedule: type: string type: object health-check: description: Health Check Service properties: enabled: default: false description: Is service enabled or not? type: boolean name: description: Service name type: string schedule: type: string steps: default: [] description: List of health check steps items: properties: name: description: Health Check Step Name type: string request: description: Health Check Step Request properties: body: description: Health Check Request Body type: string fromRoot: description: If true, the health check request will be issued without prepending the context path of the API. type: boolean headers: default: [] description: List of HTTP headers to include in the health check request items: properties: name: description: The HTTP header name type: string value: description: The HTTP header value type: string type: object type: array method: description: The HTTP method to use when issuing the health check request enum: - GET - POST - PUT - PATCH - DELETE - OPTIONS - HEAD - CONNECT - TRACE - OTHER type: string path: description: The path of the endpoint handling the health check request type: string required: - fromRoot type: object response: description: Health Check Step Response properties: assertions: items: type: string type: array type: object type: object type: array type: object type: object ssl: description: Custom HTTP SSL client options used for this EndpointGroup properties: headers: description: Http headers items: properties: name: description: The HTTP header name type: string value: description: The HTTP header value type: string type: object type: array hostnameVerifier: default: true description: Verify Hostname when establishing connection type: boolean keyStore: description: KeyStore type (possible values PEM, PKCS12, JKS) properties: certContent: description: KeyStore cert content (Only applicable for PEM KeyStore) type: string certPath: description: KeyStore cert path (Only applicable for PEM KeyStore) type: string content: description: The base64 encoded trustStore content, if not relying on a path to a file type: string keyContent: description: >- The base64 encoded trustStore content, if not relying on a path to a file (Only applicable for PEM... type: string keyPath: description: KeyStore key path (Only applicable for PEM KeyStore) type: string password: type: string path: description: KeyStore path type: string type: description: The KeyStore type to use (possible values are PEM, PKCS12, JKS) enum: - PEM - PKCS12 - JKS type: string type: object trustAll: default: false description: Whether to trust all issuers or not type: boolean trustStore: description: TrustStore type (possible values PEM, PKCS12, JKS) properties: content: description: The base64 encoded trustStore content, if not relying on a path to a file type: string password: description: TrustStore password (Not applicable for PEM TrustStore) type: string path: type: string type: description: The TrustStore type to use (possible values are PEM, PKCS12, JKS) enum: - PEM - PKCS12 - JKS type: string type: object required: - hostnameVerifier - trustAll type: object type: object type: array logging: description: Logging properties: condition: description: The logging condition (supports EL expressions) type: string content: description: Which part of the request/response should be logged ? enum: - NONE - HEADERS - PAYLOADS - HEADERS_PAYLOADS type: string mode: description: The logging mode. enum: - NONE - CLIENT - PROXY - CLIENT_PROXY type: string scope: description: The logging scope (which phase of the request roundtrip should be included in each log entry. enum: - NONE - REQUEST - RESPONSE - REQUEST_RESPONSE type: string type: object preserve_host: description: Preserve Host type: boolean strip_context_path: description: Strip Context Path type: boolean virtual_hosts: description: list of Virtual hosts fot the proxy items: properties: host: description: Host name type: string override_entrypoint: description: Indicate if Entrypoint should be overridden or not type: boolean path: description: Path type: string type: object type: array type: object resources: default: [] description: >- Resources can be either inlined or reference the namespace and name of an - When API has been created regardless of errors, this field is used to persist the error message... properties: severe: description: >- severe errors do not pass admission and will block reconcile hence, this field should always be... items: type: string type: array warning: description: |- warning errors do not block object reconciliation, most of the time because the value is ignored or... items: type: string type: array type: object id: description: The ID of the API definition in the Gravitee API Management instance (if an API context has been... type: string organizationId: description: The organization ID, if a management context has been defined to sync with an APIM instance type: string plans: additionalProperties: type: string description: >- This field is used to store the list of plans that have been created for the API definition if a... type: object processingStatus: description: The processing status of the API definition. *** DEPRECATED *** type: string state: description: The state of the API. Can be either STARTED or STOPPED. enum: - STARTED - STOPPED type: string subscriptions: description: The number of subscriptions that reference the API type: integer type: object type: object served: true storage: true subresources: status: {}