# 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: apiv4definitions.gravitee.io spec: group: gravitee.io names: kind: ApiV4Definition listKind: ApiV4DefinitionList plural: apiv4definitions shortNames: - graviteev4apis singular: apiv4definition scope: Namespaced versions: - additionalPrinterColumns: - description: State jsonPath: .spec.state name: State type: string - description: Lifecycle State jsonPath: .spec.lifecycleState name: Lifecycle State type: string - description: API version. jsonPath: .spec.version name: Version type: string name: v1alpha1 schema: openAPIV3Schema: description: ApiV4Definition is the Schema for the v4 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: ApiV4DefinitionSpec defines the desired state of ApiDefinition. properties: analytics: description: API Analytics (Not applicable for Native API) properties: enabled: default: true description: Analytics Enabled or not? type: boolean logging: description: Analytics Logging properties: condition: description: The logging condition. This field is evaluated for HTTP requests and supports EL expressions. type: string content: description: Defines which component of the request should be included in the log payload. properties: headers: description: Should HTTP headers be logged or not ? type: boolean messageHeaders: description: Should message headers be logged or not ? type: boolean messageMetadata: description: Should message metadata be logged or not ? type: boolean messagePayload: description: Should message payloads be logged or not ? type: boolean payload: description: Should HTTP payloads be logged or not ? type: boolean required: - headers - messageHeaders - messageMetadata - messagePayload - payload type: object messageCondition: description: The logging message condition. This field is evaluated for messages and supports EL expressions. type: string mode: description: >- The logging mode defines which "hop" of the request roundtrip should be included in the log payload. properties: endpoint: description: If true, the request to the upstream service will be included in the log payload type: boolean entrypoint: description: If true, the inbound request to the gateway will be included in the log payload type: boolean required: - endpoint - entrypoint type: object phase: description: |- Defines which phase of the request roundtrip should be included in the log payload. properties: request: description: Should the request phase of the request roundtrip be included in the log payload or not ? type: boolean response: description: Should the response phase of the request roundtrip be included in the log payload or not ? type: boolean required: - request - response type: object type: object sampling: description: Analytics Sampling properties: type: description: The sampling type to use enum: - PROBABILITY - TEMPORAL - COUNT - WINDOWED_COUNT type: string value: description: Sampling Value type: string required: - type - value type: object tracing: description: Analytics Tracing properties: enabled: description: Specify if Tracing is Enabled or not type: boolean verbose: description: Specify if Tracing is Verbose or not type: boolean type: object required: - enabled type: object 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 definitionContext: description: >- The API Definition context is used to identify the Kubernetes origin of the API, and define whether... properties: origin: default: KUBERNETES description: The definition context origin where the API definition is managed. enum: - KUBERNETES type: string syncFrom: default: MANAGEMENT description: The syncFrom field defines where the gateways should source the API definition from. enum: - KUBERNETES - MANAGEMENT type: string type: object definitionVersion: default: V4 description: The definition version of the API. enum: - V4 type: string description: description: API description type: string endpointGroups: description: List of Endpoint groups items: properties: endpoints: default: [] description: List of endpoint for the group items: properties: configuration: description: Endpoint Configuration, arbitrary map of key-values type: object x-kubernetes-preserve-unknown-fields: true inheritConfiguration: description: Should endpoint group configuration be inherited or not ? type: boolean name: description: The endpoint name (this value should be unique across endpoints) type: string secondary: description: Endpoint is secondary or not? type: boolean services: description: Endpoint Services properties: healthCheck: description: Health check service properties: configuration: description: Service Configuration, a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true enabled: description: Is the service enabled or not ? type: boolean overrideConfiguration: description: Service Override Configuration or not? type: boolean type: description: Service Type type: string required: - enabled - overrideConfiguration type: object type: object sharedConfigurationOverride: description: Endpoint Configuration Override, arbitrary map of key-values type: object x-kubernetes-preserve-unknown-fields: true tenants: default: [] description: List of endpoint tenants items: type: string type: array type: description: Endpoint Type type: string weight: description: Endpoint Weight format: int32 type: integer required: - inheritConfiguration - secondary - type type: object type: array headers: additionalProperties: type: string description: Endpoint group headers, arbitrary map of key-values type: object http: description: Endpoint group http client options 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 loadBalancer: description: Endpoint group load balancer properties: type: default: ROUND_ROBIN enum: - ROUND_ROBIN - RANDOM - WEIGHTED_ROUND_ROBIN - WEIGHTED_RANDOM type: string required: - type type: object name: description: Endpoint group name type: string services: description: Endpoint group services properties: discovery: description: Endpoint group discovery service properties: configuration: description: Service Configuration, a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true enabled: description: Is the service enabled or not ? type: boolean overrideConfiguration: description: Service Override Configuration or not? type: boolean type: description: Service Type type: string required: - enabled - overrideConfiguration type: object healthCheck: description: Endpoint group health check service properties: configuration: description: Service Configuration, a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true enabled: description: Is the service enabled or not ? type: boolean overrideConfiguration: description: Service Override Configuration or not? type: boolean type: description: Service Type type: string required: - enabled - overrideConfiguration type: object type: object sharedConfiguration: description: Endpoint group shared configuration, arbitrary map of key-values type: object x-kubernetes-preserve-unknown-fields: true ssl: description: Endpoint group http client SSL options 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: description: Endpoint group type type: string required: - name type: object minItems: 1 type: array failover: description: API Failover properties: enabled: default: false description: API Failover is enabled? type: boolean maxFailures: default: 5 description: API Failover max failures type: integer maxRetries: default: 2 description: API Failover max retires type: integer openStateDuration: default: 10000 description: API Failover open state duration format: int64 type: integer perSubscription: default: true description: API Failover per subscription type: boolean slowCallDuration: default: 2000 description: API Failover slow call duration format: int64 type: integer type: object flowExecution: description: API Flow Execution (Not applicable for Native API) properties: matchRequired: description: Is match required or not ? type: boolean mode: description: The flow mode to use type: string required: - matchRequired type: object flows: default: [] description: List of flows for the API items: properties: connect: description: List of Connect flow steps (Only available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array enabled: default: true description: Is flow enabled or not? type: boolean id: description: >- The ID of the flow this field is mainly used for compatibility with APIM exports and can be safely... type: string interact: description: List of Publish flow steps (Only available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array name: description: Flow name type: string publish: description: List of Publish flow steps 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array request: description: List of Request flow steps (NOT available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array response: description: List of Response flow steps (NOT available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array selectors: description: List of Flow selectors items: type: object x-kubernetes-preserve-unknown-fields: true type: array subscribe: description: List of Subscribe flow steps 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array tags: description: List of tags items: type: string type: array required: - enabled type: object type: array 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 hrid: type: string 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 lifecycleState: default: UNPUBLISHED description: API life cycle state can be one of the values PUBLISHED, UNPUBLISHED, DEPRECATED, ARCHIVED enum: - PUBLISHED - UNPUBLISHED - DEPRECATED - ARCHIVED type: string listeners: description: List of listeners for this API items: type: object x-kubernetes-preserve-unknown-fields: true minItems: 1 type: array 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: 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 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 plans: additionalProperties: properties: 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 definitionVersion: default: V4 description: Plan definition version type: string description: description: Plan Description type: string excludedGroups: default: [] items: type: string type: array flows: default: [] description: List of plan flows items: properties: connect: description: List of Connect flow steps (Only available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array enabled: default: true description: Is flow enabled or not? type: boolean id: description: >- The ID of the flow this field is mainly used for compatibility with APIM exports and can be safely... type: string interact: description: List of Publish flow steps (Only available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array name: description: Flow name type: string publish: description: List of Publish flow steps 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array request: description: List of Request flow steps (NOT available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array response: description: List of Response flow steps (NOT available for Native APIs) 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array selectors: description: List of Flow selectors items: type: object x-kubernetes-preserve-unknown-fields: true type: array subscribe: description: List of Subscribe flow steps 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 messageCondition: description: The message condition (supports EL expressions) type: string name: description: FlowStep name type: string policy: description: FlowStep policy type: string sharedPolicyGroupRef: description: Reference to an existing Shared Policy Group properties: kind: type: string name: type: string namespace: type: string required: - name type: object required: - enabled type: object type: array tags: description: List of tags items: type: string type: array required: - enabled type: object type: array generalConditions: description: The general conditions defined to use this plan type: string generalConditionsHrid: type: string hrid: type: string id: description: Plan ID type: string mode: allOf: - enum: - STANDARD - PUSH - enum: - STANDARD - PUSH default: STANDARD description: The plan mode type: string name: description: >- Plan display name, this will be the name displayed in the UI if a management context is used to... type: string order: description: Plan order type: integer security: description: Plan security properties: configuration: description: Plan security configuration, a map of arbitrary key-values type: object x-kubernetes-preserve-unknown-fields: true type: description: Plan Security type type: string required: - type type: object selectionRule: 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: - name type: object description: >- A map of plan identifiers to plan Keys uniquely identify plans and are used to keep them in sync... type: object 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 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: {}