server

package
v0.0.0-...-a8c9c8d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.

Index

Constants

This section is empty.

Variables

View Source
var VERSION, BUILD_DATE, GIT_DESCRIPTION, GIT_REVISION string

Functions

func NewCommandStartCalicoServer

func NewCommandStartCalicoServer(out io.Writer) (*cobra.Command, error)

NewCommandStartMaster provides a CLI handler for 'start master' command

func PrepareServer

func PrepareServer(opts *CalicoServerOptions) (*apiserver.ProjectCalicoServer, error)

PrepareServer prepares the server for execution. After invoking the caller should run RunServer.

func RunServer

func RunServer(opts *CalicoServerOptions, server *apiserver.ProjectCalicoServer) error

RunServer runs the Calico API server. This blocks until stopped channel (passed in through options) is closed.

func Version

func Version() error

func WatchExtensionAuth

func WatchExtensionAuth(stopChan chan struct{}) (bool, error)

WatchExtensionAuth watches the ConfigMap extension-apiserver-authentication and returns true if its resource version changes or a watch event indicates it changed. The cfg is used to get a k8s client for getting and watching the ConfigMap. If stopChan is closed then the function will return no change.

func WriteSwaggerJSON

func WriteSwaggerJSON(handler *genericapiserver.APIServerHandler, path string)

Types

type CalicoServerOptions

type CalicoServerOptions struct {
	RecommendedOptions *genericoptions.RecommendedOptions

	// DisableAuth disables delegating authentication and authorization for testing scenarios
	DisableAuth bool

	// Print a swagger file at desired path and exit.
	PrintSwagger    bool
	SwaggerFilePath string

	// Enable Admission Controller support.
	EnableAdmissionController bool

	StopCh <-chan struct{}
}

CalicoServerOptions contains the aggregation of configuration structs for the calico server. It contains everything needed to configure a basic API server. It is public so that integration tests can access it.

func (*CalicoServerOptions) Complete

func (o *CalicoServerOptions) Complete() error

func (*CalicoServerOptions) Config

func (o *CalicoServerOptions) Config() (*apiserver.Config, error)

func (CalicoServerOptions) Validate

func (o CalicoServerOptions) Validate(args []string) error

Jump to

Keyboard shortcuts

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