Skip to content

Commit b859aff

Browse files
committed
feat: add netlify book configuration
1 parent f94a5cb commit b859aff

22 files changed

+1242
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Kubernetes-Secrets-Store-CSI-Driver
1+
# Kubernetes Secrets Store CSI Driver
22

33
[![Build status](https://prow.k8s.io/badge.svg?jobs=secrets-store-csi-driver-e2e-vault-postsubmit)](https://testgrid.k8s.io/sig-auth-secrets-store-csi-driver#secrets-store-csi-driver-e2e-vault-postsubmit)
44
![GitHub release (latest by date)](https://img.shields.io/github/v/release/kubernetes-sigs/secrets-store-csi-driver)
@@ -28,7 +28,7 @@ Join us to help define the direction and implementation of this project!
2828

2929
#### Table of Contents
3030

31-
- [Kubernetes-Secrets-Store-CSI-Driver](#kubernetes-secrets-store-csi-driver)
31+
- [Kubernetes Secrets Store CSI Driver](#kubernetes-secrets-store-csi-driver)
3232
- [Want to help?](#want-to-help)
3333
- [Features](#features)
3434
- [Table of Contents](#table-of-contents)

docs/book/Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2020 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Directories.
16+
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
17+
TOOLS_DIR := ../../hack/tools
18+
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
19+
BIN_DIR := bin
20+
21+
# Binaries.
22+
TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
23+
$(TABULATE): $(TOOLS_DIR)/go.mod
24+
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-tabulate ./mdbook/tabulate
25+
26+
EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
27+
$(EMBED): $(TOOLS_DIR)/go.mod
28+
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-embed ./mdbook/embed
29+
30+
RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
31+
$(RELEASELINK): $(TOOLS_DIR)/go.mod
32+
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-releaselink ./mdbook/releaselink
33+
34+
.PHONY: serve
35+
serve:
36+
mdbook serve

docs/book/OWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See the OWNERS docs at https://go.k8s.io/owners
2+
3+
reviewers:
4+
- aramase
5+
- ritazh

docs/book/book.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[book]
2+
authors = ["The Secrets Store CSI Driver Maintainers"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "The Secrets Store CSI Driver Book"
7+
8+
[output.html]
9+
curly-quotes = true
10+
git-repository-url = "https://sigs.k8s.io/secrets-store-csi-driver"
11+
12+
[preprocessor.tabulate]
13+
command = "./util-tabulate.sh"
14+
15+
[preprocessor.embed]
16+
command = "./util-embed.sh"
17+
18+
[preprocessor.releaselink]
19+
command = "./util-releaselink.sh"

docs/book/install-and-build.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
# Copyright 2020 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o nounset
19+
set -o pipefail
20+
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
22+
cd "${KUBE_ROOT}" || exit 1
23+
24+
os=$(go env GOOS)
25+
arch=$(go env GOARCH)
26+
mdBookVersion="v0.4.3"
27+
28+
# translate arch to rust's conventions (if we can)
29+
if [[ ${arch} == "amd64" ]]; then
30+
arch="x86_64"
31+
elif [[ ${arch} == "x86" ]]; then
32+
arch="i686"
33+
fi
34+
35+
# translate os to rust's conventions (if we can)
36+
ext="tar.gz"
37+
cmd="tar -C /tmp -xzvf"
38+
case ${os} in
39+
windows)
40+
target="pc-windows-msvc"
41+
ext="zip"
42+
cmd="unzip -d /tmp"
43+
;;
44+
darwin)
45+
target="apple-darwin"
46+
;;
47+
linux)
48+
# works for linux, too
49+
target="unknown-${os}-gnu"
50+
;;
51+
*)
52+
target="unknown-${os}"
53+
;;
54+
esac
55+
56+
# grab mdbook
57+
# we hardcode linux/amd64 since rust uses a different naming scheme
58+
echo "downloading mdBook-${mdBookVersion}-${arch}-${target}.${ext}"
59+
set -x
60+
curl -sL -o /tmp/mdbook.${ext} "https://github.com/rust-lang-nursery/mdBook/releases/download/${mdBookVersion}/mdBook-${mdBookVersion}-${arch}-${target}.${ext}"
61+
${cmd} /tmp/mdbook.${ext}
62+
chmod +x /tmp/mdbook
63+
64+
# Finally build the book.
65+
(cd docs/book && /tmp/mdbook build)

docs/book/src/SUMMARY.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Summary
2+
3+
[Introduction](./introduction.md)
4+
[Usage](./usage.md)
5+
- [Topics](./topics/topics.md)
6+
- [New Provider](./topics/new-provider.md)
7+
- [Secret Auto Rotation](./topics/rotation.md)
8+
- [Metrics](./topics/metrics.md)
9+
- [Providers](./providers.md)
10+
- [Testing](./testing.md)
11+
- [Known Limitations](./known-limitations.md)]

docs/book/src/introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#include ../../../README.md}}

docs/book/src/known-limitations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Known Limitations
2+
3+
This document highlights the current limitations when using secrets-store-csi-driver.
4+
5+
## Mounted content and Kubernetes Secret not updated after secret is updated in external secrets-store
6+
7+
When the secret/key is updated in external secrets store after the inital pod deployment, the updated secret is not automatically reflected in the pod mount or the Kubernetes secret.
8+
9+
This feature is planned for release `v0.0.15+`. See [design doc](https://docs.google.com/document/d/1RGT0vmeUnN71n_u5fZKsSCa2YQpGw99rfGN9RlFMgHs/edit?usp=sharing) for more details.
10+
11+
### How to fetch the latest content with release `v0.0.14` and earlier?
12+
13+
1. If the `SecretProviderClass` has `secretObjects` defined, then delete the Kubernetes secret.
14+
2. Restart the application pod.
15+
16+
When the pod is recreated, `kubelet` invokes the CSI driver for mounting the volume. As part of this mount request, the latest content will be fetched from external secrets store and populated in the pod. The same content is then mirrored in the Kubenetes secret data.

docs/book/src/providers.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Providers
2+
3+
This project features a pluggable provider interface developers can implement that defines the actions of the Secrets Store CSI driver. This enables retrieval of sensitive objects stored in an enterprise-grade external secrets store into Kubernetes while continue to manage these objects outside of Kubernetes.
4+
5+
## Criteria for Supported Providers
6+
7+
Here is a list of criteria for supported provider:
8+
1. Code audit of the provider implementation to ensure it adheres to the required provider-driver interface - [Implementing a Provider for Secrets Store CSI Driver](docs/README.new-provider.md)
9+
2. Add provider to the e2e test suite to demonstrate it functions as expected https://github.com/kubernetes-sigs/secrets-store-csi-driver/tree/master/test/bats Please use existing providers e2e tests as a reference.
10+
3. If any update is made by a provider (not limited to security updates), the provider is expected to update the provider's e2e test in this repo
11+
12+
## Removal from Supported Providers
13+
14+
Failure to adhere to the [Criteria for Supported Providers](#criteria-for-supported-providers) will result in the removal of the provider from the supported list and subject to another review before it can be added back to the list of supported providers.
15+
16+
When a provider's e2e tests are consistently failing with the latest version of the driver, the driver maintainers will coordinate with the provider maintainers to provide a fix. If the test failures are not resolved within 4 weeks, then the provider will be removed from the list of supported providers.

docs/book/src/testing.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Testing
2+
3+
## Unit Tests
4+
5+
Run unit tests locally with `make test`.
6+
7+
## End-to-end Tests
8+
9+
End-to-end tests automatically runs on Prow when a PR is submitted. If you want to run using a local or remote Kubernetes cluster, make sure to have `kubectl`, `helm` and `bats` set up in your local environment and then run `make e2e-azure` or `make e2e-vault` with custom images.
10+
11+
Job config for test jobs run for each PR in prow can be found [here](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/secrets-store-csi-driver/secrets-store-csi-driver-config.yaml)
12+
13+

0 commit comments

Comments
 (0)