---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.15.0
  name: nexususers.edp.epam.com
spec:
  group: edp.epam.com
  names:
    kind: NexusUser
    listKind: NexusUserList
    plural: nexususers
    singular: nexususer
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: NexusUser is the Schema for the nexususers 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: NexusUserSpec defines the desired state of NexusUser.
            properties:
              email:
                description: Email is the email address of the user.
                example: john.doe@example
                maxLength: 254
                type: string
              firstName:
                description: FirstName of the user.
                example: John
                type: string
              id:
                description: |-
                  ID is the username of the user.
                  ID should be unique across all users.
                example: new-user
                maxLength: 512
                type: string
                x-kubernetes-validations:
                - message: Value is immutable
                  rule: self == oldSelf
              lastName:
                description: LastName of the user.
                example: Doe
                type: string
              nexusRef:
                description: NexusRef is a reference to Nexus custom resource.
                properties:
                  kind:
                    default: Nexus
                    description: Kind specifies the kind of the Nexus resource.
                    type: string
                  name:
                    description: Name specifies the name of the Nexus resource.
                    type: string
                required:
                - name
                type: object
              roles:
                description: Roles is a list of roles assigned to user.
                example:
                - nx-admin
                items:
                  type: string
                minItems: 1
                type: array
              secret:
                description: |-
                  Secret is the reference of the k8s object Secret for the user password.
                  Format: $secret-name:secret-key.
                  Updating user password is not supported.
                example: $nexus-user-secret:password-filed
                type: string
              status:
                default: active
                description: Status is a status of the user.
                enum:
                - active
                - disabled
                example: active
                type: string
            required:
            - email
            - firstName
            - id
            - lastName
            - nexusRef
            - roles
            - secret
            type: object
          status:
            description: NexusUserStatus defines the observed state of NexusUser.
            properties:
              error:
                description: Error is an error message if something went wrong.
                type: string
              value:
                description: Value is a status of the user.
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
