Documentation ¶
Index ¶
- func Reverse(list []*rspb.Release, sortFn func([]*rspb.Release))
- func SortByDate(list []*rspb.Release)
- func SortByName(list []*rspb.Release)
- func SortByRevision(list []*rspb.Release)
- func SplitManifests(bigFile string) map[string]string
- type ByDate
- type ByName
- type ByRevision
- type FilterFunc
- type KindSortOrder
- type Manifest
- type SimpleHead
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortByDate ¶
SortByDate returns the list of releases sorted by a release's last deployed time (in seconds).
func SortByName ¶
SortByName returns the list of releases sorted in lexicographical order.
func SortByRevision ¶
SortByRevision returns the list of releases sorted by a release's revision number (release.Version).
func SplitManifests ¶
SplitManifests takes a string of manifest and returns a map contains individual manifests
Types ¶
type ByDate ¶
type ByDate struct {
// contains filtered or unexported fields
}
ByDate sorts releases by date
type ByName ¶
type ByName struct {
// contains filtered or unexported fields
}
ByName sorts releases by name
type ByRevision ¶
type ByRevision struct {
// contains filtered or unexported fields
}
ByRevision sorts releases by revision number
type FilterFunc ¶
FilterFunc returns true if the release object satisfies the predicate of the underlying filter func.
func All ¶
func All(filters ...FilterFunc) FilterFunc
All returns a FilterFunc that filters a list of releases determined by the predicate 'f0 && f1 && ... && fn'.
func Any ¶
func Any(filters ...FilterFunc) FilterFunc
Any returns a FilterFunc that filters a list of releases determined by the predicate 'f0 || f1 || ... || fn'.
func StatusFilter ¶
func StatusFilter(status rspb.Status) FilterFunc
StatusFilter filters a set of releases by status code.
type KindSortOrder ¶
type KindSortOrder []string
KindSortOrder is an ordering of Kinds.
var InstallOrder KindSortOrder = []string{
"Namespace",
"ResourceQuota",
"LimitRange",
"Secret",
"ConfigMap",
"StorageClass",
"PersistentVolume",
"PersistentVolumeClaim",
"ServiceAccount",
"CustomResourceDefinition",
"ClusterRole",
"ClusterRoleBinding",
"Role",
"RoleBinding",
"Service",
"DaemonSet",
"Pod",
"ReplicationController",
"ReplicaSet",
"Deployment",
"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 KindSortOrder = []string{
"APIService",
"Ingress",
"Service",
"CronJob",
"Job",
"StatefulSet",
"Deployment",
"ReplicaSet",
"ReplicationController",
"Pod",
"DaemonSet",
"RoleBinding",
"Role",
"ClusterRoleBinding",
"ClusterRole",
"CustomResourceDefinition",
"ServiceAccount",
"PersistentVolumeClaim",
"PersistentVolume",
"StorageClass",
"ConfigMap",
"Secret",
"LimitRange",
"ResourceQuota",
"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.
type Manifest ¶
type Manifest struct { Name string Content string Head *SimpleHead }
Manifest represents a manifest file, which has a name and some content.
func SortManifests ¶
func SortManifests(files map[string]string, apis chartutil.VersionSet, sort KindSortOrder) ([]*release.Hook, []Manifest, error)
SortManifests takes a map of filename/YAML contents, splits the file by manifest entries, and sorts the entries into hook types.
The resulting hooks struct will be populated with all of the generated hooks. Any file that does not declare one of the hook types will be placed in the 'generic' bucket.
Files that do not parse into the expected format are simply placed into a map and returned.
type SimpleHead ¶
type SimpleHead struct { Version string `json:"apiVersion"` Kind string `json:"kind,omitempty"` Metadata *struct { Name string `json:"name"` Annotations map[string]string `json:"annotations"` } `json:"metadata,omitempty"` }
SimpleHead defines what the structure of the head of a manifest file