vsvc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package vsvc manages Versioned Microservices.

Index

Constants

View Source
const (
	// CustomResourceName is the name we'll use for the Versioned Microservice
	// CRD.
	CustomResourceName = "versionedmicroservice"

	// CustomResourceNamePlural is the plural version of CustomResourceName.
	CustomResourceNamePlural = "versionedmicroservices"
)

Variables

View Source
var (
	// CustomResource describes the CRD configuration for the VersionedMicroservice CRD.
	CustomResource = kubekit.CustomResource{
		Name:    CustomResourceName,
		Plural:  CustomResourceNamePlural,
		Group:   v1alpha1.GroupName,
		Version: v1alpha1.Version,
		Scope:   v1beta1.NamespaceScoped,
		Aliases: []string{"vsvc"},
		Object:  &v1alpha1.VersionedMicroservice{},
		Validation: &v1beta1.CustomResourceValidation{
			OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
				Properties: map[string]v1beta1.JSONSchemaProps{
					"spec": v1alpha1.VersionedMicroserviceValidationSchema,
				},
			},
		},
	}
)
View Source
var (
	// ErrMinMaxAvailabilitySet is used when the Availability Configuration has
	// both MinAvailabe and MaxUnavailable set.
	ErrMinMaxAvailabilitySet = errors.New("Can't have both MinAvailable and MaxUnavailable configured")
)

Functions

func DefaultAffinity

func DefaultAffinity(key, value string) *corev1.Affinity

DefaultAffinity creates a set of affinity rules for a specific service.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller represents the VersionedMicroserviceController. This controller takes care of creating, updating and deleting lower level Kubernetese components that are associated with a specific VersionedMicroservice.

func NewController

func NewController(cfg *rest.Config, cs kubernetes.Interface, namespace string) (*Controller, error)

NewController returns a new VersionedMicroservice Controller.

func (*Controller) Run

func (c *Controller) Run() error

Run runs the Controller in the background and sets up watchers to take action when the desired state is altered.

Jump to

Keyboard shortcuts

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