-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore and update the configuration doc (#455)
* Create configuration.md
- Loading branch information
Showing
1 changed file
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
|
||
# Configuring Infra | ||
|
||
* [Overview](#overview) | ||
* [Create a configuration file](#create-a-configuration-file) | ||
* [Full Example](#full-example) | ||
* [Reference](#reference) | ||
* [`sources`](#sources) | ||
* [`groups`](#groups) | ||
* [`users`](#users) | ||
* [`roles`](#roles) | ||
* [`destinations`](#destinations) | ||
|
||
## Overview | ||
|
||
For teams who require configuration to be stored in version control, Infra can be managed via a configuration file, `infra.yaml`. | ||
|
||
## Create a configuration file | ||
|
||
First, create a config file `infra.yaml`: | ||
|
||
``` | ||
sources: | ||
- type: okta | ||
domain: acme.okta.com | ||
clientId: 0oapn0qwiQPiMIyR35d6 | ||
clientSecret: infra-registry-okta/clientSecret | ||
apiToken: infra-registry-okta/apiToken | ||
groups: | ||
- name: administrators | ||
source: okta | ||
roles: | ||
- name: cluster-admin | ||
kind: cluster-role | ||
destinations: | ||
- name: my-first-destination | ||
``` | ||
|
||
Then, apply it to the Infra Registry: | ||
|
||
``` | ||
helm upgrade infra-registry infrahq/registry -n infrahq --set-file config=./infra.yaml | ||
``` | ||
|
||
## Full Example | ||
|
||
```yaml | ||
sources: | ||
- type: okta | ||
domain: acme.okta.com | ||
clientId: 0oapn0qwiQPiMIyR35d6 | ||
clientSecret: infra-registry-okta/clientSecret | ||
apiToken: infra-registry-okta/apiToken | ||
|
||
groups: | ||
- name: administrators | ||
source: okta | ||
roles: | ||
- name: cluster-admin | ||
kind: cluster-role | ||
destinations: | ||
- name: my-first-destination | ||
|
||
users: | ||
- email: manager@example.com | ||
roles: | ||
- name: view | ||
kind: cluster-role | ||
destinations: | ||
- name: my-first-destination | ||
namespaces: | ||
- infrahq | ||
- development | ||
- name: cluster-BBB | ||
- email: developer@example.com | ||
roles: | ||
- name: writer | ||
kind: role | ||
destinations: | ||
- name: my-first-destination | ||
namespaces: | ||
- development | ||
``` | ||
## Reference | ||
### `sources` | ||
|
||
A list of sources to sync and authenticate users from | ||
|
||
### `groups` | ||
|
||
A list of groups from identity providers for which to specify roles | ||
|
||
### `users` | ||
|
||
A list of users from identity providers for which to specify roles | ||
|
||
### `roles` | ||
|
||
`roles` is a list of role mappings to Kubernetes roles | ||
|
||
### `destinations` | ||
|
||
A list of Kubernetes clusters a role mapping applies to |