apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: flagsmiths.charts.flagsmith.com
spec:
  group: charts.flagsmith.com
  names:
    kind: Flagsmith
    listKind: FlagsmithList
    plural: flagsmiths
    singular: flagsmith
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Flagsmith is the Schema for the flagsmiths 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec defines the desired state of Flagsmith
            type: object
            # x-kubernetes-preserve-unknown-fields: true
            required:
              - api
              - frontend
            properties:
              api:
                description: Configuration how to setup the flagsmith api service.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              frontend:
                description: Configuration how to setup the flagsmith frontend service.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              postgresql:
                description: Configuration how to setup the flagsmith postgresql service.
                type: object
                required:
                  - enabled
                properties:
                  enabled: 
                    description: Set to true if PostgreSQL will be installed. If the value is false PostgreSQL will not be installed.
                    type: boolean
                    default: true
                x-kubernetes-preserve-unknown-fields: true
              influxdb:
                description: Configuration how to setup the flagsmith InfluxDB service.
                type: object
                required:
                  - enabled
                properties:
                  enabled: 
                    description: Set to true if InfluxDB will be installed. If the value is false InfluxDB will not be installed.
                    type: boolean
                    default: true
                x-kubernetes-preserve-unknown-fields: true
              metrics:
                description: Configuration how to setup the flagsmith metrics.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              hooks:
                description: Configuration how to setup the flagsmith hooks.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              service:
                description: Configuration how to setup the flagsmith kubernetes service.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              ingress:
                description: Configuration how to setup ingress to the flagsmith if flagsmith is using Kubernetes and not OpenShift.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              openshift:
                description: If flagsmith install on OpenShift set value to true otherwise false. 
                type: boolean
                default: true
          status:
            description: Status defines the observed state of Flagsmith
            type: object
            x-kubernetes-preserve-unknown-fields: true
        type: object
    served: true
    storage: true
    subresources:
      status: {}
