Documentation ¶
Overview ¶
Copyright 2019 The Codefresh 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
- func ExecuteTemplate(tplStr string, data interface{}) (string, error)
- func KubeObjectsFromTemplates(templatesMap map[string]string, data interface{}, pattern string, ...) (map[string]runtime.Object, error)
- func ParseTemplates(templatesMap map[string]string, data interface{}, pattern string, ...) (map[string]string, error)
- type DeleteOptions
- type InstallOptions
- type KubeClientBuilder
- type MigrateOptions
- type Plugin
- type PluginBuilder
- type RuntimeConfiguration
- type StatusOptions
- type TestOptions
- type UpgradeOptions
- type Values
Constants ¶
const ( RuntimeEnvironmentPluginType = "runtime-environment" VenonaPluginType = "venona" MonitorAgentPluginType = "monitor-agent" VolumeProvisionerPluginType = "volume-provisioner" EnginePluginType = "engine" DefaultStorageClassNamePrefix = "dind-local-volumes-runner" RuntimeAttachType = "runtime-attach" AppProxyPluginType = "app-proxy" NetworkTesterPluginType = "network-tester" )
const ( // AppName - app name for config AppName = "runner" // TypeKubernetesDind - name for Kubernetes Dind runtimectl TypeKubernetesDind = "kubernetesDind" // StatusInstalled - status installed StatusInstalled = "Installed" // StatusNotInstalled - status installed StatusNotInstalled = "Not Installed" )
Variables ¶
This section is empty.
Functions ¶
func ExecuteTemplate ¶
ExecuteTemplate - executes templates in tpl str with config as values
func KubeObjectsFromTemplates ¶
func KubeObjectsFromTemplates(templatesMap map[string]string, data interface{}, pattern string, logger logger.Logger) (map[string]runtime.Object, error)
KubeObjectsFromTemplates return map of runtime.Objects from templateMap see https://github.com/kubernetes/client-go/issues/193 for examples
Types ¶
type DeleteOptions ¶
type DeleteOptions struct { KubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) } AgentKubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) } ClusterNamespace string // runtime AgentNamespace string // agent RuntimeEnvironment string RestartAgent bool }
type InstallOptions ¶
type InstallOptions struct { CodefreshHost string CodefreshToken string ClusterName string ClusterNamespace string ClusterHost string RegisterWithAgent bool MarkAsDefault bool StorageClass string DockerRegistry string IsDefaultStorageClass bool KubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) BuildConfig() (*rest.Config, error) EnsureNamespaceExists(ctx context.Context, cs *kubernetes.Clientset) error } AgentKubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) EnsureNamespaceExists(ctx context.Context, cs *kubernetes.Clientset) error } DryRun bool BuildNodeSelector map[string]string Annotations map[string]string RuntimeEnvironment string RuntimeNamespace string RuntimeServiceAccount string RestartAgent bool Insecure bool }
type KubeClientBuilder ¶
type KubeClientBuilder interface {
BuildClient() (*kubernetes.Clientset, error)
}
type MigrateOptions ¶
type MigrateOptions struct { ClusterName string ClusterNamespace string KubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) } }
type Plugin ¶
type Plugin interface { Install(context.Context, *InstallOptions, Values) (Values, error) Status(context.Context, *StatusOptions, Values) ([][]string, error) Delete(context.Context, *DeleteOptions, Values) error Upgrade(context.Context, *UpgradeOptions, Values) (Values, error) Migrate(context.Context, *MigrateOptions, Values) error Test(context.Context, *TestOptions, Values) error Name() string }
type PluginBuilder ¶
type PluginBuilder interface { Add(string) PluginBuilder Get() []Plugin }
func NewBuilder ¶
func NewBuilder(logger logger.Logger) PluginBuilder
type RuntimeConfiguration ¶
type StatusOptions ¶
type StatusOptions struct { KubeBuilder interface { BuildClient() (*kubernetes.Clientset, error) } ClusterNamespace string }