{
  "description": "ClusterManager configures the controllers on the hub that govern registration and work distribution for attached Klusterlets.\nIn Default mode, ClusterManager will only be deployed in open-cluster-management-hub namespace.\nIn Hosted mode, ClusterManager will be deployed in the namespace with the same name as cluster manager.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "default": {
        "deployOption": {
          "mode": "Default"
        }
      },
      "description": "Spec represents a desired deployment configuration of controllers that govern registration and work distribution for attached Klusterlets.",
      "properties": {
        "addOnManagerConfiguration": {
          "description": "AddOnManagerConfiguration contains the configuration of addon manager",
          "properties": {
            "featureGates": {
              "description": "FeatureGates represents the list of feature gates for addon manager\nIf it is set empty, default feature gates will be used.\nIf it is set, featuregate/Foo is an example of one item in FeatureGates:\n  1. If featuregate/Foo does not exist, registration-operator will discard it\n  2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n  3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.",
              "items": {
                "properties": {
                  "feature": {
                    "description": "Feature is the key of feature gate. e.g. featuregate/Foo.",
                    "type": "string"
                  },
                  "mode": {
                    "default": "Disable",
                    "description": "Mode is either Enable, Disable, \"\" where \"\" is Disable by default.\nIn Enable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=true\".\nIn Disable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=false\".",
                    "enum": [
                      "Enable",
                      "Disable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "feature"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "addOnManagerImagePullSpec": {
          "default": "quay.io/open-cluster-management/addon-manager",
          "description": "AddOnManagerImagePullSpec represents the desired image configuration of addon manager controller/webhook installed on hub.",
          "type": "string"
        },
        "deployOption": {
          "default": {
            "mode": "Default"
          },
          "description": "DeployOption contains the options of deploying a cluster-manager\nDefault mode is used if DeployOption is not set.",
          "properties": {
            "hosted": {
              "description": "Hosted includes configurations we need for clustermanager in the Hosted mode.",
              "properties": {
                "registrationWebhookConfiguration": {
                  "description": "RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.",
                  "properties": {
                    "address": {
                      "description": "Address represents the address of a webhook-server.\nIt could be in IP format or fqdn format.\nThe Address must be reachable by apiserver of the hub cluster.",
                      "pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$",
                      "type": "string"
                    },
                    "port": {
                      "default": 443,
                      "description": "Port represents the port of a webhook-server. The default value of Port is 443.",
                      "format": "int32",
                      "maximum": 65535,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "address"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "workWebhookConfiguration": {
                  "description": "WorkWebhookConfiguration represents the customized webhook-server configuration of work.",
                  "properties": {
                    "address": {
                      "description": "Address represents the address of a webhook-server.\nIt could be in IP format or fqdn format.\nThe Address must be reachable by apiserver of the hub cluster.",
                      "pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$",
                      "type": "string"
                    },
                    "port": {
                      "default": 443,
                      "description": "Port represents the port of a webhook-server. The default value of Port is 443.",
                      "format": "int32",
                      "maximum": 65535,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "address"
                  ],
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "mode": {
              "default": "Default",
              "description": "Mode can be Default or Hosted.\nIn Default mode, the Hub is installed as a whole and all parts of Hub are deployed in the same cluster.\nIn Hosted mode, only crd and configurations are installed on one cluster(defined as hub-cluster). Controllers run in another\ncluster (defined as management-cluster) and connect to the hub with the kubeconfig in secret of \"external-hub-kubeconfig\"(a kubeconfig\nof hub-cluster with cluster-admin permission).\nNote: Do not modify the Mode field once it's applied.",
              "enum": [
                "Default",
                "Hosted"
              ],
              "type": "string"
            }
          },
          "required": [
            "mode"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "nodePlacement": {
          "description": "NodePlacement enables explicit control over the scheduling of the deployed pods.",
          "properties": {
            "nodeSelector": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "NodeSelector defines which Nodes the Pods are scheduled on. The default is an empty list.",
              "type": "object"
            },
            "tolerations": {
              "description": "Tolerations are attached by pods to tolerate any taint that matches\nthe triple <key,value,effect> using the matching operator <operator>.\nThe default is an empty list.",
              "items": {
                "description": "The pod this Toleration is attached to tolerates any taint that matches\nthe 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.\nWhen 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.\nIf 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.\nValid operators are Exists and Equal. Defaults to Equal.\nExists is equivalent to wildcard for value, so that a pod can\ntolerate all taints of a particular category.",
                    "type": "string"
                  },
                  "tolerationSeconds": {
                    "description": "TolerationSeconds represents the period of time the toleration (which must be\nof effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,\nit is not set, which means tolerate the taint forever (do not evict). Zero and\nnegative 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.\nIf the operator is Exists, the value should be empty, otherwise just a regular string.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "placementImagePullSpec": {
          "default": "quay.io/open-cluster-management/placement",
          "description": "PlacementImagePullSpec represents the desired image configuration of placement controller/webhook installed on hub.",
          "type": "string"
        },
        "registrationConfiguration": {
          "description": "RegistrationConfiguration contains the configuration of registration",
          "properties": {
            "autoApproveUsers": {
              "description": "AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the\nbootstrap-hub-kubeconfig matches to the users, the cluster created by the bootstrap-hub-kubeconfig will\nbe auto-registered into the hub cluster. This takes effect only when ManagedClusterAutoApproval feature gate\nis enabled.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "featureGates": {
              "description": "FeatureGates represents the list of feature gates for registration\nIf it is set empty, default feature gates will be used.\nIf it is set, featuregate/Foo is an example of one item in FeatureGates:\n  1. If featuregate/Foo does not exist, registration-operator will discard it\n  2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n  3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.",
              "items": {
                "properties": {
                  "feature": {
                    "description": "Feature is the key of feature gate. e.g. featuregate/Foo.",
                    "type": "string"
                  },
                  "mode": {
                    "default": "Disable",
                    "description": "Mode is either Enable, Disable, \"\" where \"\" is Disable by default.\nIn Enable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=true\".\nIn Disable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=false\".",
                    "enum": [
                      "Enable",
                      "Disable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "feature"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "registrationDrivers": {
              "description": "RegistrationDrivers represent the list of hub registration drivers that contain information used by hub to initialize the hub cluster\nA RegistrationDriverHub contains details of authentication type and the hub cluster ARN",
              "items": {
                "properties": {
                  "authType": {
                    "default": "csr",
                    "description": "Type of the authentication used by hub to initialize the Hub cluster. Possible values are csr and awsirsa.",
                    "enum": [
                      "csr",
                      "awsirsa"
                    ],
                    "type": "string"
                  },
                  "awsirsa": {
                    "description": "AwsIrsa represents the configuration for awsirsa driver.",
                    "properties": {
                      "autoApprovedIdentities": {
                        "description": "AutoApprovedIdentities represent a list of approved arn patterns",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "hubClusterArn": {
                        "description": "This represents the hub cluster ARN\nExample - arn:eks:us-west-2:12345678910:cluster/hub-cluster1",
                        "pattern": "^arn:aws:eks:([a-zA-Z0-9-]+):(\\d{12}):cluster/([a-zA-Z0-9-]+)$",
                        "type": "string"
                      },
                      "tags": {
                        "description": "List of tags to be added to AWS resources created by hub while processing awsirsa registration request\nExample - \"product:v1:tenant:app-name=My-App\"",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "csr": {
                    "description": "CSR represents the configuration for csr driver.",
                    "properties": {
                      "autoApprovedIdentities": {
                        "description": "AutoApprovedIdentities represent a list of approved users",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "required": [
                  "authType"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-map-keys": [
                "authType"
              ],
              "x-kubernetes-list-type": "map"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "registrationImagePullSpec": {
          "default": "quay.io/open-cluster-management/registration",
          "description": "RegistrationImagePullSpec represents the desired image of registration controller/webhook installed on hub.",
          "type": "string"
        },
        "resourceRequirement": {
          "description": "ResourceRequirement specify QoS classes of deployments managed by clustermanager.\nIt applies to all the containers in the deployments.",
          "properties": {
            "resourceRequirements": {
              "description": "ResourceRequirements defines resource requests and limits when Type is ResourceQosClassResourceRequirement",
              "properties": {
                "claims": {
                  "description": "Claims lists the names of resources, defined in spec.resourceClaims,\nthat are used by this container.\n\nThis is an alpha field and requires enabling the\nDynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
                  "items": {
                    "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                    "properties": {
                      "name": {
                        "description": "Name must match the name of one entry in pod.spec.resourceClaims of\nthe Pod where this field is used. It makes that resource available\ninside a container.",
                        "type": "string"
                      },
                      "request": {
                        "description": "Request is the name chosen for a request in the referenced claim.\nIf empty, everything from the claim is made available, otherwise\nonly the result of this request.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array",
                  "x-kubernetes-list-map-keys": [
                    "name"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "limits": {
                  "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": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": "object"
                },
                "requests": {
                  "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": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value. Requests cannot exceed Limits.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": "object"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "type": {
              "default": "Default",
              "enum": [
                "Default",
                "BestEffort",
                "ResourceRequirement"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "workConfiguration": {
          "default": {
            "workDriver": "kube"
          },
          "description": "WorkConfiguration contains the configuration of work",
          "properties": {
            "featureGates": {
              "description": "FeatureGates represents the list of feature gates for work\nIf it is set empty, default feature gates will be used.\nIf it is set, featuregate/Foo is an example of one item in FeatureGates:\n  1. If featuregate/Foo does not exist, registration-operator will discard it\n  2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n  3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.",
              "items": {
                "properties": {
                  "feature": {
                    "description": "Feature is the key of feature gate. e.g. featuregate/Foo.",
                    "type": "string"
                  },
                  "mode": {
                    "default": "Disable",
                    "description": "Mode is either Enable, Disable, \"\" where \"\" is Disable by default.\nIn Enable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=true\".\nIn Disable mode, a valid feature gate `featuregate/Foo` will be set to \"--featuregate/Foo=false\".",
                    "enum": [
                      "Enable",
                      "Disable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "feature"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "workDriver": {
              "default": "kube",
              "description": "WorkDriver represents the type of work driver. Possible values are \"kube\", \"mqtt\", or \"grpc\".\nIf not provided, the default value is \"kube\".\nIf set to non-\"kube\" drivers, the klusterlet need to use the same driver.\nand the driver configuration must be provided in a secret named \"work-driver-config\"\nin the namespace where the cluster manager is running, adhering to the following structure:\nconfig.yaml: |\n  <driver-config-in-yaml>\n\nFor detailed driver configuration, please refer to the sdk-go documentation: https://github.com/open-cluster-management-io/sdk-go/blob/main/pkg/cloudevents/README.md#supported-protocols-and-drivers",
              "enum": [
                "kube",
                "mqtt",
                "grpc"
              ],
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "workImagePullSpec": {
          "default": "quay.io/open-cluster-management/work",
          "description": "WorkImagePullSpec represents the desired image configuration of work controller/webhook installed on hub.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "Status represents the current status of controllers that govern the lifecycle of managed clusters.",
      "properties": {
        "conditions": {
          "description": "Conditions contain the different condition statuses for this ClusterManager.\nValid condition types are:\nApplied: Components in hub are applied.\nAvailable: Components in hub are available and ready to serve.\nProgressing: Components in hub are in a transitioning state.\nDegraded: Components in hub do not match the desired configuration and only provide\ndegraded service.",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "generations": {
          "description": "Generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.",
          "items": {
            "description": "GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.\nThe definition matches the GenerationStatus defined in github.com/openshift/api/v1",
            "properties": {
              "group": {
                "description": "group is the group of the resource that you're tracking",
                "type": "string"
              },
              "lastGeneration": {
                "description": "lastGeneration is the last generation of the resource that controller applies",
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "name is the name of the resource that you're tracking",
                "type": "string"
              },
              "namespace": {
                "description": "namespace is where the resource that you're tracking is",
                "type": "string"
              },
              "resource": {
                "description": "resource is the resource type of the resource that you're tracking",
                "type": "string"
              },
              "version": {
                "description": "version is the version of the resource that you're tracking",
                "type": "string"
              }
            },
            "required": [
              "group",
              "lastGeneration",
              "name",
              "resource",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the last generation change you've dealt with",
          "format": "int64",
          "type": "integer"
        },
        "relatedResources": {
          "description": "RelatedResources are used to track the resources that are related to this ClusterManager.",
          "items": {
            "description": "RelatedResourceMeta represents the resource that is managed by an operator",
            "properties": {
              "group": {
                "description": "group is the group of the resource that you're tracking",
                "type": "string"
              },
              "name": {
                "description": "name is the name of the resource that you're tracking",
                "type": "string"
              },
              "namespace": {
                "description": "namespace is where the thing you're tracking is",
                "type": "string"
              },
              "resource": {
                "description": "resource is the resource type of the resource that you're tracking",
                "type": "string"
              },
              "version": {
                "description": "version is the version of the thing you're tracking",
                "type": "string"
              }
            },
            "required": [
              "group",
              "name",
              "resource",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
