kind: CustomResourceDefinition
spec:
  group: s3.stackable.tech
  names:
    kind: S3Bucket
    plural: s3buckets
    singular: s3bucket
    categories: []
    shortNames: []
  scope: Namespaced
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          type: object
          title: S3Bucket
          required:
            - spec
          properties:
            spec:
              type: object
              properties:
                bucketName:
                  type: string
                  nullable: true
                  description: The name of the S3 bucket.
                connection:
                  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](https://docs.stackable.tech/home/24.7/secret-operator/secretclass)
                                            which will provide the CA
                                            certificate. Note that a SecretClass
                                            does not need to have a key but can
                                            also work with just a CA
                                            certificate, 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 a 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. For
                            example: `west1.my-cloud.com`."
                        port:
                          type: integer
                          format: uint16
                          minimum: 0
                          nullable: true
                          description: Port the S3 server listens on. If not specified the product 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
                            [AWS
                            documentation](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
                                  description: The pod scope is resolved to the name of the Kubernetes Pod. This
                                    allows the secret to differentiate between
                                    StatefulSet replicas.
                                node:
                                  type: boolean
                                  default: false
                                  description: The node scope is resolved to the name of the Kubernetes Node
                                    object that the Pod is running on. This will
                                    typically be the DNS name of the node.
                                services:
                                  type: array
                                  items:
                                    type: string
                                  default: []
                                  description: The service scope allows Pod objects to specify custom scopes. This
                                    should typically correspond to Service
                                    objects that the Pod participates in.
                              description: "[Scope](https://docs.stackable.tech/home/24.7/secret-operator/sco\
                                pe) of the
                                [SecretClass](https://docs.stackable.tech/home/\
                                24.7/secret-operator/secretclass)."
                            secretClass:
                              type: string
                              description: "[SecretClass](https://docs.stackable.tech/home/24.7/secret-operat\
                                or/secretclass) containing the LDAP bind
                                credentials."
                          description: If the S3 uses authentication you have to specify you S3
                            credentials. In the most cases a
                            [SecretClass](https://docs.stackable.tech/home/24.7/secret-operator/secretclass)
                            providing `accessKey` and `secretKey` is sufficient.
                      description: Inline definition of an S3 connection.
                    reference:
                      type: string
                      description: A reference to an S3Connection resource.
                  description: The definition of an S3 connection, either inline or as a
                    reference.
              description: S3 bucket specification containing the bucket name and an inlined
                or referenced connection specification. Learn more on the [S3
                concept
                documentation](https://docs.stackable.tech/home/24.7/concepts/s3).
          description: Auto-generated derived type for S3BucketSpec via `CustomResource`
      served: true
      storage: true
      subresources: {}
      additionalPrinterColumns: []
metadata:
  name: s3buckets.s3.stackable.tech
  annotations:
    helm.sh/resource-policy: keep
apiVersion: apiextensions.k8s.io/v1
