Documentation
¶
Index ¶
- Variables
- type Builder
- type Service
- func (s *Service) Delete(clientset *client.ConfigSet) error
- func (s *Service) DeleteYAML(yamlFile string, functionsToDelete []string, threads int, ...) error
- func (s *Service) Deploy(clientset *client.ConfigSet) (string, error)
- func (s *Service) DeployFunctions(functions []Service, removeOrphans bool, threads int, ...) error
- func (s *Service) DeployYAML(yamlFile string, functionsToDeploy []string, threads int, ...) error
- func (s *Service) Get(clientset *client.ConfigSet) (*servingv1.Service, error)
- func (s *Service) GetObject(service *servingv1.Service) printer.Object
- func (s *Service) GetTable(list *servingv1.ServiceList) printer.Table
- func (s *Service) List(clientset *client.ConfigSet) (*servingv1.ServiceList, error)
- func (s *Service) ManifestToServices(YAML string) ([]Service, error)
Constants ¶
This section is empty.
Variables ¶
var Output io.Writer = os.Stdout
Output contains input-output writer interface
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.0.12
type Builder interface {
Deploy(clientset *client.ConfigSet) (string, error)
SetOwner(clientset *client.ConfigSet, owner metav1.OwnerReference) error
Delete(clientset *client.ConfigSet) error
}
Builder interface contains image build methods which are common for both tekton pipelines and knative builds
type Service ¶
type Service struct {
Annotations map[string]string
BuildArgs []string
BuildTimeout string
BuildOnly bool
Concurrency int
Env []string
EnvSecrets []string
Labels []string
Name string
Namespace string
PullPolicy string
Revision string
ResultImageTag string
// Originally knative/buildtemplate, but now also tekton/task
Runtime string
Source string
// TODO: get rid of file package dependency
Schedule []file.Schedule
}
Service represents knative service structure
func (*Service) DeleteYAML ¶
func (s *Service) DeleteYAML(yamlFile string, functionsToDelete []string, threads int, clientset *client.ConfigSet) error
DeleteYAML creates deletion worker pool and removes functions listed in provided YAML manifest
func (*Service) Deploy ¶
Deploy receives Service structure and generate knative/service object to deploy it in knative cluster
func (*Service) DeployFunctions ¶ added in v0.0.11
func (s *Service) DeployFunctions(functions []Service, removeOrphans bool, threads int, clientset *client.ConfigSet) error
DeployFunctions creates a deployment worker pool, reads provided Service array and if service is in list to deploy, sends it to the worker pool with given concurrency rate. After deployment it checks which functions from current service are left untouched and removes them as orphans
func (*Service) DeployYAML ¶
func (s *Service) DeployYAML(yamlFile string, functionsToDeploy []string, threads int, clientset *client.ConfigSet) error
DeployYAML accepts service YAML manifest and deploys it to cluster
func (*Service) GetTable ¶ added in v0.1.1
func (s *Service) GetTable(list *servingv1.ServiceList) printer.Table
GetTable converts k8s list instance into printable object