Skip to content

Commit

Permalink
Added Documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Oct 22, 2024
1 parent 5a714c3 commit 9f7bb32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func NewCRDManager(crdPlugin *ast.ObjectItem) (spirecrd.CRDManager, error) {
return nil, errors.Errorf("Couldn't parse SPIREControllerManager config: %v", err)
}

fmt.Println("CRD Controller configured. WARNING: This is currently a no-op")
fmt.Println("CRD Controller configured. spire-controller-manager APIs enabled")

crdManager, err := spirecrd.NewSPIRECRDManager(config.Classname)
if err != nil {
Expand Down
9 changes: 8 additions & 1 deletion docs/plugin_server_spirecrd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Server plugin: SPIRECRDManager

Note the SPIRECRDManager is an optional plugin. This plugin enables the creation of SPIRE CRDs on the cluster Tornjak is deployed on.
Note the SPIRECRDManager is an optional plugin. This plugin enables the creation of SPIRE CRDs on the cluster Tornjak is deployed on. It enables the following API calls:

- `GET /api/v1/spire-controller-manager/clusterfederatedtrustdomains`

> [!IMPORTANT]

Check failure on line 7 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:7:15 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 7 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:7:15 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
> This plugin requires

Check failure on line 8 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:8:23 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 8 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:8:23 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
> 1. That Tornjak is deployed in the same cluster as the relevant CRDs as it uses its own service account token to talk to the kube API server.

Check failure on line 9 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:9:144 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 9 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Lists should be surrounded by blank lines

docs/plugin_server_spirecrd.md:9 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "> 1. That Tornjak is deployed ..."] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md032.md

Check failure on line 9 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:9:144 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 9 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Lists should be surrounded by blank lines

docs/plugin_server_spirecrd.md:9 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "> 1. That Tornjak is deployed ..."] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md032.md
> 2. That the proper permissions are given to the Service Account token that Tornjak will use. Current Helm charts deploy SPIRE Controller manager and Tornjak in the same pod as the SPIRE server, so no extra configuration is necessary if deployed this way.

Check failure on line 10 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:10:257 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md

Check failure on line 10 in docs/plugin_server_spirecrd.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces

docs/plugin_server_spirecrd.md:10:257 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md009.md
The configuration has the following key-value pairs:

Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/spirecrd/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// CRDManager defines the interface for managing CRDs
type CRDManager interface {
// TODO add List/Create/Update/Delete functions for Federation CRD
// TODO add Create/Update/Delete functions for Federation CRD
// ListClusterFederatedTrustDomain has the same signature as spire api
ListClusterFederatedTrustDomains(ListFederationRelationshipsRequest) (ListFederationRelationshipsResponse, error)
}
Expand Down

0 comments on commit 9f7bb32

Please sign in to comment.