# Copyright Contributors to the Open Cluster Management project

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.5
  creationTimestamp: "2020-11-02T14:25:48Z"
  generation: 1
  labels:
    installer.name: multiclusterhub
    installer.namespace: open-cluster-management
  name: managedclusterinfos.internal.open-cluster-management.io
  resourceVersion: "22986"
  selfLink: /apis/apiextensions.k8s.io/v1/customresourcedefinitions/managedclusterinfos.internal.open-cluster-management.io
  uid: e6920be3-598f-4ba2-966f-8ddd2bbd0f48
spec:
  conversion:
    strategy: None
  group: internal.open-cluster-management.io
  names:
    kind: ManagedClusterInfo
    listKind: ManagedClusterInfoList
    plural: managedclusterinfos
    singular: managedclusterinfo
  # preserveUnknownFields: true
  scope: Namespaced
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: ManagedClusterInfo represents the information of managed cluster
          that acm hub needs to know
        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 information of the Cluster.
            properties:
              loggingCA:
                description: LoggingCA is the ca data for logging server to authorize
                  apiserver
                format: byte
                type: string
              masterEndpoint:
                description: MasterEndpoint shows the apiserver endpoint of managed
                  cluster
                type: string
            type: object
          status:
            description: Status represents the desired status of the Cluster
            properties:
              cloudVendor:
                description: CloudVendor describes the cloud provider for the managed
                  cluster.
                type: string
              clusterID:
                description: ClusterID is the identifier of managed cluster
                type: string
              conditions:
                description: Conditions contains condition information for a managed
                  cluster
                items:
                  description: StatusCondition contains condition information for
                    a managed cluster.
                  properties:
                    lastTransitionTime:
                      description: LastTransitionTime is the last time the condition
                        changed from one status to another.
                      format: date-time
                      type: string
                    message:
                      description: Message is a human-readable message indicating
                        details about the last status change.
                      type: string
                    reason:
                      description: Reason is a (brief) reason for the condition's
                        last status change.
                      type: string
                    status:
                      description: Status is the status of the condition. One of True,
                        False, Unknown.
                      type: string
                    type:
                      description: Type is the type of the cluster condition.
                      type: string
                  type: object
                type: array
              consoleURL:
                description: ConsoleURL shows the url of console in managed cluster
                type: string
              distributionInfo:
                description: DistributionInfo is the information about distribution
                  of managed cluster
                properties:
                  ocp:
                    description: OCP is the distribution information of OCP managed
                      cluster, is matched when the Type is OCP.
                    properties:
                      availableUpdates:
                        description: availableUpdates contains the list of update
                          versions that are appropriate for the manage cluster.
                        items:
                          type: string
                        type: array
                      desiredVersion:
                        description: Desiredversion represents the desired version
                          of the ocp cluster
                        type: string
                      upgradeFailed:
                        description: UpgradeFailed indicate whether upgrade of the
                          manage cluster is failed
                        type: boolean
                      version:
                        description: Version is the distribution version of OCP
                        type: string
                    type: object
                  type:
                    description: Type is the distribution type of managed cluster,
                      is OCP currently
                    type: string
                type: object
              kubeVendor:
                description: KubeVendor describes the kubernetes provider of the managed
                  cluster.
                type: string
              loggingEndpoint:
                description: LoggingEndpoint shows the endpoint to connect to logging
                  server of managed cluster
                properties:
                  hostname:
                    description: The Hostname of this endpoint
                    type: string
                  ip:
                    description: 'The IP of this endpoint. May not be loopback (127.0.0.0/8),
                      link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24).
                      IPv6 is also accepted but not fully supported on all platforms.
                      Also, certain kubernetes components, like kube-proxy, are not
                      IPv6 ready. TODO: This should allow hostname or IP, See #4447.'
                    type: string
                  nodeName:
                    description: 'Optional: Node hosting this endpoint. This can be
                      used to determine endpoints local to a node.'
                    type: string
                  targetRef:
                    description: Reference to object providing the endpoint.
                    properties:
                      apiVersion:
                        description: API version of the referent.
                        type: string
                      fieldPath:
                        description: 'If referring to a piece of an object instead
                          of an entire object, this string should contain a valid
                          JSON/Go field access statement, such as desiredState.manifest.containers[2].
                          For example, if the object reference is to a container within
                          a pod, this would take on a value like: "spec.containers{name}"
                          (where "name" refers to the name of the container that triggered
                          the event) or if no container name is specified "spec.containers[2]"
                          (container with index 2 in this pod). This syntax is chosen
                          only to have some well-defined way of referencing a part
                          of an object. TODO: this design is not final and this field
                          is subject to change in the future.'
                        type: string
                      kind:
                        description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
                        type: string
                      name:
                        description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
                        type: string
                      namespace:
                        description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
                        type: string
                      resourceVersion:
                        description: 'Specific resourceVersion to which this reference
                          is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
                        type: string
                      uid:
                        description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                        type: string
                    type: object
                required:
                - ip
                type: object
              loggingPort:
                description: LoggingPort shows the port to connect to logging server
                  of managed cluster
                properties:
                  appProtocol:
                    description: The application protocol for this port. This field
                      follows standard Kubernetes label syntax. Un-prefixed names
                      are reserved for IANA standard service names (as per RFC-6335
                      and http://www.iana.org/assignments/service-names). Non-standard
                      protocols should use prefixed names such as mycompany.com/my-custom-protocol.
                      Field can be enabled with ServiceAppProtocol feature gate.
                    type: string
                  name:
                    description: The name of this port.  This must match the 'name'
                      field in the corresponding ServicePort. Must be a DNS_LABEL.
                      Optional only if one port is defined.
                    type: string
                  port:
                    description: The port number of the endpoint.
                    format: int32
                    type: integer
                  protocol:
                    description: The IP protocol for this port. Must be UDP, TCP,
                      or SCTP. Default is TCP.
                    type: string
                required:
                - port
                type: object
              nodeList:
                description: NodeList shows a list of the status of nodes
                items:
                  description: NodeStatus presents the name, labels and conditions
                    of node
                  properties:
                    capacity:
                      additionalProperties:
                        anyOf:
                        - type: integer
                        - type: string
                        pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                        x-kubernetes-int-or-string: true
                      description: Capacity represents the total resources of a node.
                        only includes CPU and memory.
                      type: object
                    conditions:
                      description: Conditions is an array of current node conditions.
                        only includes NodeReady.
                      items:
                        properties:
                          status:
                            description: Status of the condition, one of True, False,
                              Unknown.
                            type: string
                          type:
                            description: Type of node condition.
                            type: string
                        type: object
                      type: array
                    labels:
                      additionalProperties:
                        type: string
                      description: Labels of node.
                      type: object
                    name:
                      description: Name of node
                      type: string
                  type: object
                type: array
              version:
                description: Version is the kube version of managed cluster.
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ManagedClusterInfo
    listKind: ManagedClusterInfoList
    plural: managedclusterinfos
    singular: managedclusterinfo
  conditions:
  - lastTransitionTime: "2020-11-02T14:25:48Z"
    message: no conflicts found
    reason: NoConflicts
    status: "True"
    type: NamesAccepted
  - lastTransitionTime: "2020-11-02T14:25:48Z"
    message: the initial names have been accepted
    reason: InitialNamesAccepted
    status: "True"
    type: Established
  storedVersions:
  - v1beta1
