Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployment controller handles events related to deployment creations.
func NewDeployment ¶
func NewDeployment(depsvc DeploymentSyncer) *Deployment
NewDeployment returns a new controller for Deployments. This controller keeps track of deployments being created and assure that they contain the right annotations if they leverage tags.
func (*Deployment) Name ¶
func (d *Deployment) Name() string
Name returns a name identifier for this controller.
type DeploymentSyncer ¶
type DeploymentSyncer interface { Sync(context.Context, *appsv1.Deployment) error Get(context.Context, string, string) (*appsv1.Deployment, error) AddEventHandler(cache.ResourceEventHandler) }
DeploymentSyncer abstraction exists to make testing easier. You most likely wanna see Deployment struct under services/deployment.go for a concrete implementation of this.
type DockerRequestPayload ¶
type DockerRequestPayload struct { PushData struct { Tag string `json:"tag"` } `json:"push_data"` Repository struct { Namespace string `json:"namespace"` Name string `json:"name"` } `json:"repository"` }
DockerRequestPayload is sent by docker hub whenever a new push happen to a repository.
type DockerWebHook ¶
type DockerWebHook struct {
// contains filtered or unexported fields
}
DockerWebHook handles docker.io requests.
func NewDockerWebHook ¶
func NewDockerWebHook(tagsvc TagGenerationUpdater) *DockerWebHook
NewDockerWebHook returns a web hook handler for docker.io webhooks.
func (*DockerWebHook) Name ¶
func (d *DockerWebHook) Name() string
Name returns a name identifier for this controller.
func (*DockerWebHook) ServeHTTP ¶
func (d *DockerWebHook) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles requests coming in from docker.io.
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric is our controller for metric requests. Spawns an http metric and exposes all metrics registered on prometheus.
type MetricReporter ¶
type MetricReporter interface {
ReportWorker(bool)
}
MetricReporter abstraction exists to make tests easier. You might be looking for its concrete implementation on services/metrics.go.
type MutatingWebHook ¶
type MutatingWebHook struct {
// contains filtered or unexported fields
}
MutatingWebHook handles Mutation requests from kubernetes api.
func NewMutatingWebHook ¶
func NewMutatingWebHook(tagsvc PodPatcher) *MutatingWebHook
NewMutatingWebHook returns a web hook handler for kubernetes api mutation requests.
func (*MutatingWebHook) Name ¶
func (m *MutatingWebHook) Name() string
Name returns a name identifier for this controller.
type PodPatcher ¶
type PodPatcher interface {
PatchForPod(pod corev1.Pod) ([]jsonpatch.JsonPatchOperation, error)
}
PodPatcher creates a patch for a pod resource, possibly overwritting tag references by their concrete location. You might want to look at the concrete implementation of this at services/tag.go.
type QuayRequestPayload ¶
type QuayRequestPayload struct { Name string `json:"name"` Repository string `json:"repository"` Namespace string `json:"namespace"` DockerURL string `json:"docker_url"` HomePage string `json:"homepage"` UpdatedTags []string `json:"updated_tags"` }
QuayRequestPayload holds the information sent by remote quay.io servers when a new push has happened to one of images.
type QuayWebHook ¶
type QuayWebHook struct {
// contains filtered or unexported fields
}
QuayWebHook handles quay.io requests.
func NewQuayWebHook ¶
func NewQuayWebHook(tagsvc TagGenerationUpdater) *QuayWebHook
NewQuayWebHook returns a web hook handler for quay webhooks.
func (*QuayWebHook) Name ¶
func (q *QuayWebHook) Name() string
Name returns a name identifier for this controller.
func (*QuayWebHook) ServeHTTP ¶
func (q *QuayWebHook) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles requests coming in from quay.io.
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
Tag controller handles events related to Tags. It starts and receives events from the informer, calling appropriate functions on our concrete services layer implementation.
func NewTag ¶
func NewTag( tagsvc TagSyncer, mtrsvc MetricReporter, ) *Tag
NewTag returns a new controller for Image Tags. This controller runs image tag imports in parallel, at a given time we can have at max "workers" distinct image tags being processed.
type TagGenerationUpdater ¶
TagGenerationUpdater exists to make tests easier. You may be wondering where this is implemented. Please see Tag struct in services/tag.go for a concrete implementation.
type TagSyncer ¶
type TagSyncer interface { Sync(context.Context, *imagtagv1.Tag) error Get(context.Context, string, string) (*imagtagv1.Tag, error) AddEventHandler(cache.ResourceEventHandler) }
TagSyncer abstraction exists to make testing easier. You most likely wanna see Tag struct under services/tag.go for a concrete implementation of this.