Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProjRootFlag = "root" KubeConfigFlag = "kubeconfig" NamespacedManPathFlag = "namespacedMan" GlobalManPathFlag = "globalMan" )
Variables ¶
This section is empty.
Functions ¶
func AddToFrameworkScheme ¶
AddToFrameworkScheme allows users to add the scheme for their custom resources to the framework's scheme for use with the dynamic client. The user provides the addToScheme function (located in the register.go file of their operator project) and the List struct for their custom resource. For example, for a memcached operator, the list stuct may look like:
&MemcachedList{ TypeMeta: metav1.TypeMeta{ Kind: "Memcached", APIVersion: "cache.example.com/v1alpha1", }, }
The List object is needed because the CRD has not always been fully registered by the time this function is called. If the CRD takes more than 5 seconds to become ready, this function throws an error
Types ¶
type Framework ¶
type Framework struct { KubeConfig *rest.Config KubeClient kubernetes.Interface ExtensionsClient *extensions.Clientset Scheme *runtime.Scheme RestMapper *discovery.DeferredDiscoveryRESTMapper DynamicClient dynclient.Client DynamicDecoder runtime.Decoder NamespacedManPath *string }
var ( // Global framework struct Global *Framework )
Source Files
¶
- context.go
- framework.go
- main_entry.go
- resource_creator.go
Click to show internal directories.
Click to hide internal directories.