github.com/GoogleContainerTools/kpt-functions-catalog/thirdparty/kyaml/fnsdk (go): Package fnsdk provides an SDK for writing KRM functions in Go. The function specification is defined at: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md  Note: this package is an alpha package.  A KRM functions can generate, mutate or validate Kubernetes resources in a ResourceList.  The ResourceList type and the KubeObject type are the core part of this package. The ResourceList type maps to the ResourceList in the function spec. The KubeObject represent a kubernetes resource in a ResourceList, and it's the basic unit to perform most CRUD operations.  A KRM function does the following things:  In most cases, you only need to do #2 which is implementing a ResourceListProcessor and then pass it to AsMain. In the following example, we use ResourceListProcessorFunc that implements the ResourceListProcessor interface.  KubeObject hides all the details about yaml.Node and yaml.RNode. It is always recommended converting a KubeObject to a strong typed object or getting a field as a strong typed object. Then do the CRUD operation on the strong typed objects.
Keywords: config-as-data|config-management|configuration|configuration-management|continuous-integration|customization|gitops|kpt|krm|kubernetes|kustomize|policy|shift-left|shift-left-security|typescript|unix-philosophy|validation