forked from vmware-tanzu/sonobuoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vmware-tanzu#58 from abiogenesis-now/chuck/jsonnet
[docs][chuck] Example YAML generation using ksonnet and kubecfg Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com
- Loading branch information
Showing
19 changed files
with
731 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Documentation Index | ||
|
||
## Setting Up | ||
## Setting up | ||
* [Build From Scratch](build-from-scratch.md) | ||
* [Configuration](configuration.md) | ||
* [JSON templates](/examples) | ||
* [Pre-generated YAML](/examples/quickstart) | ||
* [Snapshot Layout](snapshot.md) | ||
|
||
## Use Cases | ||
* [Conformance Testing](conformance-testing.md) | ||
* [Plugins](plugins.md) | ||
|
||
## Developing Examples | ||
* [Generating Example JSON](building-examples.md) | ||
## Next Steps | ||
* [Generating your own YAML manifests](/examples/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
# Examples | ||
|
||
The YAML config files in this directory can be used to quickly deploy a containerized Sonobuoy pod. | ||
This directory contains two sub-directories: | ||
* [`/ksonnet`][4] - You can autogenerate Sonobuoy's YAML manifests with the [ksonnet][0] files in this directory. To do so, execute the `make generate-examples` command in the root of the Sonobuoy repo. | ||
|
||
* [`/quickstart`][5] - You can use the YAML config files in this directory to quickly deploy a containerized Sonobuoy pod. | ||
|
||
## /ksonnet | ||
|
||
Sonobuoy's `make generate-examples` command compiles `*.jsonnet` files into YAML. This compilation process uses the [`kubecfg`][2] executable in the [official ksonnet Docker image][1]. | ||
|
||
This sub-directory is itself broken down into: | ||
* `/components` - Each of the files in this directory covers a fairly distinct part of Sonobuoy's setup. The YAML that they generate is a more human-friendly way of viewing how Sonobuoy's component resources are set up. | ||
|
||
* `00-rbac.jsonnet` - This sets up basic scaffolding (e.g. a dedicated namespace). If RBAC is enabled on the cluster, it also configures the necessary permissions for Sonobuoy to read data and dispatch pods into the cluster. | ||
|
||
* `10-configmaps.jsonnet` - This sets up configurations for Sonobuoy as well as its plugins. The [configuration guide][3] explains in depth how to change these values. | ||
|
||
* `20-pod.jsonnet` - This sets up the pod that actually runs the `sonobuoy` executable. | ||
|
||
* `aggregate.jsonnet` - This combines all the `components` together to generate a standalone YAML file. As demonstrated in the README, the YAML file can be used to immediately take a Sonobuoy snapshot with `kubectl apply -f`. | ||
|
||
## /quickstart | ||
|
||
This directory structure maps 1:1 to that of the `/ksonnet` subdirectory (`*.yaml` instead of `*.jsonnet`), so the descriptions above should suffice. | ||
|
||
[0]: http://ksonnet.heptio.com | ||
[1]: https://hub.docker.com/r/ksonnet/ksonnet-lib/ | ||
[2]: https://github.com/ksonnet/kubecfg | ||
[3]: /docs/configuration.md | ||
[4]: #ksonnet | ||
[5]: #quickstart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2017 Heptio Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
local rbac = import "examples/ksonnet/components/00-rbac.jsonnet"; | ||
local configmaps = import "examples/ksonnet/components/10-configmaps.jsonnet"; | ||
local pod = import "examples/ksonnet/components/20-pod.jsonnet"; | ||
|
||
rbac + configmaps + pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.