Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigmapRefType = "configmap" ResourceModifierSupportedVersionV1 = "v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conditions ¶
type Conditions struct { Namespaces []string `json:"namespaces,omitempty"` GroupResource string `json:"groupResource"` ResourceNameRegex string `json:"resourceNameRegex,omitempty"` LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` Matches []MatchRule `json:"matches,omitempty"` }
func (*Conditions) Validate ¶
func (c *Conditions) Validate() error
type JSONMergePatch ¶ added in v1.12.2
type JSONMergePatch struct {
PatchData string `json:"patchData,omitempty"`
}
type JSONMergePatcher ¶ added in v1.12.2
type JSONMergePatcher struct {
// contains filtered or unexported fields
}
func (*JSONMergePatcher) Patch ¶ added in v1.12.2
func (p *JSONMergePatcher) Patch(u *unstructured.Unstructured, _ logrus.FieldLogger) (*unstructured.Unstructured, error)
type JSONPatch ¶
type JSONPatcher ¶ added in v1.12.2
type JSONPatcher struct {
// contains filtered or unexported fields
}
func (*JSONPatcher) Patch ¶ added in v1.12.2
func (p *JSONPatcher) Patch(u *unstructured.Unstructured, logger logrus.FieldLogger) (*unstructured.Unstructured, error)
type ResourceModifierRule ¶
type ResourceModifierRule struct { Conditions Conditions `json:"conditions"` Patches []JSONPatch `json:"patches,omitempty"` MergePatches []JSONMergePatch `json:"mergePatches,omitempty"` StrategicPatches []StrategicMergePatch `json:"strategicPatches,omitempty"` }
func (*ResourceModifierRule) Validate ¶
func (r *ResourceModifierRule) Validate() error
type ResourceModifiers ¶
type ResourceModifiers struct { Version string `json:"version"` ResourceModifierRules []ResourceModifierRule `json:"resourceModifierRules"` }
func GetResourceModifiersFromConfig ¶
func GetResourceModifiersFromConfig(cm *v1.ConfigMap) (*ResourceModifiers, error)
func (*ResourceModifiers) ApplyResourceModifierRules ¶
func (p *ResourceModifiers) ApplyResourceModifierRules(obj *unstructured.Unstructured, groupResource string, scheme *runtime.Scheme, log logrus.FieldLogger) []error
func (*ResourceModifiers) Validate ¶
func (p *ResourceModifiers) Validate() error
type StrategicMergePatch ¶ added in v1.12.2
type StrategicMergePatch struct {
PatchData string `json:"patchData,omitempty"`
}
type StrategicMergePatcher ¶ added in v1.12.2
type StrategicMergePatcher struct {
// contains filtered or unexported fields
}
func (*StrategicMergePatcher) Patch ¶ added in v1.12.2
func (p *StrategicMergePatcher) Patch(u *unstructured.Unstructured, _ logrus.FieldLogger) (*unstructured.Unstructured, error)
Click to show internal directories.
Click to hide internal directories.