Skip to content

Commit

Permalink
feat: including option to scope manager to namespace (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
janiskemper authored Sep 24, 2021
1 parent 94f9ca8 commit af9ca5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ Usage example: `./manager [--global-flags] mode [--mode-flags]`
| :--- | :--- | :---: |
| **rulesFilePath** | Path to the file with converted Oathkeeper rules | `/etc/config/access-rules.json` |

### Environment variables

| Name | Description | Default values |
| :--- | :--- | :---: |
| **NAMESPACE** | Namespace option to scope Oathkeeper maester to one namespace only - useful for running several instances in one cluster. Defaults to "" which means that there is no namespace scope. | `` |

2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func main() {
Scheme: scheme,
MetricsBindAddress: metricsAddr,
LeaderElection: enableLeaderElection,
// Defaults to "" which means all namespaces
Namespace: os.Getenv("NAMESPACE"),
})
if err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down

0 comments on commit af9ca5a

Please sign in to comment.