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 ¶
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.
Click to show internal directories.
Click to hide internal directories.