Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerResourcesSelector ¶
type ContainerResourcesSelector struct {
// Type information of the resources to consider.
resid.Gvk `json:",inline,omitempty"`
// Namespace of the resources to consider.
Namespace string `json:"namespace,omitempty"`
// Name of the resources to consider.
Name string `json:"name,omitempty"`
// Annotation selector of resources to consider.
AnnotationSelector string `json:"annotationSelector,omitempty"`
// Label selector of resources to consider.
LabelSelector string `json:"labelSelector,omitempty"`
// Path to the list of containers.
Path string `json:"path,omitempty"`
// Create container resource specifications even if the original object does not contain them.
CreateIfNotPresent bool `json:"create,omitempty"`
// Regular expression matching the container name.
ContainerName string `json:"containerName,omitempty"`
}
ContainerResourcesSelector identifies zero or more container resources specifications. NOTE: This object is basically a combination of a Kustomize FieldSpec and a Selector.
func DefaultContainerResourcesSelectors ¶
func DefaultContainerResourcesSelectors() []ContainerResourcesSelector
DefaultContainerResourcesSelectors returns the default container resource selectors. These selectors match the default role created by the `grant_permissions` code.
type Generator ¶
type Generator struct {
// The definition of the application to generate an experiment for.
Application redskyappsv1alpha1.Application
// ContainerResourcesSelectors are the selectors for determining what application resources to scan for resources lists.
ContainerResourcesSelectors []ContainerResourcesSelector
// ReplicaSelectors are the selectors for determining what application resources to scan for desired replica counts.
ReplicaSelectors []ReplicaSelector
// contains filtered or unexported fields
}
Generator generates an application experiment.
func (*Generator) Generate ¶
Generate scans the application and produces a list of Kubernetes objects representing an the experiment
func (*Generator) SetDefaultSelectors ¶
func (g *Generator) SetDefaultSelectors()
SetDefaultSelectors adds the default selectors to the generator.
type ReplicaSelector ¶
type ReplicaSelector struct {
// Type information of the resources to consider.
resid.Gvk `json:",inline,omitempty"`
// Namespace of the resources to consider.
Namespace string `json:"namespace,omitempty"`
// Name of the resources to consider.
Name string `json:"name,omitempty"`
// Annotation selector of resources to consider.
AnnotationSelector string `json:"annotationSelector,omitempty"`
// Label selector of resources to consider.
LabelSelector string `json:"labelSelector,omitempty"`
// Path to the replica field.
Path string `json:"path,omitempty"`
// Create container resource specifications even if the original object does not contain them.
CreateIfNotPresent bool `json:"create,omitempty"`
}
ReplicaSelector identifies zero or more replica specifications. NOTE: This object is basically a combination of a Kustomize FieldSpec and a Selector.
func DefaultReplicaSelectors ¶
func DefaultReplicaSelectors() []ReplicaSelector
DefaultReplicaSelectors returns the default replica selectors. These selectors match the default role created by the `grant_permissions` code.