kind: CustomResourceDefinition
spec:
  group: trino.stackable.tech
  names:
    kind: TrinoCatalog
    plural: trinocatalogs
    singular: trinocatalog
    categories: []
    shortNames: []
  scope: Namespaced
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          type: object
          title: TrinoCatalog
          required:
            - spec
          properties:
            spec:
              type: object
              required:
                - connector
              properties:
                connector:
                  type: object
                  oneOf:
                    - required:
                        - blackHole
                    - required:
                        - googleSheet
                    - required:
                        - hive
                    - required:
                        - iceberg
                    - required:
                        - tpcds
                    - required:
                        - tpch
                  properties:
                    hive:
                      type: object
                      required:
                        - metastore
                      properties:
                        s3:
                          type: object
                          oneOf:
                            - required:
                                - inline
                            - required:
                                - reference
                          nullable: true
                          properties:
                            inline:
                              type: object
                              properties:
                                tls:
                                  type: object
                                  nullable: true
                                  required:
                                    - verification
                                  properties:
                                    verification:
                                      type: object
                                      oneOf:
                                        - required:
                                            - none
                                        - required:
                                            - server
                                      properties:
                                        none:
                                          type: object
                                          description: Use TLS but don't verify certificates
                                        server:
                                          type: object
                                          required:
                                            - caCert
                                          properties:
                                            caCert:
                                              type: object
                                              oneOf:
                                                - required:
                                                    - webPki
                                                - required:
                                                    - secretClass
                                              properties:
                                                webPki:
                                                  type: object
                                                  description: Use TLS and the ca certificates trusted by the common web browsers
                                                    to verify the server. This
                                                    can be useful when you e.g.
                                                    use public AWS S3 or other
                                                    public available services.
                                                secretClass:
                                                  type: string
                                                  description: Name of the SecretClass which will provide the ca cert. Note that a
                                                    SecretClass does not need to
                                                    have a key but can also work
                                                    with just a ca cert. So if
                                                    you got provided with a ca
                                                    cert but don't have access
                                                    to the key you can still use
                                                    this method.
                                              description: Ca cert to verify the server
                                          description: Use TLS and ca certificate to verify the server
                                      description: The verification method used to verify the certificates of the
                                        server and/or the client
                                  description: If you want to use TLS when talking to S3 you can enable TLS
                                    encrypted communication with this setting.
                                host:
                                  type: string
                                  nullable: true
                                  description: Hostname of the S3 server without any protocol or port
                                port:
                                  type: integer
                                  format: uint16
                                  minimum: 0
                                  nullable: true
                                  description: Port the S3 server listens on. If not specified the products will
                                    determine the port to use.
                                accessStyle:
                                  enum:
                                    - Path
                                    - VirtualHosted
                                  type: string
                                  nullable: true
                                  description: Which access style to use. Defaults to virtual hosted-style as most
                                    of the data products out there. Have a look
                                    at the official documentation on
                                    <https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html>
                                credentials:
                                  type: object
                                  nullable: true
                                  required:
                                    - secretClass
                                  properties:
                                    scope:
                                      type: object
                                      nullable: true
                                      properties:
                                        pod:
                                          type: boolean
                                          default: false
                                        node:
                                          type: boolean
                                          default: false
                                        services:
                                          type: array
                                          items:
                                            type: string
                                          default: []
                                      description: "[Scope](https://docs.stackable.tech/secret-operator/scope.html) of
                                        the
                                        [SecretClass](https://docs.stackable.te\
                                        ch/secret-operator/secretclass.html)"
                                    secretClass:
                                      type: string
                                      description: "[SecretClass](https://docs.stackable.tech/secret-operator/secretc\
                                        lass.html) containing the LDAP bind
                                        credentials"
                                  description: If the S3 uses authentication you have to specify you S3
                                    credentials. In the most cases a SecretClass
                                    providing `accessKey` and `secretKey` is
                                    sufficient.
                              description: S3 connection definition as CRD.
                            reference:
                              type: string
                          description: Connection to an S3 store. Please make sure that the underlying
                            Hive metastore also has access to the S3 store.
                        hdfs:
                          type: object
                          nullable: true
                          required:
                            - configMap
                          properties:
                            configMap:
                              type: string
                              description: Name of the discovery-configmap providing information about the
                                HDFS cluster
                          description: Connection to an HDFS cluster. Please make sure that the underlying
                            Hive metastore also has access to the HDFS.
                        metastore:
                          type: object
                          required:
                            - configMap
                          properties:
                            configMap:
                              type: string
                              description: Name of the discovery-configmap providing information about the
                                Hive metastore
                          description: Mandatory connection to a Hive Metastore, which will be used as a
                            storage for metadata.
                    tpch:
                      type: object
                    tpcds:
                      type: object
                    iceberg:
                      type: object
                      required:
                        - metastore
                      properties:
                        s3:
                          type: object
                          oneOf:
                            - required:
                                - inline
                            - required:
                                - reference
                          nullable: true
                          properties:
                            inline:
                              type: object
                              properties:
                                tls:
                                  type: object
                                  nullable: true
                                  required:
                                    - verification
                                  properties:
                                    verification:
                                      type: object
                                      oneOf:
                                        - required:
                                            - none
                                        - required:
                                            - server
                                      properties:
                                        none:
                                          type: object
                                          description: Use TLS but don't verify certificates
                                        server:
                                          type: object
                                          required:
                                            - caCert
                                          properties:
                                            caCert:
                                              type: object
                                              oneOf:
                                                - required:
                                                    - webPki
                                                - required:
                                                    - secretClass
                                              properties:
                                                webPki:
                                                  type: object
                                                  description: Use TLS and the ca certificates trusted by the common web browsers
                                                    to verify the server. This
                                                    can be useful when you e.g.
                                                    use public AWS S3 or other
                                                    public available services.
                                                secretClass:
                                                  type: string
                                                  description: Name of the SecretClass which will provide the ca cert. Note that a
                                                    SecretClass does not need to
                                                    have a key but can also work
                                                    with just a ca cert. So if
                                                    you got provided with a ca
                                                    cert but don't have access
                                                    to the key you can still use
                                                    this method.
                                              description: Ca cert to verify the server
                                          description: Use TLS and ca certificate to verify the server
                                      description: The verification method used to verify the certificates of the
                                        server and/or the client
                                  description: If you want to use TLS when talking to S3 you can enable TLS
                                    encrypted communication with this setting.
                                host:
                                  type: string
                                  nullable: true
                                  description: Hostname of the S3 server without any protocol or port
                                port:
                                  type: integer
                                  format: uint16
                                  minimum: 0
                                  nullable: true
                                  description: Port the S3 server listens on. If not specified the products will
                                    determine the port to use.
                                accessStyle:
                                  enum:
                                    - Path
                                    - VirtualHosted
                                  type: string
                                  nullable: true
                                  description: Which access style to use. Defaults to virtual hosted-style as most
                                    of the data products out there. Have a look
                                    at the official documentation on
                                    <https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html>
                                credentials:
                                  type: object
                                  nullable: true
                                  required:
                                    - secretClass
                                  properties:
                                    scope:
                                      type: object
                                      nullable: true
                                      properties:
                                        pod:
                                          type: boolean
                                          default: false
                                        node:
                                          type: boolean
                                          default: false
                                        services:
                                          type: array
                                          items:
                                            type: string
                                          default: []
                                      description: "[Scope](https://docs.stackable.tech/secret-operator/scope.html) of
                                        the
                                        [SecretClass](https://docs.stackable.te\
                                        ch/secret-operator/secretclass.html)"
                                    secretClass:
                                      type: string
                                      description: "[SecretClass](https://docs.stackable.tech/secret-operator/secretc\
                                        lass.html) containing the LDAP bind
                                        credentials"
                                  description: If the S3 uses authentication you have to specify you S3
                                    credentials. In the most cases a SecretClass
                                    providing `accessKey` and `secretKey` is
                                    sufficient.
                              description: S3 connection definition as CRD.
                            reference:
                              type: string
                          description: Connection to an S3 store. Please make sure that the underlying
                            Hive metastore also has access to the S3 store.
                        hdfs:
                          type: object
                          nullable: true
                          required:
                            - configMap
                          properties:
                            configMap:
                              type: string
                              description: Name of the discovery-configmap providing information about the
                                HDFS cluster
                          description: Connection to an HDFS cluster. Please make sure that the underlying
                            Hive metastore also has access to the HDFS.
                        metastore:
                          type: object
                          required:
                            - configMap
                          properties:
                            configMap:
                              type: string
                              description: Name of the discovery-configmap providing information about the
                                Hive metastore
                          description: Mandatory connection to a Hive Metastore, which will be used as a
                            storage for metadata.
                    blackHole:
                      type: object
                    googleSheet:
                      type: object
                      required:
                        - credentialsSecret
                        - metadataSheetId
                      properties:
                        cache:
                          type: object
                          nullable: true
                          properties:
                            sheetsDataMaxCacheSize:
                              type: string
                              nullable: true
                              description: Maximum number of spreadsheets to cache, defaults to `1000`
                            sheetsDataExpireAfterWrite:
                              type: string
                              nullable: true
                              description: How long to cache spreadsheet data or metadata, defaults to `5m`
                          description: Cache the contents of sheets. This is used to reduce Google Sheets
                            API usage and latency.
                        metadataSheetId:
                          type: string
                          description: Sheet ID of the spreadsheet, that contains the table mapping
                        credentialsSecret:
                          type: string
                          description: Name of the secret containing the Google API JSON key file. The key
                            used from the Secret is `credentials`
                configOverrides:
                  type: object
                  default: {}
                  additionalProperties:
                    type: string
          description: Auto-generated derived type for TrinoCatalogSpec via `CustomResource`
      served: true
      storage: true
      subresources: {}
      additionalPrinterColumns: []
metadata:
  name: trinocatalogs.trino.stackable.tech
  annotations:
    helm.sh/resource-policy: keep
apiVersion: apiextensions.k8s.io/v1
