pkg

package
v0.0.0-...-aff0aaa Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//StateIdle means there are no more changes pending
	StateIdle = "IDLE"
	//StateEndpointCreatePending means the endpoint is pending creation
	StateEndpointCreatePending = "ENDPOINT_CREATE_PENDING"
	//StateEndpointSubmitPending means the endpoint is pending submission
	StateEndpointSubmitPending = "ENDPOINT_SUBMIT_PENDING"
	//StateEndpointRolloutPending means the endpoint is pending rollout
	StateEndpointRolloutPending = "ENDPOINT_ROLLOUT_PENDING" // Pending Rollout

	Kind = "CloudEndpoint"
)

Variables

This section is empty.

Functions

func HealthzHandler

func HealthzHandler() func(w http.ResponseWriter, r *http.Request)

func Process

func Process(path string, kubeContext string) error

Process process the path containing a CloudEndpoints resource This is intended as the entrypoint when running in CLI mode.

func WebhookHandler

func WebhookHandler() func(w http.ResponseWriter, r *http.Request)

Types

type CloudEndpoint

type CloudEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CloudEndpointSpec             `json:"spec,omitempty"`
	Status            CloudEndpointControllerStatus `json:"status"`
}

CloudEndpoint is the custom resource definition structure.

type CloudEndpointConfigMapSpec

type CloudEndpointConfigMapSpec struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

CloudEndpointConfigMapSpec is the subspec for CloudEndpointSpec that contains a reference to a configMap containing the Open API spec

type CloudEndpointControllerRequestChildren

type CloudEndpointControllerRequestChildren struct {
}

CloudEndpointControllerRequestChildren is the children definition passed by the CompositeController request for the CloudEndpoint controller.

type CloudEndpointControllerState

type CloudEndpointControllerState string

CloudEndpointControllerState represents the string mapping of the possible controller states. See the const definition below for enumerated states.

type CloudEndpointControllerStatus

type CloudEndpointControllerStatus struct {
	LastAppliedSig string   `json:"lastAppliedSig"`
	StateCurrent   string   `json:"stateCurrent"`
	ConfigSubmit   string   `json:"configSubmit,omitempty"`
	ServiceRollout string   `json:"serviceRollout,omitempty"`
	Endpoint       string   `json:"endpoint"`
	Config         string   `json:"config"`
	IngressIP      string   `json:"ingressIP"`
	JWTAudiences   []string `json:"jwtAudiences"`
	ConfigMapHash  string   `json:"configMapHash"`
}

CloudEndpointControllerStatus is the status structure for the custom resource

type CloudEndpointSpec

type CloudEndpointSpec struct {
	Project              string                         `json:"project,omitempty"`
	Target               string                         `json:"target,omitempty"`
	TargetIngress        CloudEndpointTargetIngressSpec `json:"targetIngress,omitempty"`
	OpenAPISpec          string                         `json:"openAPISpec,omitempty"`
	OpenAPISpecConfigMap CloudEndpointConfigMapSpec     `json:"openAPISpecConfigMap"`
}

CloudEndpointSpec mirrors the IngressSpec with added IAPProjectAuthz spec and a custom Rules spec.

type CloudEndpointTargetIngressSpec

type CloudEndpointTargetIngressSpec struct {
	Name        string   `json:"name,omitempty"`
	Namespace   string   `json:"namespace,omitempty"`
	JWTServices []string `json:"jwtServices,omitempty"`
}

CloudEndpointTargetIngressSpec is the format for the targetIngress spec

type Config

type Config struct {
	Project    string
	ProjectNum string
	// contains filtered or unexported fields
}

Config is the configuration structure used by the LambdaController

var (
	ControllerConfig Config
)

TODO(jlewi): Do we really want globals?

func (*Config) LoadAndValidateCLIConfig

func (c *Config) LoadAndValidateCLIConfig() error

LoadAndValidateCLIConfig initializes the config when running as a CLI

func (*Config) LoadAndValidateControllerConfig

func (c *Config) LoadAndValidateControllerConfig() error

LoadAndValidateControllerConfig initializes the config when running in cluster as a metacontroller

type SyncRequest

type SyncRequest struct {
	Parent   CloudEndpoint                          `json:"parent"`
	Children CloudEndpointControllerRequestChildren `json:"children"`
}

SyncRequest describes the payload from the CompositeController hook

type SyncResponse

type SyncResponse struct {
	Status   CloudEndpointControllerStatus `json:"status"`
	Children []interface{}                 `json:"children"`
}

SyncResponse is the CompositeController response structure.

Jump to

Keyboard shortcuts

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