Skip to content

Commit 6cf5abc

Browse files
committed
docs: Add starter docs site
1 parent bd3b0c9 commit 6cf5abc

15 files changed

+1323
-5
lines changed

.github/workflows/github-pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2023 D2iQ, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: GitHub Pages
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-22.04
15+
permissions:
16+
contents: write
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Hugo
26+
uses: peaceiris/actions-hugo@v2
27+
with:
28+
hugo-version: '0.116.1'
29+
extended: true
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: '18'
35+
cache: 'npm'
36+
cache-dependency-path: '**/package-lock.json'
37+
38+
- name: Install necessary packages
39+
run: npm ci
40+
working-directory: ./docs/
41+
42+
- name: Build
43+
run: hugo --minify
44+
working-directory: ./docs/
45+
46+
- name: Deploy
47+
uses: peaceiris/actions-gh-pages@v3
48+
if: github.ref == 'refs/heads/main'
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
publish_dir: ./docs/public

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ capd-kubeconfig
3131
ct_previous_*/
3232

3333
.envrc.local*
34+
35+
public/
36+
resources/
37+
node_modules/
38+
.hugo_build.lock

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ repos:
1313
- repo: https://github.com/tekwizely/pre-commit-golang
1414
rev: v1.0.0-rc.1
1515
hooks:
16-
- id: go-mod-tidy-repo
16+
- id: go-mod-tidy
17+
exclude: ^docs/
1718
- repo: https://github.com/pre-commit/pre-commit-hooks
1819
rev: v4.4.0
1920
hooks:
@@ -102,7 +103,7 @@ repos:
102103
name: License headers - Markdown
103104
stages: [commit]
104105
files: \.md$
105-
exclude: ^CHANGELOG.md$
106+
exclude: ^(CHANGELOG.md$|docs/)
106107
args:
107108
- --license-filepath
108109
- hack/license-header.txt

devbox.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"gotestsum@latest",
2222
"hadolint@latest",
2323
"helm-docs@latest",
24+
2425
"kind@latest",
2526
"kubebuilder@latest",
2627
"kubectl@latest",

devbox.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@
127127
"source": "devbox-search",
128128
"version": "1.11.0"
129129
},
130+
131+
"last_modified": "2023-08-08T03:07:33Z",
132+
"resolved": "github:NixOS/nixpkgs/844ffa82bbe2a2779c86ab3a72ff1b4176cec467#hugo",
133+
"source": "devbox-search",
134+
"version": "0.116.1"
135+
},
130136
"kind@latest": {
131137
"last_modified": "2023-06-30T04:44:22Z",
132138
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#kind",

docs/archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
---

docs/content/_index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
+++
2+
title = "CAPI Runtime Extensions"
3+
4+
[[cascade]]
5+
type = "blog"
6+
toc_root = true
7+
8+
[cascade._target]
9+
path = "/news/**"
10+
11+
[[cascade]]
12+
type = "docs"
13+
14+
[cascade._target]
15+
path = "/**"
16+
+++

docs/content/calico-cni.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: "Calico CNI"
3+
---
4+
5+
When deploying a cluster with CAPI, deployment and configuration of CNI is up to the user. By leveraging CAPI cluster
6+
lifecycle hooks, this handler deploys Calico CNI on the new cluster via `ClusterResourceSets` at the
7+
`AfterControlPlaneInitialized` phase.
8+
9+
Deployment of Calico is opt-in La cluster must be labelled with `capiext.labs.d2iq.io/cni=calico` for the lifecycle hook
10+
to perform any actions. The hook creates two `ClusterResourceSets`: one to deploy the Tigera Operator, and one to deploy
11+
Calico via the Tigera `Installation` CRD. The Tigera Operator CRS is shared between all clusters in the operator,
12+
whereas the Calico installation CRS is unique per cluster.
13+
14+
This hook is enabled by default, and can be explicitly disabled by omitting the `CalicoCNI` hook from the
15+
`--runtimehooks.enabled-handlers` flag.
16+
17+
If deploying via Helm, then this can be disabled by setting `handlers.CalicoCNI.enabled=false`.
18+
19+
As ClusterResourceSets must exist in the same name as the cluster they apply to, the lifecycle hook copies default
20+
ConfigMaps from the same namespace as the CAPI runtime extensions hook pod is running in. This enables users to
21+
configure defaults specific for their environment rather than compiling the defaults into the binary.
22+
23+
The Helm chart comes with default configurations for the Calico Installation CRS per supported provider, but overriding
24+
is possible. To do so, specify:
25+
26+
```bash
27+
--set-file handlers.CalicoCNI.defaultInstallationConfigMaps.DockerCluster.configMap.content=<file>
28+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "LoadBalancer Services Garbage Collection"
3+
---
4+
5+
When using Kubernetes `LoadBalancer` services, the relevant cloud provider interface creates and configures external
6+
resources. If the `LoadBalancer` services are not deleted prior to deleting the Kubernetes cluster, then these external
7+
resources are orphaned, leading to wasted resources and unnecessary expense. The load-balancer services garbage
8+
collector is implemented as a `BeforeClusterDelete` CAPI cluster lifecycle hook that deletes the load-balancer services
9+
and thus triggering the cloud provider interface to clean up the external resources. The hook blocks until all
10+
load-balancer services have been fully deleted, indicating that the cloud provider interface has cleaned up the external
11+
resources.
12+
13+
This hook is enabled by default, and can be explicitly disabled by omitting the `LoadBalancerGC` hook from the
14+
`--runtimehooks.enabled-handlers` flag.
15+
16+
If deploying via Helm, then this can be disabled by setting `handlers.ServiceLoadBalancerGC.enabled=false`.
17+
18+
By default, all clusters will be cleaned up when deleting, but this can be opted out from by setting the annotation
19+
`capiext.labs.d2iq.io//loadbalancer-gc=false`.

docs/go.mod

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2023 D2iQ, Inc. All rights reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
module github.com/d2iq-labs/capi-runtime-extensions/docs
5+
6+
go 1.20
7+
8+
require github.com/google/docsy v0.7.1 // indirect

docs/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
2+
github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY=
3+
github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc=
4+
github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
5+
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=

docs/hugo.toml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
2+
baseURL = "https://d2iq-labs.github.io/capi-runtime-extensions"
3+
title = "CAPI Runtime Extensions | D2iQ Labs"
4+
5+
enableRobotsTXT = true
6+
7+
# Will give values to .Lastmod etc.
8+
enableGitInfo = true
9+
10+
# Language settings
11+
contentDir = "content"
12+
13+
disableKinds = ["taxonomy", "term", "RSS"]
14+
15+
# Configure how URLs look like per section.
16+
[permalinks]
17+
blog = "/:section/:year/:month/:day/:slug/"
18+
19+
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
20+
[blackfriday]
21+
plainIDAnchors = true
22+
hrefTargetBlank = true
23+
angledQuotes = false
24+
latexDashes = true
25+
26+
# Image processing configuration.
27+
[imaging]
28+
resampleFilter = "CatmullRom"
29+
quality = 75
30+
anchor = "Smart"
31+
32+
[services]
33+
[services.googleAnalytics]
34+
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
35+
# id = "UA-00000000-0"
36+
37+
[markup]
38+
[markup.goldmark]
39+
[markup.goldmark.extensions]
40+
typographer = false
41+
[markup.goldmark.renderer]
42+
unsafe = true
43+
[markup.highlight]
44+
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
45+
style = "tango"
46+
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
47+
# guessSyntax = "true"
48+
49+
# Everything below this are Site Params
50+
51+
# Comment out if you don't want the "print entire section" link enabled.
52+
[outputs]
53+
section = ["HTML", "print"]
54+
55+
[params]
56+
copyright = "D2iQ, Inc."
57+
# privacy_policy = "https://policies.google.com/privacy"
58+
59+
# First one is picked as the Twitter card image if not set on page.
60+
# images = ["images/project-illustration.png"]
61+
62+
# Menu title if your navbar has a versions selector to access old versions of your site.
63+
# This menu appears only if you have at least one [params.versions] set.
64+
version_menu = "Releases"
65+
66+
# Flag used in the "version-banner" partial to decide whether to display a
67+
# banner on every page indicating that this is an archived version of the docs.
68+
# Set this flag to "true" if you want to display the banner.
69+
archived_version = false
70+
71+
# The version number for the version of the docs represented in this doc set.
72+
# Used in the "version-banner" partial to display a version number for the
73+
# current doc set.
74+
version = "0.0"
75+
76+
# A link to latest version of the docs. Used in the "version-banner" partial to
77+
# point people to the main doc site.
78+
url_latest_version = "https://example.com"
79+
80+
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
81+
# The links work despite our URL being GitLab not GitHub.
82+
github_repo = "https://github.com/d2iq-labs/capi-runtime-extensions"
83+
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
84+
# The links work despite our URL being GitLab not GitHub.
85+
86+
# Specify a value here if your content directory is not in your repo's root directory
87+
github_subdir = "docs"
88+
89+
# Uncomment this if you have a newer GitHub repo with "main" as the default branch,
90+
# or specify a new value if you want to reference another branch in your GitHub links
91+
github_branch= "main"
92+
93+
# Google Custom Search Engine ID. Remove or comment out to disable search.
94+
# gcs_engine_id = "d72aa9b2712488cc3"
95+
96+
# Enable Algolia DocSearch
97+
algolia_docsearch = false
98+
99+
# Enable Lunr.js offline search
100+
offlineSearch = true
101+
102+
# Enable syntax highlighting and copy buttons on code blocks with Prism
103+
# Default "Chroma" syntax highlighter has no dot support, so use Prism instead
104+
prism_syntax_highlighting = true
105+
106+
# User interface configuration
107+
[params.ui]
108+
# Enable to show the side bar menu in its compact state.
109+
sidebar_menu_compact = true
110+
# Set to true to disable breadcrumb navigation.
111+
breadcrumb_disable = false
112+
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
113+
sidebar_search_disable = false
114+
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
115+
navbar_logo = false
116+
# Set to true to disable the About link in the site footer
117+
footer_about_disable = false
118+
119+
# We have almost 200 attributes; don't truncate the sidebar to max 50 contents.
120+
sidebar_menu_truncate = 1000
121+
122+
# Sidebar generation is slow otherwise
123+
sidebar_cache_limit = 100
124+
125+
ul_show = 2
126+
127+
# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
128+
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
129+
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
130+
# add "hide_feedback: true" to the page's front matter.
131+
[params.ui.feedback]
132+
enable = true
133+
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
134+
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
135+
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
136+
137+
# Adds a reading time to the top of each doc.
138+
# If you want this feature, but occasionally need to remove the Reading time from a single page,
139+
# add "hide_readingtime: true" to the page's front matter
140+
[params.ui.readingtime]
141+
enable = false
142+
143+
[params.links]
144+
[[params.links.user]]
145+
name ="Twitter"
146+
url = "https://twitter.com/d2iq_eng"
147+
icon = "fab fa-twitter"
148+
desc = "Follow us on Twitter to get the latest news!"
149+
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
150+
[[params.links.developer]]
151+
name = "GitHub"
152+
url = "https://github.com/d2iq-labs/capi-runtime-extensions"
153+
icon = "fab fa-github"
154+
desc = "Development takes place here!"
155+
156+
[[menu.main]]
157+
name = "GitHub"
158+
weight = 50
159+
pre = "<i class='fab fa-github'></i>"
160+
url = "https://github.com/d2iq-labs/capi-runtime-extensions"
161+
162+
[params.taxonomy]
163+
164+
[module]
165+
proxy = "direct"
166+
[[module.imports]]
167+
path = "github.com/google/docsy"
168+
[[module.imports]]
169+
path = "github.com/google/docsy/dependencies"

0 commit comments

Comments
 (0)