Documentation
¶
Index ¶
- func CrdForAPIResource(apiResource metav1.APIResource, ...) *apiextv1b1.CustomResourceDefinition
- func CreateResources(cmdOut io.Writer, config *rest.Config, resources *typeResources, ...) error
- func DecodeYAML(r io.Reader, obj interface{}) error
- func DecodeYAMLFromFile(filename string, obj interface{}) error
- func DisableFederation(cmdOut io.Writer, config *rest.Config, typeConfigName ctlutil.QualifiedName, ...) error
- func GetResources(config *rest.Config, federateDirective *FederateDirective) (*typeResources, error)
- func LookupAPIResource(config *rest.Config, key, targetVersion string) (*metav1.APIResource, error)
- func NewCmdFederate(cmdOut io.Writer, config util.FedConfig) *cobra.Command
- func NewCmdFederateDisable(cmdOut io.Writer, config util.FedConfig) *cobra.Command
- func NewCmdFederateEnable(cmdOut io.Writer, config util.FedConfig) *cobra.Command
- func ValidationSchema(specProps v1beta1.JSONSchemaProps) *v1beta1.CustomResourceValidation
- type FederateDirective
- type FederateDirectiveSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrdForAPIResource ¶
func CrdForAPIResource(apiResource metav1.APIResource, validation *apiextv1b1.CustomResourceValidation) *apiextv1b1.CustomResourceDefinition
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 DecodeYAMLFromFile ¶ added in v0.0.4
func DisableFederation ¶
func GetResources ¶ added in v0.0.4
func GetResources(config *rest.Config, federateDirective *FederateDirective) (*typeResources, error)
func LookupAPIResource ¶
func NewCmdFederate ¶
NewCmdFederate creates a command object for the "federate" action, and adds all child commands to it.
func NewCmdFederateDisable ¶
NewCmdFederateDisable defines the `federate disable` command that disables federation of a Kubernetes API type.
func NewCmdFederateEnable ¶
NewCmdFederateEnable defines the `federate 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 FederateDirective ¶ added in v0.0.4
type FederateDirective struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FederateDirectiveSpec `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 NewFederateDirective ¶ added in v0.0.4
func NewFederateDirective() *FederateDirective
func (*FederateDirective) SetDefaults ¶ added in v0.0.4
func (ft *FederateDirective) SetDefaults()
type FederateDirectiveSpec ¶ added in v0.0.4
type FederateDirectiveSpec 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 primitives. // +optional PrimitiveGroup string `json:"primitiveGroup,omitempty"` // The API version to use for generated federation primitives. // +optional PrimitiveVersion string `json:"primitiveVersion,omitempty"` }
FederateDirectiveSpec defines the desired state of FederateDirective.