Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Kind is the kind for this function.
Kind = "Patch"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PatchFn ¶
type PatchFn struct { // Kind is the API name. Must be PodEnvs. Kind string `yaml:"kind"` // APIVersion is the API version. Must be examples.kpt.dev/v1alpha1 APIVersion string `yaml:"apiVersion"` // Metadata defines instance metadata. Metadata v1alpha1.Metadata `yaml:"metadata"` // Spec defines the desired declarative configuration. Spec Spec `yaml:"spec"` }
PatchFn is a filter to apply patches to resources. The patches can be either strategic merge patch or JSON6902 patches. Patches can be targeted to resources a number of ways (name, matching resource type, labels). This allows for bulk applying a patch to multiple resources. The semantics should be the same as kustomize's patch transform:
https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/
This is based on the Patch struct used in kustomize to represent it https://github.com/kubernetes-sigs/kustomize/blob/f61b075d3bd670b7bcd5d58ce13e88a6f25977f2/api/types/patch.go
type Spec ¶
type Spec struct { // Patches is the content of the patches to apply Patches []string `json:"patches,omitempty" yaml:"patches,omitempty"` // Target points to the resources that the patch is applied to Selector *framework.Selector `json:"selector,omitempty" yaml:"selector,omitempty"` }
Spec is the spec for PatchFn.
Click to show internal directories.
Click to hide internal directories.