Documentation ¶
Overview ¶
Package manifests contains the manifest code generator and some pre-supplied manifests (e.g. DNS)
Index ¶
- type KubeManifest
- type KubeManifestBase
- func (m *KubeManifestBase) ApplyToCluster(kubeconfig string) error
- func (m *KubeManifestBase) InitHealthCheck(kubeconfig string) error
- func (m *KubeManifestBase) IsHealthy() (bool, error)
- func (m *KubeManifestBase) Name() string
- func (m *KubeManifestBase) Register(manifest string)
- func (m *KubeManifestBase) RegisterHO(manifest string)
- func (m *KubeManifestBase) SetName(name string)
- type KubeManifestConstructor
- type KubeManifestRuntimeInfo
- type ManifestCodegen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeManifest ¶
type KubeManifest interface { // ApplyToCluster applies this manifest to the kubernetes cluster specified in 'kubeconfig' ApplyToCluster(kubeconfig string) error // IsHealthy checks whether the resources this manifest describes can be considered 'healthy' // You'll need to run InitHealthCheck first. IsHealthy() (bool, error) // InitHealthCheck prepares this object for health checks InitHealthCheck(kubeconfig string) error // Name returns the name of this object's service Name() string }
KubeManifest is implemented by all types that can be applied to a kube cluster as supported by KubeManifestBase
type KubeManifestBase ¶
type KubeManifestBase struct {
// contains filtered or unexported fields
}
KubeManifestBase is the base type for all autogenerated manifests, bundling common functionality
func (*KubeManifestBase) ApplyToCluster ¶
func (m *KubeManifestBase) ApplyToCluster(kubeconfig string) error
ApplyToCluster applies this manifest to the kubernetes cluster specified in 'kubeconfig'
func (*KubeManifestBase) InitHealthCheck ¶
func (m *KubeManifestBase) InitHealthCheck(kubeconfig string) error
InitHealthCheck prepares this object for health checks
func (*KubeManifestBase) IsHealthy ¶
func (m *KubeManifestBase) IsHealthy() (bool, error)
IsHealthy checks whether the resources this manifest describes can be considered 'healthy' You'll need to run InitHealthCheck first.
func (*KubeManifestBase) Name ¶
func (m *KubeManifestBase) Name() string
Name returns the name of this object's service
func (*KubeManifestBase) Register ¶
func (m *KubeManifestBase) Register(manifest string)
Register registers the manifest 'manifest' (JSON string) with this instance of KubeManifestBase. It is supposed to be only used by derived types!
func (*KubeManifestBase) RegisterHO ¶
func (m *KubeManifestBase) RegisterHO(manifest string)
RegisterHO registers the manifest 'manifest' (JSON string) as something to watch for a healthcheck with this instance of KubeManifestBase. It is supposed to be only used by derived types! Note that if you also want to create that object, you also need to call 'Register'. Only the last object registered will be considered.
func (*KubeManifestBase) SetName ¶
func (m *KubeManifestBase) SetName(name string)
Set name sets the name of this object's service and is only supposed to be used by derived types!
type KubeManifestConstructor ¶
type KubeManifestConstructor func(KubeManifestRuntimeInfo) (KubeManifest, error)
type KubeManifestRuntimeInfo ¶
type KubeManifestRuntimeInfo struct {
ExecEnv handlers.ExecutionEnvironment
}
KubeManifestRuntimeInfo contains all runtime information about the current environment (e.g. pod IP range...)
type ManifestCodegen ¶
type ManifestCodegen struct {
// contains filtered or unexported fields
}
ManifestCodegen is a code generator for generating golang structs from kubernetes manifest files
func NewManifestCodegen ¶
func NewManifestCodegen(source, pkg, name, dst, mainDest, mainPkgBase string) *ManifestCodegen
func (*ManifestCodegen) ParseFile ¶
func (m *ManifestCodegen) ParseFile() error
ParseFile parses the source file and populates 'entries' in 'm'
func (*ManifestCodegen) WriteFiles ¶
func (m *ManifestCodegen) WriteFiles() error
WriteFiles dumps all previously read information to 'm.dst', optionally writing a main function to 'mainDest'