Skip to content

Commit

Permalink
Remove TOC as it doesn't render well with mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulKyu committed May 28, 2024
1 parent 9de4cb5 commit 1c18ffb
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 144 deletions.
20 changes: 0 additions & 20 deletions docs/getting-started/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
# getting-started
<!-- vscode-markdown-toc -->
* 1. [Requirements](#Requirements)
* 2. [Vocabulary](#Vocabulary)
* 3. [Vault Configuration](#VaultConfiguration)
* 3.1. [Create `all-rw` vault-policy](#Createall-rwvault-policy)
* 3.2. [Create `K/V Vault`](#CreateKVVault)
* 3.3. [Create `vault databases mount`](#Createvaultdatabasesmount)
* 3.4. [Create `vault databases backend connection`](#Createvaultdatabasesbackendconnection)
* 3.5. [Create a `kubernetes auth backend`](#Createakubernetesauthbackend)
* 3.6. [Create a `kubernetes auth backend role`](#Createakubernetesauthbackendrole)
* 3.7. [Create `vault databases backend role`](#Createvaultdatabasesbackendrole)
* 4. [`Database` configuration](#Databaseconfiguration)
* 5. [Deploy the vault db injector](#Deploythevaultdbinjector)
* 6. [Deploy an example application :](#Deployanexampleapplication:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

## 1. <a name='Requirements'></a>Requirements

Expand Down
17 changes: 3 additions & 14 deletions docs/how-it-works/configuration.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
# Configuration
<!-- vscode-markdown-toc -->
* 1. [Configuration](#Configuration)
* 1.1. [Mode Injector](#ModeInjector)
* 1.2. [Mode token-renewer](#Modetoken-renewer)
* 1.3. [Mode token-renewer](#Modetoken-renewer-1)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

Here is the configuration for Vault Injector:

#### 1.1. <a name='ModeInjector'></a>Mode Injector
# 1 <a name='ModeInjector'></a>Mode Injector
The Injector mode is basic one that will handle all api-server request and handle all requests to vault to generate credentials to our DB
The config file path can be parse by adding the path with : `- "--config=/injector/config.yaml"`
```yaml
Expand All @@ -33,7 +22,7 @@ injectorLabel: vault-db-injector
defaultEngine: databases
```
#### 1.2. <a name='Modetoken-renewer'></a>Mode token-renewer
# 1 <a name='Modetoken-renewer'></a>Mode token-renewer
The Renewer one is a process that will run every hour and validate that all orphan token won't expire before pod is deleted
The config file path can be parse by adding the path with : `- "--config=/renewer/config.yaml"`
```yaml
Expand All @@ -52,7 +41,7 @@ injectorLabel: vault-db-injector
defaultEngine: databases
```

#### 1.3. <a name='Modetoken-renewer-1'></a>Mode token-renewer
# 1 <a name='Modetoken-renewer-1'></a>Mode token-renewer
The Revoker one is a process that is going to watch pod deletion Kubernetes events filtered with the label `vault-db-injector: true` and will revoke token attached to the pod when it is deleted
The config file path can be parse by adding the path with : `- "--config=/revoker/config.yaml"`
```yaml
Expand Down
10 changes: 0 additions & 10 deletions docs/how-it-works/healthcheck.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# Health Checks
<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key File:** `pkg/healthcheck/healthcheck.go`

Expand Down
20 changes: 1 addition & 19 deletions docs/how-it-works/how-it-work.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
# How it Work

<!-- vscode-markdown-toc -->
* 1. [Vault-Injector](#Vault-Injector)
* 1.1. [Mechanism](#Mechanism)
* 1.1.1. [Vault Injector:](#VaultInjector:)
* 1.2. [Diagram](#Diagram)
* 1.3. [Vault Usage](#VaultUsage)
* 1.4. [Authentication](#Authentication)
* 1.5. [How token are handled ?](#Howtokenarehandled)
* 1.6. [How does injector work then ?](#Howdoesinjectorworkthen)
* 1.7. [Usage :](#Usage:)
* 1.7.1. [In mode classic](#Inmodeclassic)
* 1.7.2. [In mode URI](#InmodeURI)
* 1.7.3. [With multiple databases](#Withmultipledatabases)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->## 1. <a name='Vault-Injector'></a>Vault-Injector
## 1. <a name='Vault-Injector'></a>Vault-Injector

The Vault DB Injector is a Go program that is design to retrieve databases credentials from Hashicorp Vault, it use Kubernetes Mutating Webhook to intercept pod creation activated with a label and configured with annotations.
After the credentials are provided, it will store them in a specific Vault KV and will handle the lifecycle of them such as :
Expand Down
10 changes: 0 additions & 10 deletions docs/how-it-works/injector.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# Injector

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key File:** `pkg/injector/injector.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
12 changes: 0 additions & 12 deletions docs/how-it-works/kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Kubernetes Integration

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)
* 3.1. [Annotations :](#Annotations:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key Files:** `pkg/k8s/connect.go`, `pkg/k8s/pod_utils.go`, `pkg/k8s/parse_annotations.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
11 changes: 0 additions & 11 deletions docs/how-it-works/leaderelection.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Leader Election

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key File:** `pkg/leadership/leadership.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
11 changes: 0 additions & 11 deletions docs/how-it-works/renewer.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Renewer

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key File:** `pkg/renewer/renewer.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
11 changes: 0 additions & 11 deletions docs/how-it-works/revoker.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Revoker

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key File:** `pkg/revoker/revoker.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
11 changes: 0 additions & 11 deletions docs/how-it-works/vault.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Vault Integration

<!-- vscode-markdown-toc -->
* 1. [How It Works:](#HowItWorks:)
* 2. [Key Responsibilities:](#KeyResponsibilities:)
* 3. [Benefits:](#Benefits:)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

**Key Files:** `pkg/vault/handle_token.go`, `pkg/vault/vault.go`

## 1. <a name='HowItWorks:'></a>How It Works:
Expand Down
15 changes: 0 additions & 15 deletions docs/monitoring/alertmanager.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# Alertmanager Configuration for VaultDb Injector

<!-- vscode-markdown-toc -->
* 1. [Alerts Configuration](#AlertsConfiguration)
* 1.1. [Service Account Denied](#ServiceAccountDenied)
* 1.2. [Token Renewal Failure](#TokenRenewalFailure)
* 1.3. [Lease Renewal Failure](#LeaseRenewalFailure)
* 1.4. [Token Expiration Warnings](#TokenExpirationWarnings)
* 1.5. [Lease Expiration Warnings](#LeaseExpirationWarnings)
* 2. [Conclusion](#Conclusion)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->

This configuration defines a set of alerts for monitoring the VaultDb Injector within a Kubernetes environment. Each alert is designed to notify the team of potential issues that could impact the availability, security, or functionality of the services relying on Vault for secret management.

## 1. <a name='AlertsConfiguration'></a>Alerts Configuration
Expand Down

0 comments on commit 1c18ffb

Please sign in to comment.