kustomize

package
v0.0.0-...-a751691 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2019 The Crossplane Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KustomizationPatcher

type KustomizationPatcher interface {
	Patch(resource.ParentResource, *types.Kustomization) error
}

A KustomizationPatcher is used to make modifications on Kustomization overlay object before the render.

type KustomizationPatcherChain

type KustomizationPatcherChain []KustomizationPatcher

KustomizationPatcherChain makes it easier to provide a list of KustomizationPatcher to be called in order.

func (KustomizationPatcherChain) Patch

type KustomizationPatcherFunc

type KustomizationPatcherFunc func(resource.ParentResource, *types.Kustomization) error

KustomizationPatcherFunc makes it easier to provide only a function as KustomizationPatcher

func (KustomizationPatcherFunc) Patch

type KustomizeEngine

type KustomizeEngine struct {
	// ResourcePath is the folder that the base resources reside in the
	// filesystem. It should be given as absolute path.
	ResourcePath string

	// Patcher contains the modifications that you'd like to make to
	// the overlay Kustomization object before calling kustomize.
	Patcher KustomizationPatcherChain
}

func NewKustomizeEngine

func NewKustomizeEngine(opt ...KustomizeOption) *KustomizeEngine

NewKustomizeEngine returns a KustomizeEngine object. rootPath should point to the folder where your base kustomization.yaml resides and patcher is the chain of KustomizationPatcher that makes modifications of Kustomization object.

func (*KustomizeEngine) Run

type KustomizeOption

type KustomizeOption func(*KustomizeEngine)

KustomizeOption is used to manipulate default KustomizeEngine parameters.

func AdditionalKustomizationPatcher

func AdditionalKustomizationPatcher(op ...KustomizationPatcher) KustomizeOption

AdditionalKustomizationPatcher allows you to append KustomizationPatcher objects to the patch pipeline.

func WithResourcePath

func WithResourcePath(path string) KustomizeOption

WithResourcePath allows you to specify a kustomization folder other than default.

type LabelPropagator

type LabelPropagator struct{}

LabelPropagator copies all labels of ParentResource to commonLabels of Kustomization object so that all rendered resources have those labels. It also adds name, namespace(if exists) and uid of the parent resource to the commonLabels property.

func NewLabelPropagator

func NewLabelPropagator() LabelPropagator

NewLabelPropagator returns a *LabelPropagator

func (LabelPropagator) Patch

type NamePrefixer

type NamePrefixer struct{}

NamePrefixer adds the name of the ParentResource as name prefix to be used in Kustomize.

func NewNamePrefixer

func NewNamePrefixer() NamePrefixer

NewNamePrefixer returns a new *NamePrefixer.

func (NamePrefixer) Patch

type NamespaceNamePrefixer

type NamespaceNamePrefixer struct{}

NamePrefixer adds the name of the ParentResource as name prefix to be used in Kustomize.

func NewNamespaceNamePrefixer

func NewNamespaceNamePrefixer() NamespaceNamePrefixer

NewNamePrefixer returns a new *NamePrefixer.

func (NamespaceNamePrefixer) Patch

type VariantFiller

type VariantFiller struct{}

VariantFiller fills the Variants that refer to the ParentResource with the correct name and namespace.

func NewVarReferenceFiller

func NewVarReferenceFiller() VariantFiller

NewNamePrefixer returns a new *NamePrefixer.

func (VariantFiller) Patch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL