Documentation ¶
Index ¶
- func NewSugaredLogger(config *Config) *zap.SugaredLogger
- type Config
- type Docker
- func (docker *Docker) ConvertImageNameToTag(ctx context.Context, imageName string) (string, error)
- func (docker *Docker) ConvertImageTagToName(ctx context.Context, imageTag string) (string, error)
- func (docker *Docker) GetAllImages(ctx context.Context) ([]string, error)
- func (docker *Docker) WatchForImagesChanges(ctx context.Context, watcherInfo *DockerImagesWatcher) error
- type DockerImagesWatcher
- type K8s
- func (k8s *K8s) IsClusterVersionSupported() error
- func (k8s *K8s) RegisterWatchForChanges(config *Config, watcher *K8sWatcher) error
- func (k8s *K8s) ReplaceImageForDeployment(ctx context.Context, namespace string, deploymentName string, ...) error
- func (k8s *K8s) ReplaceImageForStatefulset(ctx context.Context, namespace string, statefulsetName string, ...) error
- func (k8s *K8s) Run(ctx context.Context) error
- type K8sWatcher
- type Store
- func (s *Store) NewDockerImage(ctx context.Context, imageName string)
- func (s *Store) NewK8sDeployment(deployment *v1.Deployment)
- func (s *Store) NewK8sStatefulSet(statefulSet *v1.StatefulSet)
- func (s *Store) RemoveDockerImage(imageName string)
- func (s *Store) RemoveK8sDeployment(deployment *v1.Deployment)
- func (s *Store) RemoveK8sStatefulSet(statefulSet *v1.StatefulSet)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSugaredLogger ¶
func NewSugaredLogger(config *Config) *zap.SugaredLogger
Types ¶
type Config ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func NewDockerClient ¶
func (*Docker) ConvertImageNameToTag ¶
ConvertImageNameToTag converts the pretty docker image name to sha tag. e.g. alpine:3.10 -> sha256:f8c20f8bbcb684055b4fea470fdd169c86e87786940b3262335b12ec3adef418
func (*Docker) ConvertImageTagToName ¶
ConvertImageTagToName converts the sha tag to pretty docker image name. e.g. sha256:f8c20f8bbcb684055b4fea470fdd169c86e87786940b3262335b12ec3adef418 -> alpine:3.10
func (*Docker) GetAllImages ¶
func (*Docker) WatchForImagesChanges ¶
func (docker *Docker) WatchForImagesChanges(ctx context.Context, watcherInfo *DockerImagesWatcher) error
type DockerImagesWatcher ¶
type K8s ¶
type K8s struct {
// contains filtered or unexported fields
}
func NewK8sClient ¶
func NewK8sClient(logger *zap.SugaredLogger) (*K8s, error)
func (*K8s) IsClusterVersionSupported ¶
func (*K8s) RegisterWatchForChanges ¶
func (k8s *K8s) RegisterWatchForChanges(config *Config, watcher *K8sWatcher) error
RegisterWatchForChanges watches k8s resources for added or removed pods
func (*K8s) ReplaceImageForDeployment ¶
func (*K8s) ReplaceImageForStatefulset ¶
type K8sWatcher ¶
type K8sWatcher struct { OnAddDeployment func(deployment *appsV1.Deployment) OnRemoveDeployment func(deployment *appsV1.Deployment) OnAddStatefulSet func(statefulSet *appsV1.StatefulSet) OnRemoveStatefulSet func(statefulSet *appsV1.StatefulSet) }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) NewDockerImage ¶
func (*Store) NewK8sDeployment ¶
func (s *Store) NewK8sDeployment(deployment *v1.Deployment)
func (*Store) NewK8sStatefulSet ¶
func (s *Store) NewK8sStatefulSet(statefulSet *v1.StatefulSet)
func (*Store) RemoveDockerImage ¶
func (*Store) RemoveK8sDeployment ¶
func (s *Store) RemoveK8sDeployment(deployment *v1.Deployment)
func (*Store) RemoveK8sStatefulSet ¶
func (s *Store) RemoveK8sStatefulSet(statefulSet *v1.StatefulSet)
Click to show internal directories.
Click to hide internal directories.