APIs
APIs Red Hat Advanced Cluster Management for Kubernetes 2.12 APIs
GET /cluster.open-cluster-management.io/v1/managedclusters POST /cluster.open-cluster-management.io/v1/managedclusters { "apiVersion" : "cluster.open-cluster-management.io/v1", "kind" : "ManagedCluster", "metadata" : { "labels" : { "vendor" : "OpenShift" }, "name" : "cluster1" }, "spec": { "hubAcceptsClient": true, "managedClusterClientConfigs": [ { "caBundle": "test", "url": "https://test.com" } ] }, "status" : { } } GET /cluster.open-cluster-management.io/v1/managedclusters/{cluster_name} DELETE /cluster.open-cluster-management.io/v1/managedclusters/{cluster_name} DELETE /hive.openshift.io/v1/{cluster_name}/clusterdeployments/{cluster_name} "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?USD" GET /siteconfig.open-cluster-management.io/v1alpha1/{clusterinstance_namespace}/{clusterinstance_name} POST /siteconfig.open-cluster-management.io/v1alpha1/<clusterinstance_namespace>/<clusterinstance_name> { "apiVersion": "siteconfig.open-cluster-management.io/v1alpha1", "kind": "ClusterInstance", "metadata": { "name": "site-sno-du-1", "namespace": "site-sno-du-1" }, "spec": { "baseDomain": "example.com", "pullSecretRef": { "name": "pullSecretName" }, "sshPublicKey": "ssh-rsa ", "clusterName": "site-sno-du-1", "proxy": { "noProxys": "foobar" }, "caBundleRef": { "name": "my-bundle-ref" }, "extraManifestsRefs": [ { "name": "foobar1" }, { "name": "foobar2" } ], "networkType": "OVNKubernetes", "installConfigOverrides": "{\"capabilities\":{\"baselineCapabilitySet\": \"None\", \"additionalEnabledCapabilities\": [ \"marketplace\", \"NodeTuning\" ] }}", "extraLabels": { "ManagedCluster": { "group-du-sno": "test", "common": "true", "sites": "site-sno-du-1" } }, "clusterNetwork": [ { "cidr": "203.0.113.0/24", "hostPrefix": 23 } ], "machineNetwork": [ { "cidr": "203.0.113.0/24" } ], "serviceNetwork": [ { "cidr": "203.0.113.0/24" } ], "additionalNTPSources": [ "NTP.server1", "198.51.100.100" ], "ignitionConfigOverride": "{\"ignition\": {\"version\": \"3.1.0\"}, \"storage\": {\"files\": [{\"path\": \"/etc/containers/registries.conf\", \"overwrite\": true, \"contents\": {\"source\": \"data:text/plain;base64,foobar==\"}}]}}", "diskEncryption": { "type": "nbde", "tang": [ { "url": "http://192.0.2.5:7500", "thumbprint": "1234567890" } ] }, "clusterType": "SNO", "templateRefs": [ { "name": "ai-cluster-templates-v1", "namespace": "rhacm" } ], "nodes": [ { "hostName": "node1", "role": "master", "templateRefs": [ { "name": "ai-node-templates-v1", "namespace": "rhacm" } ], "ironicInspect": "", "bmcAddress": "idrac-virtualmedia+https://203.0.113.100/redfish/v1/Systems/System.Embedded.1", "bmcCredentialsName": { "name": "<bmcCredentials_secre_name>" }, "bootMACAddress": "00:00:5E:00:53:00", "bootMode": "UEFI", "installerArgs": "[\"--append-karg\", \"nameserver=8.8.8.8\", \"-n\"]", "ignitionConfigOverride": "{\"ignition\": {\"version\": \"3.1.0\"}, \"storage\": {\"files\": [{\"path\": \"/etc/containers/registries.conf\", \"overwrite\": true, \"contents\": {\"source\": \"data:text/plain;base64,foobar==\"}}]}}", "nodeNetwork": { "interfaces": [ { "name": "eno1", "macAddress": "00:00:5E:00:53:01" } ], "config": { "interfaces": [ { "name": "eno1", "type": "ethernet", "ipv4": { "enabled": true, "dhcp": false, "address": [ { "ip": "192.0.2.1", "prefix-length": 24 } ] }, "ipv6": { "enabled": true, "dhcp": false, "address": [ { "ip": "2001:0DB8:0:0:0:0:0:1", "prefix-length": 32 } ] } } ], "dns-resolver": { "config": { "server": [ "198.51.100.1" ] } }, "routes": { "config": [ { "destination": "0.0.0.0/0", "next-hop-address": "203.0.113.255", "next-hop-interface": "eno1", "table-id": 254 } ] } } } } ] } } GET /siteconfig.open-cluster-management.io/v1alpha1/<clusterinstance_namespace>/<clusterinstance_name> extraAnnotations: ClusterDeployment: myClusterAnnotation: success extraLabels: ManagedCluster: common: "true" label-a : "value-a" extraAnnotations: BareMetalHost: myNodeAnnotation: success extraLabels: ManagedCluster: common: "true" label-a : "value-a" GET /cluster.open-cluster-management.io/v1beta2/managedclustersets POST /cluster.open-cluster-management.io/v1beta2/managedclustersets { "apiVersion": "cluster.open-cluster-management.io/v1beta2", "kind": "ManagedClusterSet", "metadata": { "name": "clusterset1" }, "spec": { "clusterSelector": { "selectorType": "ExclusiveClusterSetLabel" } }, "status": {} } GET /cluster.open-cluster-management.io/v1beta2/managedclustersets/{clusterset_name} DELETE /cluster.open-cluster-management.io/v1beta2/managedclustersets/{clusterset_name} GET /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersetbindings POST /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersetbindings { "apiVersion" : "cluster.open-cluster-management.io/v1beta2", "kind" : "ManagedClusterSetBinding", "metadata" : { "name" : "clusterset1", "namespace" : "ns1" }, "spec": { "clusterSet": "clusterset1" }, "status" : { } } GET /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersetbindings/{clustersetbinding_name} DELETE /cluster.open-cluster-management.io/v1beta2/managedclustersetbindings/{clustersetbinding_name} GET /managedclusters.clusterview.open-cluster-management.io LIST /managedclusters.clusterview.open-cluster-management.io { "apiVersion" : "clusterview.open-cluster-management.io/v1alpha1", "kind" : "ClusterView", "metadata" : { "name" : "<user_ID>" }, "spec": { }, "status" : { } } WATCH /managedclusters.clusterview.open-cluster-management.io GET /managedclustersets.clusterview.open-cluster-management.io LIST /managedclustersets.clusterview.open-cluster-management.io WATCH /managedclustersets.clusterview.open-cluster-management.io POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels { "apiVersion": "apps.open-cluster-management.io/v1", "kind": "Channel", "metadata": { "name": "sample-channel", "namespace": "default" }, "spec": { "configMapRef": { "kind": "configmap", "name": "bookinfo-resource-filter-configmap" }, "pathname": "https://charts.helm.sh/stable", "type": "HelmRepo" } } GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels/{channel_name} DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/channels/{channel_name} POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions { "apiVersion" : "apps.open-cluster-management.io/v1", "kind" : "Subscription", "metadata" : { "name" : "sample_subscription", "namespace" : "default", "labels" : { "app" : "sample_subscription-app" }, "annotations" : { "apps.open-cluster-management.io/git-path" : "apps/sample/", "apps.open-cluster-management.io/git-branch" : "sample_branch" } }, "spec" : { "channel" : "channel_namespace/sample_channel", "packageOverrides" : [ { "packageName" : "my-sample-application", "packageAlias" : "the-sample-app", "packageOverrides" : [ { "path" : "spec", "value" : { "persistence" : { "enabled" : false, "useDynamicProvisioning" : false }, "license" : "accept", "tls" : { "hostname" : "my-mcm-cluster.icp" }, "sso" : { "registrationImage" : { "pullSecret" : "hub-repo-docker-secret" } } } } ] } ], "placement" : { "placementRef" : { "kind" : "PlacementRule", "name" : "demo-clusters" } } } } GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions/{subscription_name} DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/subscriptions/{subscription_name} POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules { "apiVersion" : "apps.open-cluster-management.io/v1", "kind" : "PlacementRule", "metadata" : { "name" : "towhichcluster", "namespace" : "ns-sub-1" }, "spec" : { "clusterConditions" : [ { "type": "ManagedClusterConditionAvailable", "status": "True" } ], "clusterSelector" : { } } } GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules/{placementrule_name} DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/placementrules/{placementrule_name} POST /app.k8s.io/v1beta1/namespaces/{namespace}/applications { "apiVersion" : "app.k8s.io/v1beta1", "kind" : "Application", "metadata" : { "labels" : { "app" : "nginx-app-details" }, "name" : "nginx-app-3", "namespace" : "ns-sub-1" }, "spec" : { "componentKinds" : [ { "group" : "apps.open-cluster-management.io", "kind" : "Subscription" } ] }, "selector" : { "matchLabels" : { "app" : "nginx-app-details" } }, "status" : { } } GET /app.k8s.io/v1beta1/namespaces/{namespace}/applications GET /app.k8s.io/v1beta1/namespaces/{namespace}/applications/{application_name} DELETE /app.k8s.io/v1beta1/namespaces/{namespace}/applications/{application_name} POST /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases { "apiVersion" : "apps.open-cluster-management.io/v1", "kind" : "HelmRelease", "metadata" : { "name" : "nginx-ingress", "namespace" : "default" }, "repo" : { "chartName" : "nginx-ingress", "source" : { "helmRepo" : { "urls" : [ "https://kubernetes-charts.storage.googleapis.com/nginx-ingress-1.26.0.tgz" ] }, "type" : "helmrepo" }, "version" : "1.26.0" }, "spec" : { "defaultBackend" : { "replicaCount" : 3 } } } GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases GET /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases/{helmrelease_name} DELETE /apps.open-cluster-management.io/v1/namespaces/{namespace}/helmreleases/{helmrelease_name} POST /policy.open-cluster-management.io/v1/v1alpha1/namespaces/{namespace}/policies/{policy_name} { "apiVersion": "policy.open-cluster-management.io/v1", "kind": "Policy", "metadata": { "name": "test-policy-swagger", }, "spec": { "remediationAction": "enforce", "namespaces": { "include": [ "default" ], "exclude": [ "kube*" ] }, "policy-templates": { "kind": "ConfigurationPolicy", "apiVersion": "policy.open-cluster-management.io/v1", "metadata": { "name": "test-role" }, "spec" : { "object-templates": { "complianceType": "musthave", "metadataComplianceType": "musthave", "objectDefinition": { "apiVersion": "rbac.authorization.k8s.io/v1", "kind": "Role", "metadata": { "name": "role-policy", }, "rules": [ { "apiGroups": [ "extensions", "apps" ], "resources": [ "deployments" ], "verbs": [ "get", "list", "watch", "delete" ] }, { "apiGroups": [ "core" ], "resources": [ "pods" ], "verbs": [ "create", "update", "patch" ] }, { "apiGroups": [ "core" ], "resources": [ "secrets" ], "verbs": [ "get", "watch", "list", "create", "delete", "update", "patch" ], }, ], }, }, }, }, GET /policy.open-cluster-management.io/v1/namespaces/{namespace}/policies/{policy_name} GET /policy.open-cluster-management.io/v1/namespaces/{namespace}/policies/{policy_name} DELETE /policy.open-cluster-management.io/v1/namespaces/{namespace}/policies/{policy_name} POST /apis/observability.open-cluster-management.io/v1beta2/multiclusterobservabilities { "apiVersion": "observability.open-cluster-management.io/v1beta2", "kind": "MultiClusterObservability", "metadata": { "name": "example" }, "spec": { "observabilityAddonSpec": {} "storageConfig": { "metricObjectStorage": { "name": "thanos-object-storage", "key": "thanos.yaml" "writeStorage": { - "key": " ", "name" : " " - "key": " ", "name" : " " } } } } GET /apis/observability.open-cluster-management.io/v1beta2/multiclusterobservabilities GET /apis/observability.open-cluster-management.io/v1beta2/multiclusterobservabilities/{multiclusterobservability_name} DELETE /apis/observability.open-cluster-management.io/v1beta2/multiclusterobservabilities/{multiclusterobservability_name} create route passthrough search-api --service=search-search-api -n open-cluster-management input SearchFilter { property: String! values: [String]! } input SearchInput { keywords: [String] filters: [SearchFilter] limit: Int relatedKinds: [String] } type SearchResult { count: Int items: [Map] related: [SearchRelatedResult] } type SearchRelatedResult { kind: String! count: Int items: [Map] } { "query": "type SearchResult {count: Intitems: [Map]related: [SearchRelatedResult]} type SearchRelatedResult {kind: String!count: Intitems: [Map]}", "variables": { "input": [ { "keywords": [], "filters": [ { "property": "kind", "values": [ "Deployment" ] } ], "limit": 10 } ] } } type Query { search(input: [SearchInput]): [SearchResult] searchComplete(property: String!, query: SearchInput, limit: Int): [String] searchSchema: Map messages: [Message] } query mySearch(USDinput: [SearchInput]) { search(input: USDinput) { items } } {"input":[ { "keywords":[], "filters":[ {"property":"kind","values":["Deployment"]}], "limit":10 } ]} query mySearch(USDinput: [SearchInput]) { search(input: USDinput) { items } } {"input":[ { "keywords":[], "filters":[ {"property":"kind","values":["Pod"]}], "limit":10 } ]} POST /operator.open-cluster-management.io/v1beta1/namespaces/{namespace}/mch { "apiVersion": "apiextensions.k8s.io/v1", "kind": "CustomResourceDefinition", "metadata": { "name": "multiclusterhubs.operator.open-cluster-management.io" }, "spec": { "group": "operator.open-cluster-management.io", "names": { "kind": "MultiClusterHub", "listKind": "MultiClusterHubList", "plural": "multiclusterhubs", "shortNames": [ "mch" ], "singular": "multiclusterhub" }, "scope": "Namespaced", "versions": [ { "additionalPrinterColumns": [ { "description": "The overall status of the multicluster hub.", "jsonPath": ".status.phase", "name": "Status", "type": "string" }, { "jsonPath": ".metadata.creationTimestamp", "name": "Age", "type": "date" } ], "name": "v1", "schema": { "openAPIV3Schema": { "description": "MultiClusterHub defines the configuration for an instance of the multiCluster hub, a central point for managing multiple Kubernetes-based clusters. The deployment of multicluster hub components is determined based on the configuration that is defined in this resource.", "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. The value is 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": "MultiClusterHubSpec defines the desired state of MultiClusterHub.", "properties": { "availabilityConfig": { "description": "Specifies deployment replication for improved availability. Options are: Basic and High (default).", "type": "string" }, "customCAConfigmap": { "description": "Provide the customized OpenShift default ingress CA certificate to Red Hat Advanced Cluster Management.", } "type": "string" }, "disableHubSelfManagement": { "description": "Disable automatic import of the hub cluster as a managed cluster.", "type": "boolean" }, "disableUpdateClusterImageSets": { "description": "Disable automatic update of ClusterImageSets.", "type": "boolean" }, "hive": { "description": "(Deprecated) Overrides for the default HiveConfig specification.", "properties": { "additionalCertificateAuthorities": { "description": "(Deprecated) AdditionalCertificateAuthorities is a list of references to secrets in the 'hive' namespace that contain an additional Certificate Authority to use when communicating with target clusters. These certificate authorities are used in addition to any self-signed CA generated by each cluster on installation.", "items": { "description": "LocalObjectReference contains the information to let you locate the referenced object inside the same namespace.", "properties": { "name": { "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" } }, "type": "object" }, "type": "array" }, "backup": { "description": "(Deprecated) Backup specifies configuration for backup integration. If absent, backup integration is disabled.", "properties": { "minBackupPeriodSeconds": { "description": "(Deprecated) MinBackupPeriodSeconds specifies that a minimum of MinBackupPeriodSeconds occurs in between each backup. This is used to rate limit backups. This potentially batches together multiple changes into one backup. No backups are lost for changes that happen during the interval that is queued up, and results in a backup once the interval has been completed.", "type": "integer" }, "velero": { "description": "(Deprecated) Velero specifies configuration for the Velero backup integration.", "properties": { "enabled": { "description": "(Deprecated) Enabled dictates if the Velero backup integration is enabled. If not specified, the default is disabled.", "type": "boolean" } }, "type": "object" } }, "type": "object" }, "externalDNS": { "description": "(Deprecated) ExternalDNS specifies configuration for external-dns if it is to be deployed by Hive. If absent, external-dns is not deployed.", "properties": { "aws": { "description": "(Deprecated) AWS contains AWS-specific settings for external DNS.", "properties": { "credentials": { "description": "(Deprecated) Credentials reference a secret that is used to authenticate with AWS Route53. It needs permission to manage entries in each of the managed domains for this cluster. Secret should have AWS keys named 'aws_access_key_id' and 'aws_secret_access_key'.", "properties": { "name": { "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" } }, "type": "object" } }, "type": "object" }, "gcp": { "description": "(Deprecated) GCP contains Google Cloud Platform specific settings for external DNS.", "properties": { "credentials": { "description": "(Deprecated) Credentials reference a secret that is used to authenticate with GCP DNS. It needs permission to manage entries in each of the managed domains for this cluster. Secret should have a key names 'osServiceAccount.json'. The credentials must specify the project to use.", "properties": { "name": { "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "failedProvisionConfig": { "description": "(Deprecated) FailedProvisionConfig is used to configure settings related to handling provision failures.", "properties": { "skipGatherLogs": { "description": "(Deprecated) SkipGatherLogs disables functionality that attempts to gather full logs from the cluster if an installation fails for any reason. The logs are stored in a persistent volume for up to seven days.", "type": "boolean" } }, "type": "object" }, "globalPullSecret": { "description": "(Deprecated) GlobalPullSecret is used to specify a pull secret that is used globally by all of the cluster deployments. For each cluster deployment, the contents of GlobalPullSecret are merged with the specific pull secret for a cluster deployment(if specified), with precedence given to the contents of the pull secret for the cluster deployment.", "properties": { "name": { "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "type": "string" } }, "type": "object" }, "maintenanceMode": { "description": "(Deprecated) MaintenanceMode can be set to true to disable the Hive controllers in situations where you need to ensure nothing is running that adds or act upon finalizers on Hive types. This should rarely be needed. Sets replicas to zero for the 'hive-controllers' deployment to accomplish this.", "type": "boolean" } }, "required": [ "failedProvisionConfig" ], "type": "object" }, "imagePullSecret": { "description": "Override pull secret for accessing MultiClusterHub operand and endpoint images.", "type": "string" }, "ingress": { "description": "Configuration options for ingress management.", "properties": { "sslCiphers": { "description": "List of SSL ciphers enabled for management ingress. Defaults to full list of supported ciphers.", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "nodeSelector": { "additionalProperties": { "type": "string" }, "description": "Set the node selectors..", "type": "object" }, "overrides": { "description": "Developer overrides.", "properties": { "imagePullPolicy": { "description": "Pull policy of the multicluster hub images.", "type": "string" } }, "type": "object" }, "separateCertificateManagement": { "description": "(Deprecated) Install cert-manager into its own namespace.", "type": "boolean" } }, "type": "object" }, "status": { "description": "MulticlusterHubStatus defines the observed state of MultiClusterHub.", "properties": { "components": { "additionalProperties": { "description": "StatusCondition contains condition information.", "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\ndetails about the last status change.", "type": "string" }, "reason": { "description": "Reason is a (brief) reason for the last status change of the condition.", "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" }, "description": "Components []ComponentCondition `json:\"manifests,omitempty\"`", "type": "object" }, "conditions": { "description": "Conditions contain the different condition statuses for the MultiClusterHub.", "items": { "description": "StatusCondition contains condition information.", "properties": { "lastTransitionTime": { "description": "LastTransitionTime is the last time the condition changed from one status to another.", "format": "date-time", "type": "string" }, "lastUpdateTime": { "description": "The last time this condition was updated.", "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 last status change of the condition.", "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" }, "currentVersion": { "description": "CurrentVersion indicates the current version..", "type": "string" }, "desiredVersion": { "description": "DesiredVersion indicates the desired version.", "type": "string" }, "phase": { "description": "Represents the running phase of the MultiClusterHub", "type": "string" } }, "type": "object" } }, "type": "object" } }, "served": true, "storage": true, "subresources": { "status": {} } } ] } } GET /operator.open-cluster-management.io/v1beta1/namespaces/{namespace}/operator GET /operator.open-cluster-management.io/v1beta1/namespaces/{namespace}/operator/{multiclusterhub_name} DELETE /operator.open-cluster-management.io/v1beta1/namespaces/{namespace}/operator/{multiclusterhub_name} GET /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placement POST /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placements { "apiVersion" : "cluster.open-cluster-management.io/v1beta1", "kind" : "Placement", "metadata" : { "name" : "placement1", "namespace": "ns1" }, "spec": { "predicates": [ { "requiredClusterSelector": { "labelSelector": { "matchLabels": { "vendor": "OpenShift" } } } } ] }, "status" : { } } GET /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placements/{placement_name} DELETE /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placements/{placement_name} GET /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placementdecisions POST /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placementdecisions { "apiVersion" : "cluster.open-cluster-management.io/v1beta1", "kind" : "PlacementDecision", "metadata" : { "labels" : { "cluster.open-cluster-management.io/placement" : "placement1" }, "name" : "placement1-decision1", "namespace": "ns1" }, "status" : { } } GET /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placementdecisions/{placementdecision_name} DELETE /cluster.open-cluster-management.io/v1beta1/namespaces/{namespace}/placementdecisions/{placementdecision_name} POST /app.k8s.io/v1/namespaces/{namespace}/discoveryconfigs { "apiVersion": "apiextensions.k8s.io/v1", "kind": "CustomResourceDefinition", "metadata": { "annotations": { "controller-gen.kubebuilder.io/version": "v0.4.1", }, "creationTimestamp": null, "name": "discoveryconfigs.discovery.open-cluster-management.io", }, "spec": { "group": "discovery.open-cluster-management.io", "names": { "kind": "DiscoveryConfig", "listKind": "DiscoveryConfigList", "plural": "discoveryconfigs", "singular": "discoveryconfig" }, "scope": "Namespaced", "versions": [ { "name": "v1", "schema": { "openAPIV3Schema": { "description": "DiscoveryConfig is the Schema for the discoveryconfigs 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": "DiscoveryConfigSpec defines the desired state of DiscoveryConfig", "properties": { "credential": { "description": "Credential is the secret containing credentials to connect to the OCM api on behalf of a user", "type": "string" }, "filters": { "description": "Sets restrictions on what kind of clusters to discover", "properties": { "lastActive": { "description": "LastActive is the last active in days of clusters to discover, determined by activity timestamp", "type": "integer" }, "openShiftVersions": { "description": "OpenShiftVersions is the list of release versions of OpenShift of the form \"<Major>.<Minor>\"", "items": { "description": "Semver represents a partial semver string with the major and minor version in the form \"<Major>.<Minor>\". For example: \"4.15\"", "pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)USD", "type": "string" }, "type": "array" } }, "type": "object" } }, "required": [ "credential" ], "type": "object" }, "status": { "description": "DiscoveryConfigStatus defines the observed state of DiscoveryConfig", "type": "object" } }, "type": "object" } }, "served": true, "storage": true, "subresources": { "status": {} } } ] }, "status": { "acceptedNames": { "kind": "", "plural": "" }, "conditions": [], "storedVersions": [] } } GET /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator DELETE /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator/{discoveryconfigs_name} POST /app.k8s.io/v1/namespaces/{namespace}/discoveredclusters { "apiVersion": "apiextensions.k8s.io/v1", "kind": "CustomResourceDefinition", "metadata": { "annotations": { "controller-gen.kubebuilder.io/version": "v0.4.1", }, "creationTimestamp": null, "name": "discoveredclusters.discovery.open-cluster-management.io", }, "spec": { "group": "discovery.open-cluster-management.io", "names": { "kind": "DiscoveredCluster", "listKind": "DiscoveredClusterList", "plural": "discoveredclusters", "singular": "discoveredcluster" }, "scope": "Namespaced", "versions": [ { "name": "v1", "schema": { "openAPIV3Schema": { "description": "DiscoveredCluster is the Schema for the discoveredclusters 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": "DiscoveredClusterSpec defines the desired state of DiscoveredCluster", "properties": { "activityTimestamp": { "format": "date-time", "type": "string" }, "apiUrl": { "type": "string" }, "cloudProvider": { "type": "string" }, "console": { "type": "string" }, "creationTimestamp": { "format": "date-time", "type": "string" }, "credential": { "description": "ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, \"must refer only to types A and B\" or \"UID not honored\" or \"name must be restricted\". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .", "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" }, "displayName": { "type": "string" }, "isManagedCluster": { "type": "boolean" }, "name": { "type": "string" }, "openshiftVersion": { "type": "string" }, "status": { "type": "string" }, "type": { "type": "string" } }, "required": [ "apiUrl", "displayName", "isManagedCluster", "name", "type" ], "type": "object" }, "status": { "description": "DiscoveredClusterStatus defines the observed state of DiscoveredCluster", "type": "object" } }, "type": "object" } }, "served": true, "storage": true, "subresources": { "status": {} } } ] }, "status": { "acceptedNames": { "kind": "", "plural": "" }, "conditions": [], "storedVersions": [] } } GET /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator DELETE /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator/{discoveredclusters_name} GET /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/addondeploymentconfigs POST /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/addondeploymentconfigs { "apiVersion": "addon.open-cluster-management.io/v1alpha1", "kind": "AddOnDeploymentConfig", "metadata": { "name": "deploy-config", "namespace": "open-cluster-management-hub" }, "spec": { "nodePlacement": { "nodeSelector": { "node-dedicated": "acm-addon" }, "tolerations": [ { "effect": "NoSchedule", "key": "node-dedicated", "operator": "Equal", "value": "acm-addon" } ] } } } GET /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/addondeploymentconfigs/{addondeploymentconfig_name} DELETE /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/addondeploymentconfigs/{addondeploymentconfig_name} GET /addon.open-cluster-management.io/v1alpha1/clustermanagementaddons POST /addon.open-cluster-management.io/v1alpha1/clustermanagementaddons { "apiVersion": "addon.open-cluster-management.io/v1alpha1", "kind": "ClusterManagementAddOn", "metadata": { "name": "helloworld" }, "spec": { "supportedConfigs": [ { "defaultConfig": { "name": "deploy-config", "namespace": "open-cluster-management-hub" }, "group": "addon.open-cluster-management.io", "resource": "addondeploymentconfigs" } ] }, "status" : { } } GET /addon.open-cluster-management.io/v1alpha1/clustermanagementaddons/{clustermanagementaddon_name} DELETE /addon.open-cluster-management.io/v1alpha1/clustermanagementaddons/{clustermanagementaddon_name} GET /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/managedclusteraddons POST /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/managedclusteraddons { "apiVersion": "addon.open-cluster-management.io/v1alpha1", "kind": "ManagedClusterAddOn", "metadata": { "name": "helloworld", "namespace": "cluster1" }, "spec": { "configs": [ { "group": "addon.open-cluster-management.io", "name": "cluster-deploy-config", "namespace": "open-cluster-management-hub", "resource": "addondeploymentconfigs" } ], "installNamespace": "default" }, "status" : { } } GET /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/managedclusteraddons/{managedclusteraddon_name} DELETE /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/managedclusteraddons/{managedclusteraddon_name} GET /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersets POST /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersets { "apiVersion" : "cluster.open-cluster-management.io/v1beta2", "kind" : "ManagedClusterSet", "metadata" : { "name" : "example-clusterset", }, "spec": { }, "status" : { } } GET /cluster.open-cluster-management.io/v1beta2/namespaces/{namespace}/managedclustersets/{managedclusterset_name} DELETE /cluster.open-cluster-management.io/v1beta2/managedclustersets/{managedclusterset_name} GET /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs POST /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs { "apiVersion": "apiextensions.k8s.io/v1", "kind": "CustomResourceDefinition", "metadata": { "annotations": { "controller-gen.kubebuilder.io/version": "v0.7.0" }, "creationTimestamp": null, "name": "klusterletconfigs.config.open-cluster-management.io" }, "spec": { "group": "config.open-cluster-management.io", "names": { "kind": "KlusterletConfig", "listKind": "KlusterletConfigList", "plural": "klusterletconfigs", "singular": "klusterletconfig" }, "preserveUnknownFields": false, "scope": "Cluster", "versions": [ { "name": "v1alpha1", "schema": { "openAPIV3Schema": { "description": "KlusterletConfig contains the configuration of a klusterlet including the upgrade strategy, config overrides, proxy configurations etc.", "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 desired state of KlusterletConfig", "properties": { "hubKubeAPIServerProxyConfig": { "description": "HubKubeAPIServerProxyConfig holds proxy settings for connections between klusterlet/add-on agents on the managed cluster and the kube-apiserver on the hub cluster. Empty means no proxy settings is available.", "properties": { "caBundle": { "description": "CABundle is a CA certificate bundle to verify the proxy server. It will be ignored if only HTTPProxy is set; And it is required when HTTPSProxy is set and self signed CA certificate is used by the proxy server.", "format": "byte", "type": "string" }, "httpProxy": { "description": "HTTPProxy is the URL of the proxy for HTTP requests", "type": "string" }, "httpsProxy": { "description": "HTTPSProxy is the URL of the proxy for HTTPS requests HTTPSProxy will be chosen if both HTTPProxy and HTTPSProxy are set.", "type": "string" } }, "type": "object" }, "nodePlacement": { "description": "NodePlacement enables explicit control over the scheduling of the agent components. If the placement is nil, the placement is not specified, it will be omitted. If the placement is an empty object, the placement will match all nodes and tolerate nothing.", "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 is attached by pods to tolerate any taint that matches the triple <key,value,effect> using the matching operator <operator>. The default is an empty list.", "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" }, "pullSecret": { "description": "PullSecret is the name of image pull secret.", "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" }, "registries": { "description": "Registries includes the mirror and source registries. The source registry will be replaced by the Mirror.", "items": { "properties": { "mirror": { "description": "Mirror is the mirrored registry of the Source. Will be ignored if Mirror is empty.", "type": "string" }, "source": { "description": "Source is the source registry. All image registries will be replaced by Mirror if Source is empty.", "type": "string" } }, "required": [ "mirror" ], "type": "object" }, "type": "array" } }, "type": "object" }, "status": { "description": "Status defines the observed state of KlusterletConfig", "type": "object" } }, "type": "object" } }, "served": true, "storage": true, "subresources": { "status": {} } } ] }, "status": { "acceptedNames": { "kind": "", "plural": "" }, "conditions": [], "storedVersions": [] } } GET /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs/{klusterletconfig_name} DELETE /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs/{klusterletconfig_name} { "data": [ { "id": 2, "cluster": { "name": "cluster1", "cluster_id": "215ce184-8dee-4cab-b99b-1f8f29dff611" }, "parent_policy": { "id": 3, "name": "configure-custom-app", "namespace": "policies", "catageories": ["CM Configuration Management"], "controls": ["CM-2 Baseline Configuration"], "standards": ["NIST SP 800-53"] }, "policy": { "apiGroup": "policy.open-cluster-management.io", "id": 2, "kind": "ConfigurationPolicy", "name": "configure-custom-app", "namespace": "", // Only shown with `?include_spec` "spec": {} }, "event": { "compliance": "NonCompliant", "message": "configmaps [app-data] not found in namespace default", "timestamp": "2023-07-19T18:25:43.511Z", "metadata": {} } }, { "id": 1, "cluster": { "name": "cluster2", "cluster_id": "415ce234-8dee-4cab-b99b-1f8f29dff461" }, "parent_policy": { "id": 3, "name": "configure-custom-app", "namespace": "policies", "catageories": ["CM Configuration Management"], "controls": ["CM-2 Baseline Configuration"], "standards": ["NIST SP 800-53"] }, "policy": { "apiGroup": "policy.open-cluster-management.io", "id": 4, "kind": "ConfigurationPolicy", "name": "configure-custom-app", "namespace": "", // Only shown with `?include_spec` "spec": {} }, "event": { "compliance": "Compliant", "message": "configmaps [app-data] found as specified in namespace default", "timestamp": "2023-07-19T18:25:41.523Z", "metadata": {} } } ], "metadata": { "page": 1, "pages": 7, "per_page": 20, "total": 123 } } { "id": 1, "cluster": { "name": "cluster2", "cluster_id": "415ce234-8dee-4cab-b99b-1f8f29dff461" }, "parent_policy": { "id": 2, "name": "etcd-encryption", "namespace": "policies", "catageories": ["CM Configuration Management"], "controls": ["CM-2 Baseline Configuration"], "standards": ["NIST SP 800-53"] }, "policy": { "apiGroup": "policy.open-cluster-management.io", "id": 4, "kind": "ConfigurationPolicy", "name": "etcd-encryption", "namespace": "", "spec": {} }, "event": { "compliance": "Compliant", "message": "configmaps [app-data] found as specified in namespace default", "timestamp": "2023-07-19T18:25:41.523Z", "metadata": {} } } whoami --show-token apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: local-cluster-view rules: - apiGroups: - cluster.open-cluster-management.io resources: - managedclusters resourceNames: - local-cluster verbs: - get auth can-i get managedclusters.cluster.open-cluster-management.io/local-cluster