apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: vrouters.tf.tungsten.io
spec:
  group: tf.tungsten.io
  names:
    kind: Vrouter
    listKind: VrouterList
    plural: vrouters
    singular: vrouter
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Vrouter is the Schema for the vrouters 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: VrouterSpec is the Spec for the vrouter API.
            properties:
              commonConfiguration:
                description: PodConfiguration is the common services struct.
                properties:
                  authParameters:
                    description: AuthParameters auth parameters
                    properties:
                      authMode:
                        description: AuthenticationMode auth mode
                        enum:
                        - noauth
                        - keystone
                        type: string
                      keystoneAuthParameters:
                        description: KeystoneAuthParameters keystone parameters
                        properties:
                          address:
                            type: string
                          adminPassword:
                            type: string
                          adminPort:
                            type: integer
                          adminTenant:
                            type: string
                          adminUsername:
                            type: string
                          authProtocol:
                            type: string
                          insecure:
                            type: boolean
                          port:
                            type: integer
                          projectDomainName:
                            type: string
                          region:
                            type: string
                          userDomainName:
                            type: string
                        type: object
                      keystoneSecretName:
                        type: string
                    type: object
                  distribution:
                    description: OS family
                    type: string
                  imagePullSecrets:
                    description: ImagePullSecrets is an optional list of references
                      to secrets in the same namespace to use for pulling any of the
                      images used by this PodSpec.
                    items:
                      type: string
                    type: array
                  logLevel:
                    description: Kubernetes Cluster Configuration
                    enum:
                    - info
                    - debug
                    - warning
                    - error
                    - critical
                    - none
                    type: string
                  nodeSelector:
                    additionalProperties:
                      type: string
                    description: 'NodeSelector is a selector which must be true for
                      the pod to fit on a node. Selector which must match a node''s
                      labels for the pod to be scheduled on that node. More info:
                      https://kubernetes.io/docs/concepts/configuration/assign-pod-node/.'
                    type: object
                  tolerations:
                    description: If specified, the pod's tolerations.
                    items:
                      description: The pod this Toleration is attached to tolerates
                        any taint that matches the triple <key,value,effect> using
                        the matching operator <operator>.
                      properties:
                        effect:
                          description: Effect indicates the taint effect to match.
                            Empty means match all taint effects. When specified, allowed
                            values are NoSchedule, PreferNoSchedule and NoExecute.
                          type: string
                        key:
                          description: Key is the taint key that the toleration applies
                            to. Empty means match all taint keys. If the key is empty,
                            operator must be Exists; this combination means to match
                            all values and all keys.
                          type: string
                        operator:
                          description: Operator represents a key's relationship to
                            the value. Valid operators are Exists and Equal. Defaults
                            to Equal. Exists is equivalent to wildcard for value,
                            so that a pod can tolerate all taints of a particular
                            category.
                          type: string
                        tolerationSeconds:
                          description: TolerationSeconds represents the period of
                            time the toleration (which must be of effect NoExecute,
                            otherwise this field is ignored) tolerates the taint.
                            By default, it is not set, which means tolerate the taint
                            forever (do not evict). Zero and negative values will
                            be treated as 0 (evict immediately) by the system.
                          format: int64
                          type: integer
                        value:
                          description: Value is the taint value the toleration matches
                            to. If the operator is Exists, the value should be empty,
                            otherwise just a regular string.
                          type: string
                      type: object
                    type: array
                type: object
              serviceConfiguration:
                description: VrouterConfiguration is the Spec for the vrouter API.
                properties:
                  agentMode:
                    description: vRouter
                    type: string
                  barbicanPassword:
                    type: string
                  barbicanTenantName:
                    description: Openstack
                    type: string
                  barbicanUser:
                    type: string
                  cloudOrchestrator:
                    description: New params for vrouter configuration
                    type: string
                  cniMTU:
                    description: CniMTU - mtu for virtual tap devices
                    type: integer
                  collectorPort:
                    type: string
                  configApiPort:
                    description: Config
                    type: string
                  configApiServerCaCertfile:
                    type: string
                  configApiSslEnable:
                    type: boolean
                  containers:
                    items:
                      description: Container defines name, image and command.
                      properties:
                        command:
                          items:
                            type: string
                          type: array
                        image:
                          type: string
                        name:
                          type: string
                      type: object
                    type: array
                  controlInstance:
                    type: string
                  dataSubnet:
                    type: string
                  dnsServerPort:
                    description: DNS
                    type: string
                  dpdkUioDriver:
                    description: Host
                    type: string
                  envVariablesConfig:
                    additionalProperties:
                      type: string
                    description: What is it doing? VrouterEncryption   bool              `json:"vrouterEncryption,omitempty"`
                      What is it doing? What is it doing?
                    type: object
                  fabricSntHashTableSize:
                    type: string
                  hugePages1G:
                    type: integer
                  hugePages2M:
                    description: HugePages
                    type: integer
                  hypervisorType:
                    type: string
                  introspectSslEnable:
                    description: Introspect
                    type: boolean
                  k8sToken:
                    description: Kubernetes
                    type: string
                  k8sTokenFile:
                    type: string
                  keystoneAuthAdminPassword:
                    type: string
                  keystoneAuthAdminPort:
                    description: Keystone authentication
                    type: string
                  keystoneAuthCaCertfile:
                    type: string
                  keystoneAuthCertfile:
                    type: string
                  keystoneAuthHost:
                    type: string
                  keystoneAuthInsecure:
                    type: boolean
                  keystoneAuthKeyfile:
                    type: string
                  keystoneAuthProjectDomainName:
                    type: string
                  keystoneAuthProto:
                    type: string
                  keystoneAuthRegionName:
                    type: string
                  keystoneAuthUrlTokens:
                    type: string
                  keystoneAuthUrlVersion:
                    type: string
                  keystoneAuthUserDomainName:
                    type: string
                  kubernetesApiPort:
                    type: string
                  kubernetesApiSecurePort:
                    type: string
                  kubernetesPodSubnet:
                    type: string
                  l3mhCidr:
                    description: L3MH
                    type: string
                  logDir:
                    description: Logging
                    type: string
                  logLocal:
                    type: integer
                  metadataProxySecret:
                    description: Metadata
                    type: string
                  metadataSslCaCertfile:
                    type: string
                  metadataSslCertType:
                    type: string
                  metadataSslCertfile:
                    type: string
                  metadataSslEnable:
                    type: string
                  metadataSslKeyfile:
                    type: string
                  physicalInterface:
                    type: string
                  priorityBandwidth:
                    type: string
                  priorityId:
                    type: string
                  priorityScheduling:
                    type: string
                  priorityTagging:
                    type: boolean
                  qosDefHwQueue:
                    type: boolean
                  qosLogicalQueues:
                    type: string
                  qosQueueId:
                    type: string
                  requiredKernelVrouterEncryption:
                    type: string
                  sampleDestination:
                    type: string
                  sandeshCaCertfile:
                    description: Sandesh
                    type: string
                  sandeshCertfile:
                    type: string
                  sandeshKeyfile:
                    type: string
                  sandeshSslEnable:
                    type: boolean
                  serverCaCertfile:
                    description: Server SSL
                    type: string
                  serverCertfile:
                    type: string
                  serverKeyfile:
                    type: string
                  sloDestination:
                    type: string
                  sriovPhysicalInterface:
                    type: string
                  sriovPhysicalNetwork:
                    type: string
                  sriovVf:
                    type: string
                  sslEnable:
                    type: boolean
                  sslInsecure:
                    type: boolean
                  statsCollectorDestinationPath:
                    description: Collector
                    type: string
                  subcluster:
                    description: XMPP
                    type: string
                  tsnAgentMode:
                    description: TSN
                    type: string
                  vrouterCryptInterface:
                    type: string
                  vrouterDecryptInterface:
                    type: string
                  vrouterDecryptKey:
                    type: string
                  vrouterEncryption:
                    type: boolean
                  vrouterGateway:
                    type: string
                  xmmpSslEnable:
                    type: boolean
                  xmppServerCaCertfile:
                    type: string
                  xmppServerCertfile:
                    type: string
                  xmppServerKeyfile:
                    type: string
                  xmppServerPort:
                    type: string
                type: object
            required:
            - serviceConfiguration
            type: object
          status:
            description: 'VrouterStatus is the Status for vrouter API. TODO: after
              update to controllter-tool v0.4 rework AgentStatus to make it map instead
              of [] for performance (https://github.com/operator-framework/operator-sdk/issues/2485
              https://github.com/kubernetes-sigs/controller-tools/pull/317)'
            properties:
              active:
                type: boolean
              activeOnControllers:
                type: boolean
              agents:
                items:
                  description: AgentStatus is the Status of the agent.
                  properties:
                    analyticsNodes:
                      type: string
                    configNodes:
                      type: string
                    controlNodes:
                      type: string
                    encryptedParams:
                      type: string
                    name:
                      type: string
                    status:
                      description: 'AgentServiceStatus is the status value: Starting,
                        Ready, Updating'
                      type: string
                  type: object
                type: array
              nodes:
                additionalProperties:
                  type: string
                description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
                  of cluster 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: object
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
