Documentation ¶
Index ¶
- type MapInterface
- type PatchApplier
- type PatchType
- type ResourcePatch
- type SchemaCache
- type SchemaManager
- func (m *SchemaManager) DuckType(gvk schema.GroupVersionKind, object *unstructured.Unstructured) error
- func (m *SchemaManager) FindSchemaForKind(gvk schema.GroupVersionKind) (*spec.Schema, bool, error)
- func (m *SchemaManager) FindTypeForKey(gvk schema.GroupVersionKind, key string) (*TypedField, error)
- func (m *SchemaManager) FindTypeForKeyFromSchema(schema *spec.Schema, key string) (*TypedField, error)
- type TemplateManager
- type TypedField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapInterface ¶ added in v0.1.2
type MapInterface map[string]interface{}
type PatchApplier ¶
type PatchApplier struct { Clientset *kubernetes.Clientset Log logr.Logger FuncMap template.FuncMap SchemaManager *SchemaManager }
func NewPatchApplier ¶
func NewPatchApplier(clientset *kubernetes.Clientset, schemaManager *SchemaManager, log logr.Logger) (*PatchApplier, error)
func (*PatchApplier) Apply ¶
func (p *PatchApplier) Apply(resource *unstructured.Unstructured, patchStr string, patchType PatchType) (*unstructured.Unstructured, error)
func (*PatchApplier) JSONPath ¶
func (p *PatchApplier) JSONPath(object interface{}, jsonpath string) string
func (*PatchApplier) KGet ¶
func (p *PatchApplier) KGet(path, jsonpath string) string
type ResourcePatch ¶
type ResourcePatch struct { Resource *unstructured.Unstructured Patch string Kind string APIVersion string PatchType PatchType }
type SchemaCache ¶ added in v0.1.7
type SchemaCache struct {
// contains filtered or unexported fields
}
func NewSchemaCache ¶ added in v0.1.7
func NewSchemaCache(clientset *kubernetes.Clientset, expire time.Duration, log logr.Logger) *SchemaCache
func (*SchemaCache) FetchResources ¶ added in v0.1.7
func (sc *SchemaCache) FetchResources() ([]*metav1.APIResourceList, error)
func (*SchemaCache) FetchSchema ¶ added in v0.1.7
func (sc *SchemaCache) FetchSchema() (*spec.Swagger, error)
type SchemaManager ¶ added in v0.1.2
type SchemaManager struct {
// contains filtered or unexported fields
}
func NewSchemaManager ¶ added in v0.1.2
func NewSchemaManager(clientset *kubernetes.Clientset, crdClient extapi.ApiextensionsV1beta1Interface) (*SchemaManager, error)
func NewSchemaManagerWithCache ¶ added in v0.1.7
func NewSchemaManagerWithCache(clientset *kubernetes.Clientset, crdClient extapi.ApiextensionsV1beta1Interface, cache *SchemaCache) (*SchemaManager, error)
func (*SchemaManager) DuckType ¶ added in v0.1.2
func (m *SchemaManager) DuckType(gvk schema.GroupVersionKind, object *unstructured.Unstructured) error
func (*SchemaManager) FindSchemaForKind ¶ added in v0.1.2
func (m *SchemaManager) FindSchemaForKind(gvk schema.GroupVersionKind) (*spec.Schema, bool, error)
func (*SchemaManager) FindTypeForKey ¶ added in v0.1.2
func (m *SchemaManager) FindTypeForKey(gvk schema.GroupVersionKind, key string) (*TypedField, error)
func (*SchemaManager) FindTypeForKeyFromSchema ¶ added in v0.1.2
func (m *SchemaManager) FindTypeForKeyFromSchema(schema *spec.Schema, key string) (*TypedField, error)
type TemplateManager ¶
type TemplateManager struct { Client *kommons.Client kubernetes.Interface Log logr.Logger PatchApplier *PatchApplier SchemaManager *SchemaManager }
func NewTemplateManager ¶
func NewTemplateManager(c *kommons.Client, log logr.Logger, cache *SchemaCache) (*TemplateManager, error)
func (*TemplateManager) Run ¶
func (tm *TemplateManager) Run(ctx context.Context, template *templatev1.Template) error
type TypedField ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.