service

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

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

func NewBuilder added in v0.0.12

func NewBuilder(clientset *client.ConfigSet, s *Service) Builder

NewBuilder checks Service build method (tekton task) and returns corresponding builder interface

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) Delete

func (s *Service) Delete(clientset *client.ConfigSet) error

Delete removes knative service object

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

func (s *Service) Deploy(clientset *client.ConfigSet) (string, error)

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) Get

func (s *Service) Get(clientset *client.ConfigSet) (*servingv1.Service, error)

Get returns k8s object

func (*Service) GetObject added in v0.1.1

func (s *Service) GetObject(service *servingv1.Service) printer.Object

GetObject converts k8s object into printable structure

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

func (*Service) List

func (s *Service) List(clientset *client.ConfigSet) (*servingv1.ServiceList, error)

List returns k8s list object

func (*Service) ManifestToServices added in v0.0.11

func (s *Service) ManifestToServices(YAML string) ([]Service, error)

ManifestToServices parses and validates YAML manifest and returns an array of Service objects

Jump to

Keyboard shortcuts

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