Skip to content

Commit d2d53ec

Browse files
feat: Adds github action for linktesting (#121)
* Adds configfile for htmltest Signed-off-by: Robert Fekete <fekete77.robert@gmail.com> Signed-off-by: Bence Csati <bcsati@cisco.com> * Adds github action for linktesting Signed-off-by: Robert Fekete <fekete77.robert@gmail.com> Signed-off-by: Bence Csati <bcsati@cisco.com> * Disable concurrent testing to avoid github rate limiting Signed-off-by: Robert Fekete <fekete77.robert@gmail.com> Signed-off-by: Bence Csati <bcsati@cisco.com> * Htmltest config updates Signed-off-by: Bence Csati <bcsati@cisco.com> * Fixes some links Signed-off-by: Bence Csati <bcsati@cisco.com> * Comment out techblog links that are temporarily not working Signed-off-by: Robert Fekete <fekete77.robert@gmail.com> Signed-off-by: Bence Csati <bcsati@cisco.com> * chore: move linktest action to ci Signed-off-by: Bence Csati <bcsati@cisco.com> * fix: htmltest Signed-off-by: Bence Csati <bcsati@cisco.com> * fix: localhost address Signed-off-by: Bence Csati <bcsati@cisco.com> --------- Signed-off-by: Robert Fekete <fekete77.robert@gmail.com> Signed-off-by: Bence Csati <bcsati@cisco.com> Co-authored-by: Bence Csati <bcsati@cisco.com>
1 parent 753c2ec commit d2d53ec

File tree

10 files changed

+76
-15
lines changed

10 files changed

+76
-15
lines changed

.github/workflows/ci.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,50 @@ jobs:
4343

4444
- name: Build
4545
run: hugo
46+
47+
test:
48+
name: Link check with htmltest
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
54+
with:
55+
submodules: 'recursive'
56+
57+
- name: Set up Hugo
58+
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0
59+
with:
60+
hugo-version: '0.110.0'
61+
extended: true
62+
63+
- name: Set up Node
64+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
65+
with:
66+
node-version: 16
67+
68+
- name: Install dependencies
69+
run: |
70+
cd themes/docsy
71+
npm install
72+
73+
- name: Set up PostCSS
74+
run: npm install --save-dev autoprefixer postcss-cli postcss
75+
76+
- name: Build
77+
run: hugo
78+
79+
- name: Test HTML
80+
# https://github.com/wjdp/htmltest-action/
81+
continue-on-error: false # <- Set to true if run shouldn't fail with broken links
82+
uses: wjdp/htmltest-action@master
83+
with:
84+
config: .htmltest.yml
85+
path: public
86+
87+
- name: Archive htmltest results
88+
uses: actions/upload-artifact@v3
89+
with:
90+
name: htmltest-report
91+
path: tmp/.htmltest/htmltest.log
92+
retention-days: 7 # default is 90 days

.htmltest.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
DirectoryPath: public
2+
CheckDoctype: true
3+
IgnoreAltMissing: false
4+
IgnoreDirectoryMissingTrailingSlash: true
5+
IgnoreDirs: [_print]
6+
IgnoreEmptyHref: false
7+
IgnoreInternalEmptyHash: true
8+
IgnoreURLs:
9+
- ^https?://localhost\b
10+
- ^https://github\.com/bank-vaults/bank-vaults\.dev/commit/
11+
- ^https://github\.com/orgs/bank-vaults/projects/
12+
- ^https://www.nitrokey.com/
13+
TestFilesConcurrently: false

content/docs/installing/_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ weight: 10
44
---
55

66
Bank-Vaults is a swiss-army knife with multiple manifestations, so the first steps depend on what you want to achieve.
7-
Check one of the following guides to get an overview:
7+
<!-- Check one of the following guides to get an overview:
88
99
- [Dynamic credentials with Vault using Kubernetes Service Accounts](https://techblog.cisco.com/vault-dynamic-secrets/)
1010
- [Vault Operator](https://techblog.cisco.com/vault-operator/)
1111
- [Vault unseal flow with KMS](https://techblog.cisco.com/vault-unsealing/)
12-
- [Inject secrets directly into pods from Vault](https://techblog.cisco.com/inject-secrets-into-pods-vault-revisited/)
12+
- [Inject secrets directly into pods from Vault](https://techblog.cisco.com/inject-secrets-into-pods-vault-revisited/) -->
1313

1414
## Deploy with Helm
1515

content/docs/mutating-webhook/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ In this case, an init-container will be injected into the given Pod. This contai
144144

145145
Currently, the Kubernetes Service Account-based Vault authentication mechanism is used by `vault-env`, so it requests a Vault token based on the Service Account of the container it is injected into.
146146

147-
- [GCP](https://developer.hashicorp.com/vault/docs/auth/gcp) and general [OIDC/JWT](https://developer.hashicorp.com/vault/docs/auth/jwt) authentication methods are supported as well, see the [example manifest](https://github.com/bank-vaults/vault-operator/blob/main/test/deploy/test-deployment-gcp.yaml).
147+
- [GCP](https://developer.hashicorp.com/vault/docs/auth/gcp) and general [OIDC/JWT](https://developer.hashicorp.com/vault/docs/auth/jwt) authentication methods are supported as well, see the [example manifest](https://github.com/bank-vaults/secrets-webhook/blob/main/examples/test-deployment-gcp.yaml).
148148
- Kubernetes [Projected Service Account Tokens](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection) work too, as shown in [this example](https://github.com/bank-vaults/vault-operator/blob/main/test/oidc-pod.yaml).
149149

150150
Kubernetes 1.12 introduced a feature called [APIServer dry-run](https://kubernetes.io/blog/2019/01/14/apiserver-dry-run-and-kubectl-diff/) which became beta as of 1.13. This feature requires some changes in webhooks with side effects. Vault mutating admission webhook is `dry-run aware`.

content/docs/mutating-webhook/deploy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you are getting the **x509: certificate signed by unknown authority app=vault
1616

1717
`vault-env` by default replaces itself with the original process of the Pod after reading the secrets from Vault, but with the `vault.security.banzaicloud.io/vault-env-daemon: "true"` annotation this behavior can be changed. So `vault-env` can change to `daemon mode`, so `vault-env` starts the original process as a child process and remains in memory, and renews the lease of the requested Vault token and of the dynamic secrets (if requested any) until their final expiration time.
1818

19-
You can find a full example using MySQL dynamic secrets in the [Bank-Vaults project's Vault Operator repository](https://github.com/bank-vaults/vault-operator/blob/main/test/deploy/test-dynamic-env-vars.yaml):
19+
You can find a full example using MySQL dynamic secrets in the [Bank-Vaults project's Vault Operator repository](https://github.com/bank-vaults/secrets-webhook/blob/main/examples/test-dynamic-env-vars.yaml):
2020

2121
```bash
2222
# Deploy MySQL first as the Vault storage backend and our application will request dynamic secrets for this database as well:

content/docs/mutating-webhook/vault-agent-templating.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For the webhook to detect that it will need to mutate or change a PodSpec, add t
5555
|-------------------------------------|-----------------------------------------------------------------|--------------------------------------------------------------|
5656
| VAULT_IMAGE | hashicorp/vault:latest | The vault image to use for the sidecar container |
5757
| VAULT_IMAGE_PULL_POLICY | IfNotPresent | The pull policy for the vault agent container |
58-
| VAULT_ADDR | <https://127.0.0.1:8200> | Kubernetes service Vault endpoint URL |
58+
| VAULT_ADDR | https://127.0.0.1:8200 | Kubernetes service Vault endpoint URL |
5959
| VAULT_TLS_SECRET | "" | Supply a secret with the vault TLS CA so TLS can be verified |
6060
| VAULT_AGENT_SHARE_PROCESS_NAMESPACE | Kubernetes version <1.12 default off, 1.12 or higher default on | ShareProcessNamespace override |
6161

content/docs/operator/hsm/nitrokey-opensc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ Since the HSM is a hardware device connected to a physical node, Bank-Vaults has
202202
time="2020-03-04T13:32:29Z" level=info msg="joining leader vault..."
203203
time="2020-03-04T13:32:29Z" level=info msg="vault metrics exporter enabled: :9091/metrics"
204204
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
205-
- using env: export GIN_MODE=release
206-
- using code: gin.SetMode(gin.ReleaseMode)
205+
- using env: export GIN_MODE=release
206+
- using code: gin.SetMode(gin.ReleaseMode)
207207
208208
[GIN-debug] GET /metrics --> github.com/gin-gonic/gin.WrapH.func1 (3 handlers)
209209
[GIN-debug] Listening and serving HTTP on :9091

content/docs/operator/reference.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ _Appears in:_
119119

120120
#### `name` (_string_)
121121

122-
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names
122+
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
123123
#### `labels` (_object (keys:string, values:string)_)
124124

125-
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
125+
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
126126
#### `annotations` (_object (keys:string, values:string)_)
127127

128-
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
128+
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
129129

130130

131131
### EmbeddedPersistentVolumeClaim
@@ -565,12 +565,13 @@ VaultConfigurerLabels define a set of Kubernetes labels that will be added to al
565565
#### `vaultConfigurerPodSpec` (_[EmbeddedPodSpec](#embeddedpodspec)_)
566566

567567
VaultConfigurerPodSpec is a Kubernetes Pod specification snippet (`spec:` block) that will be merged into the operator generated Vault Configurer Pod specification. default:
568-
#### `config` (_[JSON](#json)_)
568+
#### `config` (_JSON_)
569569

570570
Config is the Vault Server configuration. See https://www.vaultproject.io/docs/configuration/ for more details. default:
571-
#### `externalConfig` (_[JSON](#json)_)
571+
#### `externalConfig` (_JSON_)
572+
573+
ExternalConfig is higher level configuration block which instructs the Bank Vaults Configurer to configure Vault through its API, thus allows setting up: - Secret Engines - Auth Methods - Audit Devices - Plugin Backends - Policies - Startup Secrets (Bank Vaults feature)
572574

573-
ExternalConfig is higher level configuration block which instructs the Bank Vaults Configurer to configure Vault through its API, thus allows setting up: - Secret Engines - Auth Methods - Audit Devices - Plugin Backends - Policies - Startup Secrets (Bank Vaults feature) A documented example: https://github.com/bank-vaults/vault-operator/blob/main/vault-config.yml default:
574575
#### `unsealConfig` (_[UnsealConfig](#unsealconfig)_)
575576

576577
UnsealConfig defines where the Vault cluster's unseal keys and root token should be stored after initialization. See the type's documentation for more details. Only one method may be specified. default: Kubernetes Secret based unsealing

content/docs/operator/templating-configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In this case, `vault-configurer` evaluates the value of `MY_ENVIRONMENT_VARIABLE
3434

3535
Note that you can also use [Sprig functions](#sprig-functions) and [custom Kubernetes-related functions](#custom-functions) in your templates.
3636

37-
For a detailed example, see the [Using templates for injecting dynamic configuration in Vault](https://techblog.cisco.com/bank-vaults-templates#full-example) blog post.
37+
<!-- For a detailed example, see the [Using templates for injecting dynamic configuration in Vault](https://techblog.cisco.com/bank-vaults-templates#full-example) blog post. -->
3838

3939
## Sprig functions
4040

content/docs/operator/tls/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ To use an existing secret which contains the TLS certificate, define [existingTl
7777

7878
If you don't want to use the certificates generated by Helm or the Bank-Vaults operator, the easiest way to create a custom certificate for Bank-Vaults is using [CFSSL](https://github.com/cloudflare/cfssl).
7979

80-
The [TLS directory in the documentation](https://github.com/bank-vaults/bank-vaults.dev/tree/main/content/docs/tls) holds a set of custom CFSSL configurations which are prepared for the Helm release name `vault` in the `default` namespace. Of course, you can put any other certificates into the Secret below, this is just an example.
80+
The [TLS directory in the documentation](https://github.com/bank-vaults/bank-vaults.dev/tree/main/content/docs/operator/tls) holds a set of custom CFSSL configurations which are prepared for the Helm release name `vault` in the `default` namespace. Of course, you can put any other certificates into the Secret below, this is just an example.
8181

8282
1. Install [CFSSL](https://github.com/cloudflare/cfssl).
8383
2. Create a CA:

0 commit comments

Comments
 (0)