Skip to content

Commit 1248c1c

Browse files
authored
[docs] Reorganize hugo doc site (#3382)
This PR reorganizes sdk.operatorframework.io to match the navigation panel for olm.operatorframework.io, so that both the sites appear to be part of one operator-framework family.
1 parent 3402111 commit 1248c1c

File tree

118 files changed

+272
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+272
-240
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
- The type name `TestCtx` in `pkg/test` has been deprecated and renamed to `Context`. It now exists only as a type alias to maintain backwards compatibility. Users of the e2e framework should migrate to use the new name, `Context`. The `TestCtx` alias will be removed in a future version. ([2549](https://github.com/operator-framework/operator-sdk/pull/2549))
221221

222222
- The additional of the dependency `inotify-tools` on Ansible based-operator images. ([#2586](https://github.com/operator-framework/operator-sdk/pull/2586))
223-
- **Breaking Change:** The scorecard feature now only supports YAML config files. So, any config file with other extension is deprecated and should be changed for the YAML format. For further information see [`scorecard config file`](./website/content/en/docs/scorecard/_index.md#config-file) ([#2591](https://github.com/operator-framework/operator-sdk/pull/2591))
223+
- **Breaking Change:** The scorecard feature now only supports YAML config files. So, any config file with other extension is deprecated and should be changed for the YAML format. For further information see [`scorecard config file`](./website/content/en/docs/advanced-topics/scorecard/_index.md#config-file) ([#2591](https://github.com/operator-framework/operator-sdk/pull/2591))
224224

225225
### Removed
226226

@@ -465,7 +465,7 @@
465465

466466
### Changed
467467

468-
- **Breaking Change:** New configuration format for the `operator-sdk scorecard` using config files. See [`doc/test-framework/scorecard`](./website/content/en/docs/scorecard/_index.md) for more info ([#1641](https://github.com/operator-framework/operator-sdk/pull/1641))
468+
- **Breaking Change:** New configuration format for the `operator-sdk scorecard` using config files. See [`doc/test-framework/scorecard`](./website/content/en/docs/advanced-topics/scorecard/_index.md) for more info ([#1641](https://github.com/operator-framework/operator-sdk/pull/1641))
469469
- **Breaking change:** CSV config field `role-path` is now `role-paths` and takes a list of strings. Users can now specify multiple `Role` and `ClusterRole` manifests using `role-paths`. ([#1704](https://github.com/operator-framework/operator-sdk/pull/1704))
470470
- Make `ready` package idempotent. Now, a user can call `Set()` or `Unset()` to set the operator's readiness without knowing the current state. ([#1761](https://github.com/operator-framework/operator-sdk/pull/1761))
471471
@@ -534,7 +534,7 @@
534534
- Unify CLI debug logging under a global `--verbose` flag ([#1361](https://github.com/operator-framework/operator-sdk/pull/1361))
535535
- [Go module](https://github.com/golang/go/wiki/Modules) support by default for new Go operators and during Ansible and Helm operator migration. The dependency manager used for a new operator can be explicitly specified for new operators through the `--dep-manager` flag, available in [`operator-sdk new`](https://github.com/operator-framework/operator-sdk/blob/v0.8.0/doc/sdk-cli-reference.md#new) and [`operator-sdk migrate`](https://github.com/operator-framework/operator-sdk/blob/v0.8.0/doc/sdk-cli-reference.md#migrate). `dep` is still available through `--dep-manager=dep`. ([#1001](https://github.com/operator-framework/operator-sdk/pull/1001))
536536
- New optional flag `--custom-api-import` for [`operator-sdk add controller`](https://github.com/operator-framework/operator-sdk/blob/v0.8.0/doc/sdk-cli-reference.md#controller) to specify that the new controller reconciles a built-in or external Kubernetes API, and what import path and identifier it should have. ([#1344](https://github.com/operator-framework/operator-sdk/pull/1344))
537-
- Operator Scorecard plugin support. Documentation for scorecard plugins can be found in the main scorecard [doc](./website/content/en/docs/scorecard/_index.md). ([#1379](https://github.com/operator-framework/operator-sdk/pull/1379))
537+
- Operator Scorecard plugin support. Documentation for scorecard plugins can be found in the main scorecard [doc](./website/content/en/docs/advanced-topics/scorecard/_index.md). ([#1379](https://github.com/operator-framework/operator-sdk/pull/1379))
538538
539539
### Changed
540540
@@ -650,7 +650,7 @@
650650
- Ansible operator proxy added the cache handler which allows the get requests to use the operators cache. [#760](https://github.com/operator-framework/operator-sdk/pull/760)
651651
- Ansible operator proxy added ability to dynamically watch dependent resource that were created by ansible operator. [#857](https://github.com/operator-framework/operator-sdk/pull/857)
652652
- Ansible-based operators have leader election turned on by default. When upgrading, add environment variable `POD_NAME` to your operator's Deployment using the Kubernetes downward API. To see an example, run `operator-sdk new --type=ansible ...` and see file `deploy/operator.yaml`.
653-
- A new command [`operator-sdk scorecard`](https://github.com/operator-framework/operator-sdk/blob/v0.4.0/doc/sdk-cli-reference.md#scorecard) which runs a series of generic tests on operators to ensure that an operator follows best practices. For more information, see the [scorecard documentation](./website/content/en/docs/scorecard/_index.md)
653+
- A new command [`operator-sdk scorecard`](https://github.com/operator-framework/operator-sdk/blob/v0.4.0/doc/sdk-cli-reference.md#scorecard) which runs a series of generic tests on operators to ensure that an operator follows best practices. For more information, see the [scorecard documentation](./website/content/en/docs/advanced-topics/scorecard/_index.md)
654654

655655
### Changed
656656

hack/generate/cli-doc/gen-cli-doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ func main() {
3939
log.Fatalf("Failed to get current directory: %v", err)
4040
}
4141

42-
legacyDocPath := filepath.Join(currentDir, "website", "content", "en", "docs", "cli")
42+
legacyDocPath := filepath.Join(currentDir, "website", "content", "en", "docs", "cli", "ansible-helm")
4343
legacyRoot := cli.GetCLIRoot()
4444
legacyRoot.DisableAutoGenTag = true
4545
recreateDocDir(legacyRoot, legacyDocPath)
4646

47-
newDocPath := filepath.Join(currentDir, "website", "content", "en", "docs", "new-cli")
47+
newDocPath := filepath.Join(currentDir, "website", "content", "en", "docs", "cli", "golang")
4848
_, newRoot := cli.GetPluginsCLIAndRoot()
4949
newRoot.DisableAutoGenTag = true
5050
recreateDocDir(newRoot, newDocPath)

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [[ "$VER" != "$CURR_VER" ]]; then
3838
exit 1
3939
fi
4040

41-
INSTALL_GUIDE_FILE="website/content/en/docs/install-operator-sdk.md"
41+
INSTALL_GUIDE_FILE="website/content/en/docs/installation/install-operator-sdk.md"
4242
CURR_VER_INSTALL_GUIDE_FILE="$(sed -nr 's/.*RELEASE_VERSION=(.+)/\1/p' "$INSTALL_GUIDE_FILE" | tr -d ' \t\n')"
4343
if [[ "$VER" != "$CURR_VER_INSTALL_GUIDE_FILE" ]]; then
4444
echo "version '$VER' is not set correctly in $INSTALL_GUIDE_FILE"

website/content/en/build/_index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ <h2 class="of-heading of-heading--md">How can I write an Operator with Operator
2424
<div class="of-section--largetext__item">
2525
<h2 class="of-heading of-heading--xl">Installing the SDK CLI</h2>
2626
<div class="of-section--largetext__content">
27-
<p>Follow the steps in the <a href="/docs/install-operator-sdk/">installation guide</a> to learn how to install the Operator SDK CLI tool. If you are using a release version of the SDK, make sure to follow the documentation for that version. You make use any of the following installation processes:</p>
27+
<p>Follow the steps in the <a href="/docs/installation/install-operator-sdk/">installation guide</a> to learn how to install the Operator SDK CLI tool. If you are using a release version of the SDK, make sure to follow the documentation for that version. You make use any of the following installation processes:</p>
2828
<ol class="of-list-ordered">
29-
<li>Install the <a href="/docs/install-operator-sdk/#install-from-homebrew-macos">Homebrew</a> (macOS)</li>
30-
<li>Install from <a href="/docs/install-operator-sdk/#install-from-github-release">GitHub</a> release</li>
31-
<li>Compile and install from <a href="/docs/install-operator-sdk/#compile-and-install-from-master">master</a></li>
29+
<li>Install the <a href="/docs/installation/install-operator-sdk/#install-from-homebrew-macos">Homebrew</a> (macOS)</li>
30+
<li>Install from <a href="/docs/installation/install-operator-sdk/#install-from-github-release">GitHub</a> release</li>
31+
<li>Compile and install from <a href="/docs/installation/install-operator-sdk/#compile-and-install-from-master">master</a></li>
3232
</ol>
3333
</div>
34-
<a href="/docs/install-operator-sdk" class="of-button of-button--tertiary">Learn More
34+
<a href="/docs/installation/install-operator-sdk" class="of-button of-button--tertiary">Learn More
3535
<svg class="of-button__icon" enable-background="new 0 0 22 22" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3636
<path d="M19.5,8l-7.3-7.6c-0.4-0.4-1.1-0.4-1.5,0L9.3,1.8c-0.4,0.4-0.4,1.1,0,1.6l5.2,5.5H1.1C0.5,8.9,0,9.3,0,10V12 c0,0.6,0.5,1.1,1.1,1.1h13.5l-5.2,5.5c-0.4,0.4-0.4,1.1,0,1.6l1.4,1.5c0.4,0.4,1.1,0.4,1.5,0l9.4-9.9c0.4-0.4,0.4-1.1,0-1.6L19.5,8z "/>
3737
</svg>
@@ -44,19 +44,19 @@ <h2 class="of-heading of-heading--xl">Installing the SDK CLI</h2>
4444
<h2 class="of-heading of-heading--xl">READ THE USER GUIDES</h2>
4545
<p class="of-section--largetext__content">Operators can be created with the SDK using Ansible, Helm, or Go. Follow the one of the quickstart guides to dive in.</p>
4646
<ul>
47-
<li><a href="/docs/ansible/quickstart/" class="of-button of-button--tertiary">
47+
<li><a href="/docs/building-operators/ansible/quickstart/" class="of-button of-button--tertiary">
4848
Ansible Quickstart
4949
<svg class="of-button__icon" enable-background="new 0 0 22 22" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
5050
<path d="M19.5,8l-7.3-7.6c-0.4-0.4-1.1-0.4-1.5,0L9.3,1.8c-0.4,0.4-0.4,1.1,0,1.6l5.2,5.5H1.1C0.5,8.9,0,9.3,0,10V12 c0,0.6,0.5,1.1,1.1,1.1h13.5l-5.2,5.5c-0.4,0.4-0.4,1.1,0,1.6l1.4,1.5c0.4,0.4,1.1,0.4,1.5,0l9.4-9.9c0.4-0.4,0.4-1.1,0-1.6L19.5,8z "/>
5151
</svg>
5252
</a></li>
53-
<li><a href="/docs/helm/quickstart/" class="of-button of-button--tertiary">
53+
<li><a href="/docs/building-operators/helm/quickstart/" class="of-button of-button--tertiary">
5454
Helm Quickstart
5555
<svg class="of-button__icon" enable-background="new 0 0 22 22" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
5656
<path d="M19.5,8l-7.3-7.6c-0.4-0.4-1.1-0.4-1.5,0L9.3,1.8c-0.4,0.4-0.4,1.1,0,1.6l5.2,5.5H1.1C0.5,8.9,0,9.3,0,10V12 c0,0.6,0.5,1.1,1.1,1.1h13.5l-5.2,5.5c-0.4,0.4-0.4,1.1,0,1.6l1.4,1.5c0.4,0.4,1.1,0.4,1.5,0l9.4-9.9c0.4-0.4,0.4-1.1,0-1.6L19.5,8z "/>
5757
</svg>
5858
</a></li>
59-
<li><a href="/docs/golang/quickstart/" class="of-button of-button--tertiary">
59+
<li><a href="/docs/building-operators/golang/quickstart/" class="of-button of-button--tertiary">
6060
Go Quickstart
6161
<svg class="of-button__icon" enable-background="new 0 0 22 22" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
6262
<path d="M19.5,8l-7.3-7.6c-0.4-0.4-1.1-0.4-1.5,0L9.3,1.8c-0.4,0.4-0.4,1.1,0,1.6l5.2,5.5H1.1C0.5,8.9,0,9.3,0,10V12 c0,0.6,0.5,1.1,1.1,1.1h13.5l-5.2,5.5c-0.4,0.4-0.4,1.1,0,1.6l1.4,1.5c0.4,0.4,1.1,0.4,1.5,0l9.4-9.9c0.4-0.4,0.4-1.1,0-1.6L19.5,8z "/>
@@ -80,7 +80,7 @@ <h2 class="of-heading of-heading--xl">PUBLISH YOUR OPERATOR</h2>
8080
<h2 class="of-heading of-heading--xl">LEVEL UP YOUR OPERATOR</h2>
8181
<p class="of-section--largetext__content">Learn about operator maturity and the requirements to approach full auto
8282
pilot.</p>
83-
<a href="/docs/operator-capabilities/" class="of-button of-button--tertiary">Learn More
83+
<a href="/docs/advanced-topics/operator-capabilities/operator-capabilities" class="of-button of-button--tertiary">Learn More
8484
<svg class="of-button__icon" enable-background="new 0 0 22 22" version="1.1" viewBox="0 0 22 22"
8585
xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
8686
<path

website/content/en/docs/_index.md

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6,92 +6,3 @@ menu:
66
weight: 2
77
---
88

9-
## Overview
10-
11-
This project is a component of the [Operator Framework][of-home], an open source toolkit to manage Kubernetes native applications, called Operators, in an effective, automated, and scalable way. Read more in the [introduction blog post][of-blog].
12-
13-
[Operators][operator_link] make it easy to manage complex stateful applications on top of Kubernetes. However writing an operator today can be difficult because of challenges such as using low level APIs, writing boilerplate, and a lack of modularity which leads to duplication.
14-
15-
The Operator SDK is a framework that uses the [controller-runtime][controller_runtime] library to make writing operators easier by providing:
16-
17-
- High level APIs and abstractions to write the operational logic more intuitively
18-
- Tools for scaffolding and code generation to bootstrap a new project fast
19-
- Extensions to cover common operator use cases
20-
21-
## Workflow
22-
23-
The SDK provides workflows to develop operators in Go, Ansible, or Helm.
24-
25-
The following workflow is for a new [Golang operator][golang-guide]:
26-
27-
1. Create a new operator project using the SDK Command Line Interface(CLI)
28-
2. Define new resource APIs by adding Custom Resource Definitions(CRD)
29-
3. Define Controllers to watch and reconcile resources
30-
4. Write the reconciling logic for your Controller using the SDK and controller-runtime APIs
31-
5. Use the SDK CLI to build and generate the operator deployment manifests
32-
33-
The following workflow is for a new [Ansible operator][ansible-guide]:
34-
35-
1. Create a new operator project using the SDK Command Line Interface(CLI)
36-
2. Write the reconciling logic for your object using ansible playbooks and roles
37-
3. Use the SDK CLI to build and generate the operator deployment manifests
38-
4. Optionally add additional CRD's using the SDK CLI and repeat steps 2 and 3
39-
40-
The following workflow is for a new [Helm operator][helm-guide]:
41-
42-
1. Create a new operator project using the SDK Command Line Interface(CLI)
43-
2. Create a new (or add your existing) Helm chart for use by the operator's reconciling logic
44-
3. Use the SDK CLI to build and generate the operator deployment manifests
45-
4. Optionally add additional CRD's using the SDK CLI and repeat steps 2 and 3
46-
47-
## Command Line Interface
48-
49-
To learn more about the SDK CLI, see the [SDK CLI Reference][sdk_cli_ref], or run `operator-sdk [command] -h`.
50-
51-
### Operator capability level
52-
53-
Note that each operator type has a different set of capabilities. When choosing what type to use for your project, it is important to understand the features and limitations of each of the project types and the use cases for your operator.
54-
55-
![operator-capability-level](/operator-capability-level.png)
56-
57-
Find more details about the various levels and the feature requirements for them in the [capability level documentation][capability_levels].
58-
59-
## Samples
60-
61-
To explore any operator samples built using the operator-sdk, see the [operator-sdk-samples][samples].
62-
63-
## FAQ
64-
65-
For common Operator SDK related questions, see the [FAQ][faq].
66-
67-
## Contributing
68-
69-
See [CONTRIBUTING][contrib] for details on submitting patches and the contribution workflow.
70-
71-
See the [proposal docs][proposals_docs] and issues for ongoing or planned work.
72-
73-
## Reporting bugs
74-
75-
See [reporting bugs][bug_guide] for details about reporting any issues.
76-
77-
## License
78-
79-
Operator SDK is under Apache 2.0 license. See the [LICENSE][license_file] file for details.
80-
81-
[ansible-guide]:/docs/ansible/quickstart/
82-
[bug_guide]:/docs/contribution-guidelines/reporting-issues/
83-
[capability_levels]: /docs/operator-capabilities/
84-
[contrib]: https://github.com/operator-framework/operator-sdk/blob/master/CONTRIBUTING.MD
85-
[controller_runtime]: https://github.com/kubernetes-sigs/controller-runtime
86-
[faq]: /docs/faq/
87-
[getting_started]: https://github.com/operator-framework/getting-started/blob/master/README.md
88-
[golang-guide]:/docs/golang/quickstart/
89-
[helm-guide]:/docs/helm/quickstart/
90-
[install_guide]: /docs/install-operator-sdk/
91-
[license_file]:https://github.com/operator-framework/operator-sdk/blob/master/LICENSE
92-
[of-blog]: https://coreos.com/blog/introducing-operator-framework
93-
[of-home]: https://github.com/operator-framework
94-
[operator_link]: https://coreos.com/operators/
95-
[proposals_docs]: https://github.com/operator-framework/operator-sdk/tree/master/proposals
96-
[samples]: https://github.com/operator-framework/operator-sdk-samples
97-
[sdk_cli_ref]: /docs/cli/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Advanced Topics"
3+
linkTitle: "Advanced Topics"
4+
weight: 5
5+
date: 2020-07-09
6+
description: Guide to CRD scoping, Operator Scoping and Scorecard testing using Operator SDK
7+
---

website/content/en/docs/operator-capabilities.md renamed to website/content/en/docs/advanced-topics/operator-capabilities/operator-capabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Operator Capability Levels
33
linkTitle: Capability Levels
4-
weight: 50
4+
weight: 4
55
---
66

77
Operators come in different maturity levels in regards to their lifecycle management capabilities for the application or workload they deliver. The capability models aims to provide guidance in terminology to express what features users can expect from an operator.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Scorecard
3+
linkTitle: Scorecard
4+
weight: 3
5+
description: Statically validate your operator bundle using Scorecard.
6+
---

website/content/en/docs/scorecard/custom-tests.md renamed to website/content/en/docs/advanced-topics/scorecard/custom-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,6 @@ connection to invoke the Kube API.
243243
[config_yaml]: https://github.com/operator-framework/operator-sdk/blob/master/internal/scorecard/testdata/bundle/tests/scorecard/config.yaml
244244
[scorecard_main_func]: https://github.com/operator-framework/operator-sdk/blob/master/images/scorecard-test/cmd/test/main.go
245245
[custom_scorecard_repo]: https://github.com/operator-framework/operator-sdk/tree/master/internal/scorecard/examples
246-
[user_doc]: /docs/scorecard/scorecard/
246+
[user_doc]: /docs/advanced-topics/scorecard/scorecard/
247247
[scorecard_binary]: https://github.com/operator-framework/operator-sdk/blob/master/internal/scorecard/examples/custom-scorecard-tests/images/custom-scorecard-tests/cmd/test/main.go
248248
[sample_makefile]: https://github.com/operator-framework/operator-sdk/blob/master/internal/scorecard/examples/custom-scorecard-tests/Makefile

website/content/en/docs/scorecard/scorecard.md renamed to website/content/en/docs/advanced-topics/scorecard/scorecard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Writing custom tests in other programming languages is possible
254254
if the test image follows the above guidelines.
255255

256256

257-
[cli-scorecard]: /docs/cli/operator-sdk_scorecard/
257+
[cli-scorecard]: /docs/cli/golang/operator-sdk_scorecard/
258258
[sample-config]: https://github.com/operator-framework/operator-sdk/blob/master/internal/scorecard/testdata/bundle/tests/scorecard/config.yaml
259259
[custom-image]: https://github.com/operator-framework/operator-sdk/blob/master/internal/scorecard/examples/custom-scorecard-tests
260260
[scorecard-struct]: https://github.com/operator-framework/operator-sdk/blob/master/pkg/apis/scorecard/v1alpha3/types.go
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
---
3+
title: "Building Operators"
4+
linkTitle: "Building Operators"
5+
weight: 3
6+
date: 2020-07-09
7+
description: >
8+
Building operators using Operator SDK.
9+
---
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: Ansible Based Operators
3-
weight: 20
2+
title: Ansible
3+
weight: 1
4+
description: Guide to building a Ansible Based Operator using Operator SDK
45
---
56

67
Ansible based operators run playbooks and roles to react to changes in tracked Kubernetes resources (usually CRs).

website/content/en/docs/ansible/development-tips.md renamed to website/content/en/docs/building-operators/ansible/development-tips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,4 +509,4 @@ operator. The `meta` fields can be accesses via dot notation in Ansible as so:
509509
[manage_status_proposal]:../../proposals/ansible-operator-status.md
510510
[time_pkg]:https://golang.org/pkg/time/
511511
[time_parse_duration]:https://golang.org/pkg/time/#ParseDuration
512-
[watches]:/docs/ansible/reference/watches
512+
[watches]:/docs/building-operators/ansible/reference/watches

0 commit comments

Comments
 (0)