Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunUnitTests ¶
RunUnitTests executes (if found) tests reference by path. Writes test output to w.
Types ¶
type Command ¶
type Command string
Command is the type of the supported Isopod runtime command.
const ( // InstallCommand will rollout configurations of all chosen addons by // calling the install(ctx) method in each addon. InstallCommand Command = "install" // RemoveCommand will uninstall all chosen addons by // calling the remove(ctx) method in each addon. RemoveCommand Command = "remove" // ListCommand will list all chosen addons in the Starlark entry file. ListCommand Command = "list" // TestCommand will run Isopod in unit test mode with external services // stubbed with mocks. TestCommand Command = "test" // ClustersStarFunc is the name of the function in Starlark that returns // a list of Starlark built-ins that implement cloud.KubernetesVendor // interface. ClustersStarFunc = "clusters" // AddonsStarFunc is the name of the function in Starlark that returns // a list of addon() built-ins. AddonsStarFunc = "addons" )
type Config ¶
type Config struct { // EntryFile is the path to the main Starlark file that the // Isopod runtime initializes to. It must contains ClustersStarFunc // and AddonsStarFunc. EntryFile string // GCPSvcAcctKeyFile is the path to the Google Service Account // Credential file. It is used to authenticate with GKE clusters. GCPSvcAcctKeyFile string // UserAgent is the UserAgent name used by Isopod to communicate with all // Kubernetes masters. UserAgent string // KubeConfigPath is the path to the kubeconfig file on the local machine. // It is used to authenticate with self-managed or on-premise Kubernetes. KubeConfigPath string // DryRun is true if commands run in dry-run mode, which does not alter // the live configuration in the cluster. It will print YAML diff against // live objects in cluster. DryRun bool // Store is the storage to keep all rollout status. Store store.Store }
Config is used to create a new Runtime.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an interface that applies (enables) a specific option to a set of options.
func WithAddonRegex ¶
WithAddonRegex returns an Option that filters addons using supplied regex.
type Runtime ¶
type Runtime interface { // Load parses and resolves the main entry Starlark file. Load(ctx context.Context) error // Run starts the runtime and executes the given command in the main entry // Starlark file that has been loaded. The runtime will call AddonsStarFunc. Run(ctx context.Context, cmd Command, skyCtx starlark.Value) error // ForEachCluster calls the ClustersStarFunc in the main Starlark file with // userCtx as argument to get a list of Starlark built-ins that implement // the cloud.KubernetesVendor interface. It then iterates through each // cluster to call the user given fn. ForEachCluster(ctx context.Context, userCtx map[string]string, fn func(k8sVendor cloud.KubernetesVendor)) error }
Runtime describe the Isopod runtime behaviors.
Click to show internal directories.
Click to hide internal directories.