Documentation ¶
Index ¶
- func GetAllErrorsFromChain(err error) []error
- func GetKeyProvider(registry registry.Registry) (*keys.KeyProvider, error)
- func GetPublicKey(registry registry.Registry, dogu string) (*keys.PublicKey, error)
- func NewCommandExecutor(client kubernetes.Interface, coreV1RestClient rest.Interface) *exposedCommandExecutor
- func NewDoguSecretsWriter(client client.Client, registry registry.Registry) *doguSecretWriter
- func NewDoguStatusReporter(client client.Client) *doguStatusReporter
- type ErrorResourceState
- type ReportableError
- type ResourceGenerator
- func (r *ResourceGenerator) GetDoguDeployment(doguResource *k8sv1.Dogu, dogu *core.Dogu, customDeployment *appsv1.Deployment) (*appsv1.Deployment, error)
- func (r *ResourceGenerator) GetDoguExposedServices(doguResource *k8sv1.Dogu, dogu *core.Dogu) ([]corev1.Service, error)
- func (r *ResourceGenerator) GetDoguPVC(doguResource *k8sv1.Dogu) (*corev1.PersistentVolumeClaim, error)
- func (r *ResourceGenerator) GetDoguSecret(doguResource *k8sv1.Dogu, stringData map[string]string) (*corev1.Secret, error)
- func (r *ResourceGenerator) GetDoguService(doguResource *k8sv1.Dogu, imageConfig *imagev1.ConfigFile) (*corev1.Service, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllErrorsFromChain ¶
func GetKeyProvider ¶ added in v0.5.0
func GetKeyProvider(registry registry.Registry) (*keys.KeyProvider, error)
GetKeyProvider returns the key provider from the global configuration.
func GetPublicKey ¶ added in v0.5.0
GetPublicKey returns the public key from the dogu configuration.
func NewCommandExecutor ¶
func NewCommandExecutor(client kubernetes.Interface, coreV1RestClient rest.Interface) *exposedCommandExecutor
NewCommandExecutor creates a new instance of NewCommandExecutor
func NewDoguSecretsWriter ¶ added in v0.5.0
NewDoguSecretsWriter creates a new instance of doguSecretWriter to save key value pairs from secrets to the dogu config
func NewDoguStatusReporter ¶
NewDoguStatusReporter create a new instance of a dogu error reporter.
Types ¶
type ErrorResourceState ¶
type ErrorResourceState struct {
// contains filtered or unexported fields
}
ErrorResourceState is returned when a specific resource (pod/dogu) is not ready yet.
func (*ErrorResourceState) Error ¶
func (e *ErrorResourceState) Error() string
Report returns the error in string representation
func (*ErrorResourceState) Report ¶
func (e *ErrorResourceState) Report() string
Report constructs a simple human readable message
func (*ErrorResourceState) Requeue ¶
func (e *ErrorResourceState) Requeue() bool
Requeue determines if the current dogu operation should be requeue when this error was responsible for its failure
type ReportableError ¶
type ReportableError interface { // Report constructs a human readable message for the dogu resource status. Report() string }
ReportableError is used to identify all errors that are designed to report something into the dogu resource status.
type ResourceGenerator ¶
type ResourceGenerator struct {
// contains filtered or unexported fields
}
ResourceGenerator generate k8s resources for a given dogu. All resources will be referenced with the dogu resource as controller
func NewResourceGenerator ¶
func NewResourceGenerator(scheme *runtime.Scheme, limitPatcher limitPatcher) *ResourceGenerator
NewResourceGenerator creates a new generator for k8s resources
func (*ResourceGenerator) GetDoguDeployment ¶
func (r *ResourceGenerator) GetDoguDeployment(doguResource *k8sv1.Dogu, dogu *core.Dogu, customDeployment *appsv1.Deployment) (*appsv1.Deployment, error)
GetDoguDeployment creates a new instance of a deployment with a given dogu.json and dogu custom resource
func (*ResourceGenerator) GetDoguExposedServices ¶
func (r *ResourceGenerator) GetDoguExposedServices(doguResource *k8sv1.Dogu, dogu *core.Dogu) ([]corev1.Service, error)
GetDoguExposedServices creates a new instance of a LoadBalancer service for each exposed port.
func (*ResourceGenerator) GetDoguPVC ¶
func (r *ResourceGenerator) GetDoguPVC(doguResource *k8sv1.Dogu) (*corev1.PersistentVolumeClaim, error)
GetDoguPVC creates a persistent volume claim with a 5Gi storage for the given dogu
func (*ResourceGenerator) GetDoguSecret ¶
func (r *ResourceGenerator) GetDoguSecret(doguResource *k8sv1.Dogu, stringData map[string]string) (*corev1.Secret, error)
GetDoguSecret generates a secret with a given data map for the dogu
func (*ResourceGenerator) GetDoguService ¶
func (r *ResourceGenerator) GetDoguService(doguResource *k8sv1.Dogu, imageConfig *imagev1.ConfigFile) (*corev1.Service, error)
GetDoguService creates a new instance of a service with the given dogu custom resource and container image. The container image is used to extract the exposed ports