Skip to content

Commit 2ce4294

Browse files
committed
Adopt use case categories
1 parent f01cfb9 commit 2ce4294

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ KPT Functions are client-side programs that make it easy to operate on a reposit
66

77
Use cases:
88

9-
- **Configuration Compliance:** e.g. Require all `Namespace` configurations to have a `cost-center` label.
9+
- **Configuration Validation:** e.g. Require all `Namespace` configurations to have a `cost-center` label.
1010
- **Configuration Generation:** e.g. Provide a blueprint for new services by generating a `Namespace` with organization-mandated defaults for `RBAC`, `ResourceQuota`, etc.
11-
- **Configuration Migration:** e.g. Update all `PodSecurityPolicy` configurations to improve the
11+
- **Configuration Transformation:** e.g. Update all `PodSecurityPolicy` configurations to improve the
1212
security posture.
1313

1414
![demo][demo-run]
@@ -17,8 +17,7 @@ KPT functions can be run locally or as part of a CI/CD pipeline.
1717

1818
In GitOps workflows, KPT functions read and write configuration files from a Git repo. Changes
1919
to the system authored by humans and mutating KPT functions are reviewed before being committed to the repo. KPT functions
20-
can be run as pre-commit or post-commit steps to check for compliance before configurations are
21-
applied to a cluster.
20+
can be run as pre-commit or post-commit steps to validate configurations before they are applied to a cluster.
2221

2322
## Next Steps
2423

docs/demo/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ wait
4949
git clean -fd
5050
clear
5151

52-
p "# Mutate configs"
52+
p "# Transform configs"
5353
pe "kpt fn source . |
5454
kpt fn run --image gcr.io/kpt-functions/mutate-psp |
5555
kpt fn sink ."
@@ -59,7 +59,7 @@ wait
5959
git reset HEAD --hard
6060
clear
6161

62-
p "# Enforce policy on configs"
62+
p "# Validate configs"
6363
pe "kpt fn source . |
6464
kpt fn run --image gcr.io/kpt-functions/validate-rolebinding -- [email protected]"
6565
wait

docs/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ docker run -i -u $(id -u) -v $(pwd):/sink gcr.io/kpt-functions/write-yaml -o /de
270270
Let's walk through each step:
271271
272272
1. `read-yaml` recursively reads all YAML files from the `foo-corp-configs` directory on the host.
273-
1. `mutate-psp` reads the output of `read-yaml`. This function **mutates** any `PodSecurityPolicy`
273+
1. `mutate-psp` reads the output of `read-yaml`. This function **transforms** any `PodSecurityPolicy`
274274
resources by setting the `allowPrivilegeEscalation` field to `false`.
275275
1. `expand-team-cr` similarly operates on the result of the previous function. It looks
276276
for Kubernetes custom resource of kind `Team`, and **generates** new resources based on that
277277
(e.g. `Namespaces` and `RoleBindings`).
278-
1. `validate-rolebinding` **enforces** a policy that disallows any `RoleBindings` with `subject`
278+
1. `validate-rolebinding` **validates** that there are no `RoleBindings` with `subject`
279279
set to `[email protected]`. This steps fails with a non-zero exit code if the policy is violated.
280280
1. `write-yaml` writes the result of the pipeline back to the `foo-corp-configs` directory on the host.
281281

0 commit comments

Comments
 (0)