plugins

package
v0.0.0-...-4eaa2e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 34 Imported by: 0

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

View Source
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"
)
View Source
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

func ExecuteTemplate(tplStr string, data interface{}) (string, error)

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

func ParseTemplates

func ParseTemplates(templatesMap map[string]string, data interface{}, pattern string, logger logger.Logger) (map[string]string, error)

ParseTemplates - parses and exexute templates and return map of strings with obj data

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 PluginBuilder

type PluginBuilder interface {
	Add(string) PluginBuilder
	Get() []Plugin
}

func NewBuilder

func NewBuilder(logger logger.Logger) PluginBuilder

type RuntimeConfiguration

type RuntimeConfiguration struct {
	Crt   string `yaml:"crt"`
	Token string `yaml:"token"`
	Host  string `yaml:"host"`
	Name  string `yaml:"name"`
	Type  string `yaml:"type"`
}

type StatusOptions

type StatusOptions struct {
	KubeBuilder interface {
		BuildClient() (*kubernetes.Clientset, error)
	}
	ClusterNamespace string
}

type TestOptions

type TestOptions struct {
	KubeBuilder interface {
		BuildClient() (*kubernetes.Clientset, error)
		BuildConfig() (*rest.Config, error)
		EnsureNamespaceExists(ctx context.Context, cs *kubernetes.Clientset) error
	}
	ClusterNamespace string
}

type UpgradeOptions

type UpgradeOptions struct {
	ClusterName      string
	ClusterNamespace string
	Name             string
	KubeBuilder      interface {
		BuildClient() (*kubernetes.Clientset, error)
	}
}

type Values

type Values map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL