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#
The AccessManagement has a numver of parameters you can adjust.
spec.accessRules- A list of access rules that define how specific objects should be distributed.
Each access rule supports the following fields:
-
targetNamespaces- Determines which namespaces selected objects should be distributed to. If omitted, objects are distributed to all namespaces.You may customize this field, but you may use 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- The list of namespaces to select (type:[]string).
-
clusterTemplateChains- The list ofClusterTemplateChainnames whoseClusterTemplateswill be distributed to all namespaces specified intargetNamespaces. -
serviceTemplateChains- The list ofServiceTemplateChainnames whoseServiceTemplateswill be distributed to all namespaces specified intargetNamespaces. -
credentials- The list ofCredentialnames that will be distributed to all the namespaces specified intargetNamespaces. -
clusterAuthentications- The list ofClusterAuthenticationnames that will be distributed to all the namespaces specified intargetNamespaces.
Consider this 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
For the example above the following objects will be distributed following these rules:
- All
ClusterTemplatesreferenced byClusterTemplateChainct-chain1are distributed tonamespace1andnamespace2. - All
ServiceTemplatesreferenced byServiceTemplateChainst-chain1are distributed tonamespace1andnamespace2. - The
Credentialcred1and all referencedIdentityresources are distributed tonamespace1andnamespace2. - The
ClusterAuthenticationauth1and its referenced CA secret are distributed tonamespace3.
See Credential Distribution System
and Template Life Cycle Management for more details
about distributing Credential, ClusterTemplate and ServiceTemplate objects.