service

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 25 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 (knative buildtemplate or tekton task) and returns corresponding builder interface

type Service

type Service struct {
	Annotations    map[string]string
	BuildArgs      []string
	BuildTimeout   string
	Concurrency    int
	Env            []string
	EnvSecrets     []string
	Labels         []string
	Name           string
	Namespace      string
	PullPolicy     string
	Registry       string
	Revision       string
	ResultImageTag string
	RegistrySecret string // Does not belong to the service, need to be deleted
	Runtime        string // Originally knative/buildtemplate, but now also tekton/task
	Source         string
	Cronjob        struct {
		Schedule string
		Data     string
	}
}

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) (*servingv1alpha1.Service, error)

func (*Service) List

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

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