apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: servicemeshmembers.maistra.io
spec:
  group: maistra.io
  names:
    kind: ServiceMeshMember
    listKind: ServiceMeshMemberList
    plural: servicemeshmembers
    shortNames:
    - smm
    singular: servicemeshmember
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: The ServiceMeshControlPlane this namespace belongs to
      jsonPath: .status.annotations.controlPlaneRef
      name: Control Plane
      type: string
    - description: Whether or not namespace is configured as a member of the mesh.
      jsonPath: .status.conditions[?(@.type=="Ready")].status
      name: Ready
      type: string
    - description: The age of the object
      jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: "A ServiceMeshMember object marks the namespace in which it lives
          as a member of the Service Mesh Control Plane referenced in the object.
          The ServiceMeshMember object should be created in each application namespace
          that must be part of the service mesh and must be named \"default\". \n
          When the ServiceMeshMember object is created, it causes the namespace to
          be added to the ServiceMeshMemberRoll within the namespace of the ServiceMeshControlPlane
          object the ServiceMeshMember references. \n To reference a ServiceMeshControlPlane,
          the user creating the ServiceMeshMember object must have the \"use\" permission
          on the referenced ServiceMeshControlPlane object. This permission is given
          via the mesh-users RoleBinding (and mesh-user Role) in the namespace of
          the referenced ServiceMeshControlPlane object."
        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: The desired state of this ServiceMeshMember.
            properties:
              controlPlaneRef:
                description: A reference to the ServiceMeshControlPlane object.
                properties:
                  name:
                    description: The name of the referenced ServiceMeshControlPlane
                      object.
                    type: string
                  namespace:
                    description: The namespace of the referenced ServiceMeshControlPlane
                      object.
                    type: string
                required:
                - name
                - namespace
                type: object
            required:
            - controlPlaneRef
            type: object
          status:
            description: The current status of this ServiceMeshMember. This data may
              be out of date by some window of time.
            properties:
              annotations:
                additionalProperties:
                  type: string
                description: Annotations is an unstructured key value map used to
                  store additional, usually redundant status information, such as
                  the number of components deployed by the ServiceMeshControlPlane
                  (number is redundant because you could just as easily count the
                  elements in the ComponentStatus array). The reason to add this redundant
                  information is to make it available to kubectl, which does not yet
                  allow counting objects in JSONPath expressions.
                type: object
              conditions:
                description: Represents the latest available observations of a ServiceMeshMember's
                  current state.
                items:
                  description: Condition represents a specific condition on a resource
                  properties:
                    lastTransitionTime:
                      format: date-time
                      type: string
                    message:
                      type: string
                    reason:
                      type: string
                    status:
                      type: string
                    type:
                      description: 'ServiceMeshMemberConditionType represents the
                        type of the condition.  Condition types are: Reconciled, NamespaceConfigured'
                      type: string
                  type: object
                type: array
              observedGeneration:
                description: The generation observed by the controller during the
                  most recent reconciliation. The information in the status pertains
                  to this particular generation of the object.
                format: int64
                type: integer
            required:
            - conditions
            - observedGeneration
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
    subresources:
      status: {}
