diff --git a/docs/pages/includes/machine-id/bot-spec.mdx b/docs/pages/includes/machine-id/bot-spec.mdx new file mode 100644 index 0000000000000..a41b77190773b --- /dev/null +++ b/docs/pages/includes/machine-id/bot-spec.mdx @@ -0,0 +1,19 @@ +```yaml +kind: bot +version: v1 +metadata: + # name is a unique identifier for the bot in the cluster. + name: robot +spec: + # roles is a list of roles that the bot should be able to generate credentials + # for. + roles: + - editor + # traits controls the traits applied to the Bot user. These are fed into the + # role templating system and can be used to grant a specific Bot access to + # specific resources without the creation of a new role. + traits: + - name: logins + values: + - root +``` diff --git a/docs/pages/machine-id/reference/configuration.mdx b/docs/pages/machine-id/reference/configuration.mdx index fbb47ab9bba21..32d306ffbefed 100644 --- a/docs/pages/machine-id/reference/configuration.mdx +++ b/docs/pages/machine-id/reference/configuration.mdx @@ -388,3 +388,13 @@ type: kubernetes_secret # This must be in the same namespace that `tbot` is running in. name: my-secret ``` + +## Bot resource + +The `bot` resource is used to manage Machine ID Bots. It is used to configure +the access that is granted to a Bot. + +(!docs/pages/includes/machine-id/bot-spec.mdx!) + +You can apply a file containing YAML that defines a `bot` resource using +`tctl apply -f ./bot.yaml`. \ No newline at end of file diff --git a/docs/pages/reference/resources.mdx b/docs/pages/reference/resources.mdx index 7d70e29f13d9b..1ebe0b4af9f8a 100644 --- a/docs/pages/reference/resources.mdx +++ b/docs/pages/reference/resources.mdx @@ -252,3 +252,12 @@ spec: version: v2 ``` + +## Bot + +Bot resources define a Machine ID Bot identity and its access. + +Find out more on the +[Machine ID configuration reference](../machine-id/reference/configuration.mdx). + +(!docs/pages/includes/machine-id/bot-spec.mdx!)