Access Management Resource#
k0rdent provides an AccessManagement resource (cluster-scoped, singleton) that enables controlled distribution of multiple object types (ClusterTemplate, ServiceTemplate, Credential, and ClusterAuthentication) from the system namespace (default: kcm-system) across other namespaces in the management cluster. This resource is created automatically during the installation of k0rdent.
Supported Configuration Options#
This section describes the fields available in AccessManagement.spec and how they control object distribution.
The AccessManagement resource has a number of parameters you can adjust.
spec.accessRules– A list of access rules that define how specific objects are distributed.
Each access rule supports the following fields:
Namespace Selection#
targetNamespaces– Determines which namespaces selected objects are distributed to. If omitted, objects are distributed to all namespaces.
You may specify only one of the following mutually exclusive selectors:
targetNamespaces.stringSelector– A label query to select namespaces (type:string).targetNamespaces.selector– A structured label query to select namespaces (type:metav1.LabelSelector).targetNamespaces.list– A list of namespaces to select (type:[]string).
Distributed Object Types#
-
clusterTemplateChains– The list ofClusterTemplateChainnames whoseClusterTemplatesare distributed to the selected namespaces. -
serviceTemplateChains– The list ofServiceTemplateChainnames whoseServiceTemplatesare distributed to the selected namespaces. -
credentials– The list ofCredentialnames that are distributed to the selected namespaces. -
clusterAuthentications– The list ofClusterAuthenticationnames that are distributed to the selected namespaces.
Example#
apiVersion: k0rdent.mirantis.com/v1beta1
kind: AccessManagement
metadata:
labels:
k0rdent.mirantis.com/component: kcm
name: kcm
spec:
accessRules:
- targetNamespaces:
list:
- namespace1
- namespace2
clusterTemplateChains:
- ct-chain1
serviceTemplateChains:
- st-chain1
credentials:
- cred1
- targetNamespaces:
list:
- namespace3
clusterAuthentications:
- auth1
Based on the configuration above, the following objects are distributed:
- All
ClusterTemplatesreferenced by theClusterTemplateChainct-chain1are distributed tonamespace1andnamespace2. - All
ServiceTemplatesreferenced by theServiceTemplateChainst-chain1are distributed tonamespace1andnamespace2. - The
Credentialcred1and all referencedIdentityresources (used for authentication) are distributed tonamespace1andnamespace2. - The
ClusterAuthenticationauth1and its referenced CA secret are distributed tonamespace3.
For more details, see: