svc

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: 18 Imported by: 0

Documentation

Overview

Package svc manages Microservices.

Index

Constants

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

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

Variables

View Source
var (
	// CustomResource describes the CRD configuration for the Microservice CRD.
	CustomResource = kubekit.CustomResource{
		Name:       CustomResourceName,
		Plural:     CustomResourceNamePlural,
		Group:      v1alpha1.GroupName,
		Version:    v1alpha1.Version,
		Scope:      v1beta1.NamespaceScoped,
		Aliases:    []string{"msvc"},
		Object:     &v1alpha1.Microservice{},
		Validation: v1alpha1.MicroserviceValidationSchema,
	}

	// AvailabilityPolicyResource describes the CRD configuration for the
	// AvailabilityPolicy CRD.
	AvailabilityPolicyResource = kubekit.CustomResource{
		Name:    "availabilitypolicy",
		Plural:  "availabilitypolicies",
		Group:   v1alpha1.GroupName,
		Version: v1alpha1.Version,
		Scope:   v1beta1.NamespaceScoped,
		Aliases: []string{"ap"},
		Object:  &v1alpha1.AvailabilityPolicy{},
		Validation: &v1beta1.CustomResourceValidation{
			OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
				Properties: map[string]v1beta1.JSONSchemaProps{
					"spec": v1alpha1.AvailabilityPolicyValidationSchema,
				},
			},
		},
	}

	// HealthPolicyResource describes the CRD configuration for the HealthPolicy CRD.
	HealthPolicyResource = kubekit.CustomResource{
		Name:       "healthpolicy",
		Plural:     "healthpolicies",
		Group:      v1alpha1.GroupName,
		Version:    v1alpha1.Version,
		Scope:      v1beta1.NamespaceScoped,
		Aliases:    []string{"hp"},
		Object:     &v1alpha1.HealthPolicy{},
		Validation: v1alpha1.HealthPolicyValidationSchema,
	}

	// SecurityPolicyResource describes the CRD configuration for the
	// SecurityPolicy CRD.
	SecurityPolicyResource = kubekit.CustomResource{
		Name:       "securitypolicy",
		Plural:     "securitypolicies",
		Group:      v1alpha1.GroupName,
		Version:    v1alpha1.Version,
		Scope:      v1beta1.NamespaceScoped,
		Aliases:    []string{"sp"},
		Object:     &v1alpha1.SecurityPolicy{},
		Validation: v1alpha1.SecurityPolicyValidationSchema,
	}
)

Functions

This section is empty.

Types

type Controller

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

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

func NewController

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

NewController returns a new Microservice 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