apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: zenkos.zenko.io
spec:
  group: zenko.io
  names:
    kind: Zenko
    listKind: ZenkoList
    plural: zenkos
    singular: zenko
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Zenko is the Schema for the zenkos API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: ZenkoSpec defines the desired state of Zenko
            properties:
              backbeat:
                description: ZenkoSpecBackbeat defines how Backbeat is deployed
                properties:
                  replicas:
                    format: int32
                    type: integer
                type: object
              blobserver:
                description: ZenkoSpecBlobserver defines the Blobserver deployment
                  used by Zenko
                properties:
                  enable:
                    type: boolean
                  replicas:
                    format: int32
                    type: integer
                type: object
              cloudserver:
                description: ZenkoSpecCloudserver defines how Cloudserver is deployed
                properties:
                  replicas:
                    format: int32
                    type: integer
                type: object
              egress:
                description: ZenkoSpecEgress defines how Zenko accesses external resources
                properties:
                  proxy:
                    description: ZenkoSpecEgressProxy defines proxy settings
                    properties:
                      ca:
                        description: ZenkoSpecEgressProxyCA defines how Zenko accesses
                          external resources
                        properties:
                          ca.crt:
                            type: string
                          secretAttributeName:
                            type: string
                          secretName:
                            type: string
                        type: object
                      exclude:
                        items:
                          type: string
                        type: array
                        x-kubernetes-list-type: set
                      http:
                        type: string
                      https:
                        type: string
                    type: object
                type: object
              ingress:
                description: ZenkoSpecIngress defines ingress settings
                properties:
                  annotations:
                    additionalProperties:
                      type: string
                    type: object
                  certificates:
                    items:
                      description: IngressTLS describes the transport layer security
                        associated with an Ingress.
                      properties:
                        hosts:
                          description: Hosts are a list of hosts included in the TLS
                            certificate. The values in this list must match the name/s
                            used in the tlsSecret. Defaults to the wildcard host setting
                            for the loadbalancer controller fulfilling this Ingress,
                            if left unspecified.
                          items:
                            type: string
                          type: array
                        secretName:
                          description: SecretName is the name of the secret used to
                            terminate SSL traffic on 443. Field is left optional to
                            allow SSL routing based on SNI hostname alone. If the
                            SNI host in a listener conflicts with the "Host" header
                            field used by an IngressRule, the SNI host is used for
                            termination and value of the Host header is used for routing.
                          type: string
                      type: object
                    type: array
                    x-kubernetes-list-type: atomic
                  controlPlaneClass:
                    type: string
                  workloadPlaneClass:
                    type: string
                type: object
              jabba:
                description: ZenkoSpecJabba defines how Jabba is deployed
                properties:
                  ingress:
                    description: ZenkoComponentIngress defines ingress values for
                      components.
                    properties:
                      hostname:
                        type: string
                    type: object
                  replicas:
                    format: int32
                    type: integer
                type: object
              kafka:
                description: ZenkoSpecKafka defines the Kafka deployment used by Zenko
                properties:
                  brokers:
                    description: Brokers are `host:port` formatted strings of External
                      Kafka brokers. Must be the same length as statefulReplicas.
                    items:
                      type: string
                    type: array
                  persistence:
                    description: ZenkoSpecPersistence defines the persistence attribute
                      of a stateful Zenko component. Only one of its members can be
                      specified
                    properties:
                      emptyDir:
                        type: boolean
                      existingPersistentVolume:
                        type: string
                      existingPersistentVolumeClaim:
                        type: string
                      volumeClaimTemplate:
                        description: ZenkoSpecVolumeClaimTemplate defines the storage
                          resource requirement for a stateful Zenko component
                        properties:
                          annotations:
                            additionalProperties:
                              type: string
                            type: object
                          selector:
                            description: A label selector is a label query over a
                              set of resources. The result of matchLabels and matchExpressions
                              are ANDed. An empty label selector matches all objects.
                              A null label selector matches no objects.
                            properties:
                              matchExpressions:
                                description: matchExpressions is a list of label selector
                                  requirements. The requirements are ANDed.
                                items:
                                  description: A label selector requirement is a selector
                                    that contains values, a key, and an operator that
                                    relates the key and values.
                                  properties:
                                    key:
                                      description: key is the label key that the selector
                                        applies to.
                                      type: string
                                    operator:
                                      description: operator represents a key's relationship
                                        to a set of values. Valid operators are In,
                                        NotIn, Exists and DoesNotExist.
                                      type: string
                                    values:
                                      description: values is an array of string values.
                                        If the operator is In or NotIn, the values
                                        array must be non-empty. If the operator is
                                        Exists or DoesNotExist, the values array must
                                        be empty. This array is replaced during a
                                        strategic merge patch.
                                      items:
                                        type: string
                                      type: array
                                  required:
                                  - key
                                  - operator
                                  type: object
                                type: array
                              matchLabels:
                                additionalProperties:
                                  type: string
                                description: matchLabels is a map of {key,value} pairs.
                                  A single {key,value} in the matchLabels map is equivalent
                                  to an element of matchExpressions, whose key field
                                  is "key", the operator is "In", and the values array
                                  contains only "value". The requirements are ANDed.
                                type: object
                            type: object
                          size:
                            type: string
                          storageClassName:
                            type: string
                        required:
                        - size
                        type: object
                    type: object
                  provider:
                    description: Provider determines how Kafka is deployed. Currently
                      only Managed is supported
                    enum:
                    - Managed
                    - External
                    type: string
                type: object
              localData:
                description: ZenkoSpecLocalData defines the Local Data deployment
                  used by Zenko
                properties:
                  persistence:
                    description: ZenkoSpecPersistence defines the persistence attribute
                      of a stateful Zenko component. Only one of its members can be
                      specified
                    properties:
                      emptyDir:
                        type: boolean
                      existingPersistentVolume:
                        type: string
                      existingPersistentVolumeClaim:
                        type: string
                      volumeClaimTemplate:
                        description: ZenkoSpecVolumeClaimTemplate defines the storage
                          resource requirement for a stateful Zenko component
                        properties:
                          annotations:
                            additionalProperties:
                              type: string
                            type: object
                          selector:
                            description: A label selector is a label query over a
                              set of resources. The result of matchLabels and matchExpressions
                              are ANDed. An empty label selector matches all objects.
                              A null label selector matches no objects.
                            properties:
                              matchExpressions:
                                description: matchExpressions is a list of label selector
                                  requirements. The requirements are ANDed.
                                items:
                                  description: A label selector requirement is a selector
                                    that contains values, a key, and an operator that
                                    relates the key and values.
                                  properties:
                                    key:
                                      description: key is the label key that the selector
                                        applies to.
                                      type: string
                                    operator:
                                      description: operator represents a key's relationship
                                        to a set of values. Valid operators are In,
                                        NotIn, Exists and DoesNotExist.
                                      type: string
                                    values:
                                      description: values is an array of string values.
                                        If the operator is In or NotIn, the values
                                        array must be non-empty. If the operator is
                                        Exists or DoesNotExist, the values array must
                                        be empty. This array is replaced during a
                                        strategic merge patch.
                                      items:
                                        type: string
                                      type: array
                                  required:
                                  - key
                                  - operator
                                  type: object
                                type: array
                              matchLabels:
                                additionalProperties:
                                  type: string
                                description: matchLabels is a map of {key,value} pairs.
                                  A single {key,value} in the matchLabels map is equivalent
                                  to an element of matchExpressions, whose key field
                                  is "key", the operator is "In", and the values array
                                  contains only "value". The requirements are ANDed.
                                type: object
                            type: object
                          size:
                            type: string
                          storageClassName:
                            type: string
                        required:
                        - size
                        type: object
                    type: object
                type: object
              management:
                description: ZenkoSpecManagement defines the management deployment
                  used by Zenko
                properties:
                  api:
                    description: ZenkoSpecManagementAPI defines the management API
                      used by Zenko
                    properties:
                      allowFrom:
                        items:
                          type: string
                        type: array
                      ingress:
                        description: ZenkoComponentIngress defines ingress values
                          for components.
                        properties:
                          hostname:
                            type: string
                        type: object
                      replicas:
                        format: int32
                        type: integer
                    type: object
                  endpoint:
                    description: Endpoint is the API endpoint to register
                    type: string
                  oidc:
                    description: ZenkoSpecManagementOIDC defines the management used
                      by OIDC providers.
                    properties:
                      ingress:
                        description: ZenkoComponentIngress defines ingress values
                          for components.
                        properties:
                          hostname:
                            type: string
                        type: object
                      provider:
                        description: Provider is the url of the OIDC Provider
                        type: string
                      uiClientId:
                        description: UIClientID is the OIDC client ID for the UI
                        type: string
                      vaultClientId:
                        description: VaultClientID is the OIDC client ID for Vault
                        type: string
                    type: object
                  provider:
                    description: Provider determines how the Zenko instance is managed.
                      Currently only Orbit is supported
                    enum:
                    - InCluster
                    - Orbit
                    type: string
                  pushEndpoint:
                    description: PushEndpoint is the websocket endpoint to connect
                      to, to get realtime configuration updates from the management
                      layer
                    type: string
                  ui:
                    description: ZenkoSpecManagementUI defines the management UI used
                      by Zenko.
                    properties:
                      ingress:
                        description: ZenkoComponentIngress defines ingress values
                          for components.
                        properties:
                          hostname:
                            type: string
                        type: object
                      replicas:
                        format: int32
                        type: integer
                    type: object
                type: object
              mongodb:
                description: ZenkoSpecMongoDB defines the MongoDB deployment used
                  by Zenko
                properties:
                  databaseName:
                    description: Database name within MongoDB. Required if using an
                      External provider.
                    type: string
                  endpoints:
                    description: Endpoints are `host:port` formatted strings of External
                      MongoDB endpoints. Must be the same length as statefulReplicas.
                    items:
                      type: string
                    type: array
                  persistence:
                    description: ZenkoSpecPersistence defines the persistence attribute
                      of a stateful Zenko component. Only one of its members can be
                      specified
                    properties:
                      emptyDir:
                        type: boolean
                      existingPersistentVolume:
                        type: string
                      existingPersistentVolumeClaim:
                        type: string
                      volumeClaimTemplate:
                        description: ZenkoSpecVolumeClaimTemplate defines the storage
                          resource requirement for a stateful Zenko component
                        properties:
                          annotations:
                            additionalProperties:
                              type: string
                            type: object
                          selector:
                            description: A label selector is a label query over a
                              set of resources. The result of matchLabels and matchExpressions
                              are ANDed. An empty label selector matches all objects.
                              A null label selector matches no objects.
                            properties:
                              matchExpressions:
                                description: matchExpressions is a list of label selector
                                  requirements. The requirements are ANDed.
                                items:
                                  description: A label selector requirement is a selector
                                    that contains values, a key, and an operator that
                                    relates the key and values.
                                  properties:
                                    key:
                                      description: key is the label key that the selector
                                        applies to.
                                      type: string
                                    operator:
                                      description: operator represents a key's relationship
                                        to a set of values. Valid operators are In,
                                        NotIn, Exists and DoesNotExist.
                                      type: string
                                    values:
                                      description: values is an array of string values.
                                        If the operator is In or NotIn, the values
                                        array must be non-empty. If the operator is
                                        Exists or DoesNotExist, the values array must
                                        be empty. This array is replaced during a
                                        strategic merge patch.
                                      items:
                                        type: string
                                      type: array
                                  required:
                                  - key
                                  - operator
                                  type: object
                                type: array
                              matchLabels:
                                additionalProperties:
                                  type: string
                                description: matchLabels is a map of {key,value} pairs.
                                  A single {key,value} in the matchLabels map is equivalent
                                  to an element of matchExpressions, whose key field
                                  is "key", the operator is "In", and the values array
                                  contains only "value". The requirements are ANDed.
                                type: object
                            type: object
                          size:
                            type: string
                          storageClassName:
                            type: string
                        required:
                        - size
                        type: object
                    type: object
                  provider:
                    description: Provider determines how MongoDB is deployed. KubeDB
                      or External is supported.
                    enum:
                    - KubeDB
                    - External
                    type: string
                  readPreference:
                    description: Read preference for MongoDB clients. Defaults to
                      'primary'.
                    enum:
                    - primary
                    - primaryPreferred
                    - seconday
                    - secondaryPreferred
                    - nearest
                    type: string
                  replicaSetName:
                    description: Name of the replica set used by MongoDB. Will default
                      to 'rs0'.
                    type: string
                  userSecretName:
                    description: Name of the secret containing the MongoDB user account
                      info. Required if using an external provider.
                    type: string
                  writeConcern:
                    description: Write concern for mongo as a string. Defaults to
                      'majority'.
                    type: string
                type: object
              redis:
                description: ZenkoSpecRedis defines the Redis deployment used by Zenko
                properties:
                  persistence:
                    description: ZenkoSpecPersistence defines the persistence attribute
                      of a stateful Zenko component. Only one of its members can be
                      specified
                    properties:
                      emptyDir:
                        type: boolean
                      existingPersistentVolume:
                        type: string
                      existingPersistentVolumeClaim:
                        type: string
                      volumeClaimTemplate:
                        description: ZenkoSpecVolumeClaimTemplate defines the storage
                          resource requirement for a stateful Zenko component
                        properties:
                          annotations:
                            additionalProperties:
                              type: string
                            type: object
                          selector:
                            description: A label selector is a label query over a
                              set of resources. The result of matchLabels and matchExpressions
                              are ANDed. An empty label selector matches all objects.
                              A null label selector matches no objects.
                            properties:
                              matchExpressions:
                                description: matchExpressions is a list of label selector
                                  requirements. The requirements are ANDed.
                                items:
                                  description: A label selector requirement is a selector
                                    that contains values, a key, and an operator that
                                    relates the key and values.
                                  properties:
                                    key:
                                      description: key is the label key that the selector
                                        applies to.
                                      type: string
                                    operator:
                                      description: operator represents a key's relationship
                                        to a set of values. Valid operators are In,
                                        NotIn, Exists and DoesNotExist.
                                      type: string
                                    values:
                                      description: values is an array of string values.
                                        If the operator is In or NotIn, the values
                                        array must be non-empty. If the operator is
                                        Exists or DoesNotExist, the values array must
                                        be empty. This array is replaced during a
                                        strategic merge patch.
                                      items:
                                        type: string
                                      type: array
                                  required:
                                  - key
                                  - operator
                                  type: object
                                type: array
                              matchLabels:
                                additionalProperties:
                                  type: string
                                description: matchLabels is a map of {key,value} pairs.
                                  A single {key,value} in the matchLabels map is equivalent
                                  to an element of matchExpressions, whose key field
                                  is "key", the operator is "In", and the values array
                                  contains only "value". The requirements are ANDed.
                                type: object
                            type: object
                          size:
                            type: string
                          storageClassName:
                            type: string
                        required:
                        - size
                        type: object
                    type: object
                  provider:
                    description: Provider determines how Redis is deployed.
                    enum:
                    - KubeDB
                    - Zenko
                    type: string
                type: object
              registry:
                description: ZenkoSpecRegistry defines registry settings
                properties:
                  imagePullSecretNames:
                    items:
                      type: string
                    type: array
                    x-kubernetes-list-type: atomic
                type: object
              replicas:
                enum:
                - 1
                - 3
                - 5
                format: int32
                type: integer
              utapi:
                description: ZenkoSpecUtapi defines how Utapi is deployed
                properties:
                  controlPlaneIngress:
                    description: ZenkoComponentIngress defines ingress values for
                      components.
                    properties:
                      hostname:
                        type: string
                    type: object
                  enable:
                    type: boolean
                  replicas:
                    format: int32
                    type: integer
                  workloadPlaneIngress:
                    description: ZenkoComponentIngress defines ingress values for
                      components.
                    properties:
                      hostname:
                        type: string
                    type: object
                type: object
              vault:
                description: ZenkoSpecVault defines how Vault is deployed
                properties:
                  enable:
                    type: boolean
                  iamIngress:
                    description: ZenkoComponentIngress defines ingress values for
                      components.
                    properties:
                      hostname:
                        type: string
                    type: object
                  replicas:
                    format: int32
                    type: integer
                  stsIngress:
                    description: ZenkoComponentIngress defines ingress values for
                      components.
                    properties:
                      hostname:
                        type: string
                    type: object
                type: object
              version:
                description: 'Important: Run "operator-sdk generate k8s" to regenerate
                  code after modifying this file Add custom validation using kubebuilder
                  tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html'
                type: string
              zookeeper:
                description: ZenkoSpecZookeeper defines the ZooKeeper deployment used
                  by Zenko
                properties:
                  endpoints:
                    description: Endpoints are `host:port` formatted strings of External
                      Zookeeper endpoints. Must be the same length as statefulReplicas.
                    items:
                      type: string
                    type: array
                  persistence:
                    description: ZenkoSpecPersistence defines the persistence attribute
                      of a stateful Zenko component. Only one of its members can be
                      specified
                    properties:
                      emptyDir:
                        type: boolean
                      existingPersistentVolume:
                        type: string
                      existingPersistentVolumeClaim:
                        type: string
                      volumeClaimTemplate:
                        description: ZenkoSpecVolumeClaimTemplate defines the storage
                          resource requirement for a stateful Zenko component
                        properties:
                          annotations:
                            additionalProperties:
                              type: string
                            type: object
                          selector:
                            description: A label selector is a label query over a
                              set of resources. The result of matchLabels and matchExpressions
                              are ANDed. An empty label selector matches all objects.
                              A null label selector matches no objects.
                            properties:
                              matchExpressions:
                                description: matchExpressions is a list of label selector
                                  requirements. The requirements are ANDed.
                                items:
                                  description: A label selector requirement is a selector
                                    that contains values, a key, and an operator that
                                    relates the key and values.
                                  properties:
                                    key:
                                      description: key is the label key that the selector
                                        applies to.
                                      type: string
                                    operator:
                                      description: operator represents a key's relationship
                                        to a set of values. Valid operators are In,
                                        NotIn, Exists and DoesNotExist.
                                      type: string
                                    values:
                                      description: values is an array of string values.
                                        If the operator is In or NotIn, the values
                                        array must be non-empty. If the operator is
                                        Exists or DoesNotExist, the values array must
                                        be empty. This array is replaced during a
                                        strategic merge patch.
                                      items:
                                        type: string
                                      type: array
                                  required:
                                  - key
                                  - operator
                                  type: object
                                type: array
                              matchLabels:
                                additionalProperties:
                                  type: string
                                description: matchLabels is a map of {key,value} pairs.
                                  A single {key,value} in the matchLabels map is equivalent
                                  to an element of matchExpressions, whose key field
                                  is "key", the operator is "In", and the values array
                                  contains only "value". The requirements are ANDed.
                                type: object
                            type: object
                          size:
                            type: string
                          storageClassName:
                            type: string
                        required:
                        - size
                        type: object
                    type: object
                  provider:
                    description: Provider determines how ZooKeeper is deployed. Managed
                      or External is supported.
                    enum:
                    - Managed
                    - External
                    type: string
                type: object
            type: object
          status:
            description: ZenkoStatus defines the observed state of Zenko
            properties:
              conditions:
                items:
                  description: ZenkoCondition describes the state of a Zenko instance
                    at a certain point.
                  properties:
                    lastTransitionTime:
                      description: Last time the condition transitioned from one status
                        to another.
                      format: date-time
                      type: string
                    message:
                      description: A human readable message indicating details about
                        the transition.
                      type: string
                    reason:
                      description: The reason for the condition's last transition.
                      type: string
                    status:
                      description: Status of the condition, one of True, False, Unknown.
                      type: string
                    type:
                      description: Type of deployment condition.
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              instanceID:
                type: string
              readyReplicas:
                format: int32
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      scale:
        specReplicasPath: .spec.replicas
        statusReplicasPath: .status.readyReplicas
      status: {}
