Skip to content

Commit d24a16c

Browse files
Cut down amount of config-as-data elaboration in theory.md
- add descriptions to Hugo header elements in each doc to improve presentation in rendered site - copy rewrites of old config-as-data content back to the copies in relevant relevant_old_docs documents so as not to lose them - other minor tweaks from offline review comments
1 parent 4473ba4 commit d24a16c

File tree

7 files changed

+328
-441
lines changed

7 files changed

+328
-441
lines changed

content/en/docs/neo-porch/1_overview/relevant_old_docs/config-as-data.md

Lines changed: 140 additions & 112 deletions
Large diffs are not rendered by default.

content/en/docs/neo-porch/2_concepts/_index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ type: docs
44
weight: 1
55
---
66

7-
The Concepts section helps you learn about the abstractions Porch uses to store and orchestrate your kpt packages, with high-level descriptions of the repository management, package orchestration, and package revision lifecycle management use cases.
7+
The Concepts section helps you learn about the abstractions Porch uses to store and orchestrate your kpt packages, with
8+
high-level descriptions of the repository management, package orchestration, and package revision lifecycle management
9+
use cases.

content/en/docs/neo-porch/2_concepts/architectural.md

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: "Architectural Concepts"
33
type: docs
44
weight: 4
5+
description: |
6+
The architectual concepts behind Porch; Porch microservices and their primary components.
57
---
68

79
### High-Level CaD Architecture
@@ -25,8 +27,8 @@ At the high level, the CaD functionality comprises:
2527

2628
Porch consists of several microservices, designed to be hosted in a [Kubernetes](https://kubernetes.io/) cluster.
2729

28-
The overall architecture is shown below, including additional components external to Porch (Kubernetes API server and deployment
29-
mechanism).
30+
The overall architecture is shown below, including additional components external to Porch (Kubernetes API server and
31+
deployment mechanism).
3032

3133
![Porch Architecture](/static/images/porch/Porch-Architecture.drawio.svg)
3234

@@ -56,8 +58,8 @@ resources required for basic package authoring and lifeycle management, includin
5658
* `PackageRevision` - represents the *metadata* of the package revision stored in a repository.
5759
* `PackageRevisionResources` - represents the *file contents* of the package revision.
5860
{{% alert color="primary" %}}
59-
Note that each package revision is represented by a *pair* of resources, each presenting a different view
60-
(or [representation][differing representations])
61+
Note that each package revision is represented by both a `PackageRevision` and a `PackageRevisionResources` - each presents
62+
a different view (or [representation](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#differing-representations))
6163
of the same underlying package revision.
6264
{{% /alert %}}
6365
* A `Repository` [custom resource][crds], which supports repository registration.
@@ -81,12 +83,12 @@ The **Porch server** itself includes the following key components:
8183

8284
#### Function Runner
8385

84-
The **Function Runner** is a separate microservice responsible for evaluating [KRM functions][functions]. It exposes
85-
a [GRPC](https://grpc.io/) endpoint which enables evaluating a specified kpt function on a provided configuration package.
86+
The **Function Runner** is a separate microservice responsible for evaluating [KRM functions][functions]. It exposes a
87+
[GRPC](https://grpc.io/) endpoint which enables evaluating a specified kpt function on a provided configuration package.
8688

87-
GRPC was chosen for the function runner service because the [benefits of an API server](#porch-server) that prompted its use
88-
for the Porch server do not apply in this case. The function runner is an internal microservice, an implementation detail not exposed
89-
to external callers, which makes GRPC perfectly suitable.
89+
GRPC was chosen for the function runner service because the [benefits of an API server](#porch-server) that prompted its
90+
use for the Porch server do not apply in this case. The function runner is an internal microservice, an implementation
91+
detail not exposed to external callers, which makes GRPC perfectly suitable.
9092

9193
The function runner maintains a cache of functions to support low-latency function evaluation. It achieves this through
9294
two mechanisms available to it for evaluation of a function:
@@ -102,40 +104,17 @@ two mechanisms available to it for evaluation of a function:
102104
it can be re-used quickly as a cache hit. After a pre-configured period of disuse (default 30 minutes), the function
103105
runner terminates the function pod and its service, to recreate them from the start on the next invocation of that function.
104106

105-
#### CaD Library
107+
#### CaD (kpt) Operations
106108

107-
The [kpt](https://kpt.dev/) CLI already implements the fundamental package manipulation algorithms in order to provide its command line user experience:
108-
109-
* [kpt pkg init](https://kpt.dev/reference/cli/pkg/init/) - create a bare-bones, valid, kpt package.
110-
* [kpt pkg get](https://kpt.dev/reference/cli/pkg/get/) - create a downstream package by cloning an upstream package;
111-
set up the upstream reference of the downstream package.
112-
* [kpt pkg update](https://kpt.dev/reference/cli/pkg/update/) - update the downstream package with changes from new
113-
version of upstream, 3-way merge.
114-
* [kpt fn eval](https://kpt.dev/reference/cli/fn/eval/) - evaluate a KRM function on a package.
115-
* [kpt fn render](https://kpt.dev/reference/cli/fn/render/) - render the package by executing the function pipeline of
116-
the package and its nested packages.
117-
* [kpt fn source](https://kpt.dev/reference/cli/fn/source/) and [kpt fn sink](https://kpt.dev/reference/cli/fn/sink/) -
118-
read package from local disk as a `ResourceList` and write package represented as `ResourcesList` into local disk.
109+
The [kpt](https://kpt.dev/) CLI already implements the fundamental package manipulation algorithms (explained
110+
[in kpt documentation](https://kpt.dev/book/03-packages/)) in order to provide its command line user experience.
119111

120112
The same set of primitive operations form the foundational building blocks of the package orchestration service. Further,
121113
Porch combines these blocks into higher-level operations (for example, Porch renders packages automatically on changes;
122114
future versions will support bulk operations such as upgrade of multiple packages, etc.).
123115

124-
A longer-term goal is to refactor kpt and Porch to extract the package manipulation operations into a reusable CaD Library, which will consumed by both the kpt CLI and Porch to allow them equal reuse of the same operations:
125-
* create a valid empty package (init).
126-
* clone a package and add upstream pointers (get).
127-
* perform 3-way merge (upgrade).
128-
* render - core package rendering algorithm using a pluggable function evaluator to support:
129-
* function evaluation via Docker (as used by kpt CLI).
130-
* function evaluation via an RPC to a service or appropriate function sandbox.
131-
* high-performance evaluation of trusted, built-in, functions without sandbox.
132-
* heal configuration (restore comments after lossy transformation).
133-
134-
This approach will allow leveraging the investment already made into the high-quality package manipulation operations, maintain functional parity between the kpt CLI and Porch, and allow dependencies to be abstracted away which differ between CLI and Porch (most notably the dependency on Docker for function evaluation and on the local file system for package rendering).
135-
136116

137117
<!-- Reference links -->
138118
[apiserver]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/
139119
[crds]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
140-
[differing representations]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#differing-representations
141120
[functions]: https://kpt.dev/book/02-concepts/#functions

content/en/docs/neo-porch/2_concepts/fundamentals.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
title: "Porch Fundamentals"
33
type: docs
44
weight: 2
5+
description: |
6+
The fundamental topics necessary to understand Porch as "package orchestration" on a conceptual level.
57
---
68

79
## Core Concepts
810

9-
This document introduces some core concepts of Porch's package orchestration:
11+
Let us introduce some core concepts of Porch's package orchestration:
1012

1113
* ***Package***: A package, in Porch, is specifically a [kpt package](https://kpt.dev/) - a collection of related YAML
1214
files including one or more **[KRM resources][krm]** and a [Kptfile](https://kpt.dev/book/02-concepts/#packages).
@@ -25,9 +27,9 @@ a repository. Each successive version is considered a *package revision*.
2527

2628
* ***Lifecycle***: This refers to a package revision's current stage in the process of its orchestration by Porch. A package
2729
revision may be in one of several lifecycle stages:
28-
* ***Draft*** - the package is being created or edited. The package contents can be modified but the package revision
29-
is not ready to be used/deployed. Previously-published package revisions, reflecting earlier states of the package files,
30-
can still be deployed.
30+
* ***Draft*** - the package is being authored (created or edited). The package contents can be modified but the package
31+
revision is not ready to be used/deployed. Previously-published package revisions, reflecting earlier states of the
32+
package files, can still be deployed.
3133
* ***Proposed*** - intermediate state. The package's author has proposed that the package revision be published as a new
3234
version of the package with its files in the current state.
3335
* ***Published*** - the changes to the package have been approved and the package is ready to be used. Published packages
@@ -49,9 +51,9 @@ or validating the KRM resource files.
4951

5052
In addition, some terms may be used with specific qualifiers, frequently enough to count them as sub-concepts:
5153

52-
* ***Upstream package revision***: a package revision of an ***upstream package*** may be cloned, producing a new,
54+
* ***Upstream package revision***: a package revision of an ***upstream package*** may be *cloned*, producing a new,
5355
***downstream package*** and associated package revision. The downstream package maintains a link (URL) to the upstream
54-
package revision from which it was cloned. ([more details](#package-relationships---upstream-and-downstream))
56+
package revision from which it was cloned. [More details](#package-relationships---upstream-and-downstream)
5557

5658
* ***Deployment repository***: a repository can be designated as a deployment repository. Package revisions in *Published*
5759
state in a deployment repository are considered [deployment-ready]({{% relref "/docs/neo-porch/2_concepts/theory.md#deployment-mechanism" %}}).

0 commit comments

Comments
 (0)