Documentation ¶
Index ¶
- func IsRouteNoHostError(err error) bool
- func RenderChart(chartPath, namespace, kubeVersion string, values interface{}) (map[string][]manifest.Manifest, map[string]interface{}, error)
- func SortByKind(manifests []manifest.Manifest) []manifest.Manifest
- type ManifestProcessor
- type Patch
- type PatchFactory
- type SortOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRouteNoHostError ¶
func RenderChart ¶
func RenderChart(chartPath, namespace, kubeVersion string, values interface{}) (map[string][]manifest.Manifest, map[string]interface{}, error)
RenderChart renders the helm charts, returning a map of rendered templates. key names represent the chart from which the template was processed. Subcharts will be keyed as <root-name>/charts/<subchart-name>, e.g. istio/charts/galley. The root chart would be simply, istio.
Types ¶
type ManifestProcessor ¶
type ManifestProcessor struct { common.ControllerResources PatchFactory *PatchFactory // contains filtered or unexported fields }
func NewManifestProcessor ¶
func NewManifestProcessor(controllerResources common.ControllerResources, patchFactory *PatchFactory, appInstance, appVersion string, owner types.NamespacedName, preprocessObjectFunc func(ctx context.Context, obj *unstructured.Unstructured) (bool, error), postProcessObjectFunc func(ctx context.Context, obj *unstructured.Unstructured) error, preprocessObjectForPatchFunc func(ctx context.Context, oldObj, newObj *unstructured.Unstructured) (*unstructured.Unstructured, error), ) *ManifestProcessor
func (*ManifestProcessor) ProcessManifest ¶
func (*ManifestProcessor) ProcessManifests ¶
type Patch ¶
type Patch interface {
Apply(ctx context.Context) (*unstructured.Unstructured, error)
}
Patch represents a "patch" for an object
type PatchFactory ¶
type PatchFactory struct {
// contains filtered or unexported fields
}
PatchFactory wraps the objects needed to create Patch objects.
func NewPatchFactory ¶
func NewPatchFactory(k8sClient client.Client) *PatchFactory
NewPatchFactory creates a new PatchFactory
func (*PatchFactory) CreatePatch ¶
func (p *PatchFactory) CreatePatch(oldObj, newObj *unstructured.Unstructured) (Patch, error)
CreatePatch creates a patch based on the current and new versions of an object
type SortOrder ¶
type SortOrder []string
SortOrder is an ordering of Kinds.
var InstallOrder SortOrder = []string{
"Namespace",
"NetworkPolicy",
"ResourceQuota",
"LimitRange",
"PodSecurityPolicy",
"PodDisruptionBudget",
"Secret",
"ConfigMap",
"StorageClass",
"PersistentVolume",
"PersistentVolumeClaim",
"ServiceAccount",
"CustomResourceDefinition",
"ClusterRole",
"ClusterRoleList",
"ClusterRoleBinding",
"ClusterRoleBindingList",
"Role",
"RoleList",
"RoleBinding",
"RoleBindingList",
"Service",
"DaemonSet",
"Pod",
"ReplicationController",
"ReplicaSet",
"Deployment",
"HorizontalPodAutoscaler",
"StatefulSet",
"Job",
"CronJob",
"Ingress",
"APIService",
}
InstallOrder is the order in which manifests should be installed (by Kind).
Those occurring earlier in the list get installed before those occurring later in the list.
var UninstallOrder SortOrder = []string{
"APIService",
"Ingress",
"Service",
"CronJob",
"Job",
"StatefulSet",
"HorizontalPodAutoscaler",
"Deployment",
"ReplicaSet",
"ReplicationController",
"Pod",
"DaemonSet",
"RoleBindingList",
"RoleBinding",
"RoleList",
"Role",
"ClusterRoleBindingList",
"ClusterRoleBinding",
"ClusterRoleList",
"ClusterRole",
"CustomResourceDefinition",
"ServiceAccount",
"PersistentVolumeClaim",
"PersistentVolume",
"StorageClass",
"ConfigMap",
"Secret",
"PodDisruptionBudget",
"PodSecurityPolicy",
"LimitRange",
"ResourceQuota",
"NetworkPolicy",
"Namespace",
}
UninstallOrder is the order in which manifests should be uninstalled (by Kind).
Those occurring earlier in the list get uninstalled before those occurring later in the list.