kubernetes-sigs / cluster-addons

Addon operators for Kubernetes clusters.
Apache License 2.0
155 stars 47 forks source link

MVP yaml transformation helper #89

Closed justinsb closed 3 years ago

justinsb commented 4 years ago

We've identified that we need to manipulate yaml bundles from various sources in order to split them up for RBAC, remove labels that indicate management by another tool, and generally transform them to make them suitable for our use.

Starting a simple CLI manipulation command, reusing the kustomization kyaml libraries which have the nice feature of preserving yaml comments.

So far the only command is remove-labels, which removes labels from a few well-known places.

Example:

cat pkg/xform/labels/testdata/remove-label/simple/input.yaml | go run . remove-label foo fooz

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, stealthybox

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cluster-addons/blob/master/OWNERS)~~ [justinsb,stealthybox] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment