federate

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResources added in v0.0.4

func CreateResources(cmdOut io.Writer, config *rest.Config, resources *typeResources, namespace string) error

TODO(marun) Allow updates to the configuration for a type that has already been enabled for federation. This would likely involve updating the version of the target type and the validation of the schema.

func DecodeYAML added in v0.0.4

func DecodeYAML(r io.Reader, obj interface{}) error

func DecodeYAMLFromFile added in v0.0.4

func DecodeYAMLFromFile(filename string, obj interface{}) error

func DisableFederation

func DisableFederation(cmdOut io.Writer, config *rest.Config, typeConfigName ctlutil.QualifiedName, delete, dryRun bool) error

func GetResources added in v0.0.4

func GetResources(config *rest.Config, enableTypeDirective *EnableTypeDirective) (*typeResources, error)

func LookupAPIResource

func LookupAPIResource(config *rest.Config, key, targetVersion string) (*metav1.APIResource, error)

func NewCmdTypeDisable added in v0.0.5

func NewCmdTypeDisable(cmdOut io.Writer, config util.FedConfig) *cobra.Command

NewCmdTypeDisable defines the `disable` command that disables federation of a Kubernetes API type.

func NewCmdTypeEnable added in v0.0.5

func NewCmdTypeEnable(cmdOut io.Writer, config util.FedConfig) *cobra.Command

NewCmdTypeEnable defines the `enable` command that enables federation of a Kubernetes API type.

func ValidationSchema added in v0.0.4

func ValidationSchema(specProps v1beta1.JSONSchemaProps) *v1beta1.CustomResourceValidation

Types

type EnableTypeDirective added in v0.0.5

type EnableTypeDirective struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec EnableTypeDirectiveSpec `json:"spec,omitempty"`
}

TODO(marun) This should become a proper API type and drive enabling type federation via a controller. For now its only purpose is to enable loading of configuration from disk.

func NewEnableTypeDirective added in v0.0.5

func NewEnableTypeDirective() *EnableTypeDirective

func (*EnableTypeDirective) SetDefaults added in v0.0.5

func (ft *EnableTypeDirective) SetDefaults()

type EnableTypeDirectiveSpec added in v0.0.5

type EnableTypeDirectiveSpec struct {
	// The API version of the target type.
	// +optional
	TargetVersion string `json:"targetVersion,omitempty"`

	// Which field of the target type determines whether federation
	// considers two resources to be equal.
	ComparisonField common.VersionComparisonField `json:"comparisonField"`

	// The name of the API group to use for generated federation types.
	// +optional
	FederationGroup string `json:"federationGroup,omitempty"`

	// The API version to use for generated federation types.
	// +optional
	FederationVersion string `json:"federationVersion,omitempty"`
}

EnableTypeDirectiveSpec defines the desired state of EnableTypeDirective.

Jump to

Keyboard shortcuts

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