Commit 6d344815 authored by Geoff Simmons's avatar Geoff Simmons

Update to client-go v0.20.13, and update other libraries as well.

For the client-go update, two changes were necessary:

- The workqueue MetricsProvider must satisfy a new interface.
- The getter method for Pods requires a context argument.

Other updates:

- go version 1.15
- Varnish 6.6.2
- debian buster base image
parent c8707e3d
ARG varnish_version=6.3.2
ARG varnish_version=6.6.2
# Build container
FROM debian:stretch-20200130-slim AS builder
FROM debian:buster-20220125-slim AS builder
RUN apt-get update -q && \
apt-get install -y -q debian-archive-keyring && \
apt-get install -y -q curl gnupg apt-transport-https pandoc && \
curl -L https://packagecloud.io/varnishcache/varnish63/gpgkey | apt-key add -
curl -L https://packagecloud.io/varnishcache/varnish66/gpgkey | apt-key add -
ARG varnish_version
ARG go_version=1.11
COPY ./container/varnishcache_varnish63.list /etc/apt/sources.list.d/
COPY ./container/stretch-backports.list /etc/apt/sources.list.d/
ARG go_version=1.15
COPY ./container/varnishcache_varnish66.list /etc/apt/sources.list.d/
COPY ./container/buster-backports.list /etc/apt/sources.list.d/
RUN apt-get update -q && \
apt-get install -y -q varnish-dev=${varnish_version}-1~stretch && \
apt-get -t stretch-backports install -y -q golang-${go_version}-go && \
apt-get -t stretch-backports install -y -q golang-golang-x-tools && \
apt-get install -y -q varnish-dev=${varnish_version}-1~buster && \
apt-get -t buster-backports install -y -q golang-${go_version}-go && \
apt-get -t buster-backports install -y -q golang-golang-x-tools && \
apt-get install -y -q git make && \
apt-get remove -y -q curl gnupg apt-transport-https && \
apt-get autoremove -y -q && apt-get clean && rm -rf /var/lib/apt/lists/*
......
deb http://deb.debian.org/debian buster-backports main
deb http://deb.debian.org/debian stretch-backports main
deb https://packagecloud.io/varnishcache/varnish63/debian/ stretch main
deb-src https://packagecloud.io/varnishcache/varnish63/debian/ stretch main
deb https://packagecloud.io/varnishcache/varnish66/debian/ buster main
deb-src https://packagecloud.io/varnishcache/varnish66/debian/ buster main
module code.uplex.de/uplex-varnish/k8s-vcl-reloader
go 1.15
require (
code.uplex.de/uplex-varnish/varnishapi v0.0.0-20191205154529-31e610a4139d
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/onsi/ginkgo v1.7.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/prometheus/client_golang v1.2.1
github.com/sirupsen/logrus v1.4.2
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.4.0 // indirect
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f // indirect
golang.org/x/net v0.0.0-20191116160921-f9c825593386 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/api v0.0.0-20191004102255-dacd7df5a50b
k8s.io/apimachinery v0.0.0-20191004074956-01f8b7d1121a
k8s.io/client-go v10.0.0+incompatible
k8s.io/klog v0.2.0 // indirect
k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
k8s.io/api v0.20.13
k8s.io/apimachinery v0.20.13
k8s.io/client-go v0.20.13
)
require github.com/imdario/mergo v0.3.6 // indirect
This diff is collapsed.
......@@ -75,7 +75,7 @@ func (promProvider) NewAddsMetric(name string) workqueue.CounterMetric {
return adds
}
func (promProvider) NewLatencyMetric(name string) workqueue.SummaryMetric {
func (promProvider) NewLatencyMetric(name string) workqueue.HistogramMetric {
label := make(map[string]string)
label["namespace"] = name
latency := prometheus.NewSummary(prometheus.SummaryOpts{
......@@ -90,7 +90,7 @@ func (promProvider) NewLatencyMetric(name string) workqueue.SummaryMetric {
return latency
}
func (promProvider) NewWorkDurationMetric(name string) workqueue.SummaryMetric {
func (promProvider) NewWorkDurationMetric(name string) workqueue.HistogramMetric {
label := make(map[string]string)
label["namespace"] = name
workDuration := prometheus.NewSummary(prometheus.SummaryOpts{
......@@ -122,7 +122,7 @@ func (promProvider) NewUnfinishedWorkSecondsMetric(
return unfinishedWorkDuration
}
func (promProvider) NewLongestRunningProcessorMicrosecondsMetric(
func (promProvider) NewLongestRunningProcessorSecondsMetric(
name string) workqueue.SettableGaugeMetric {
label := make(map[string]string)
......@@ -131,7 +131,7 @@ func (promProvider) NewLongestRunningProcessorMicrosecondsMetric(
Subsystem: workqSubsystem,
Namespace: namespace,
Name: "max_processor_seconds",
Help: "Time spent (in µsecs) by the longest running " +
Help: "Time spent (in secs) by the longest running " +
"processor in the workqueue",
ConstLabels: label,
})
......
......@@ -29,6 +29,7 @@
package apiclient
import (
"context"
"fmt"
api_v1 "k8s.io/api/core/v1"
......@@ -42,7 +43,7 @@ func (client *Client) podEvent(evtType, reason, msgFmt string,
if client.pod == nil {
noop := meta_v1.GetOptions{}
pod, err := client.client.CoreV1().Pods(client.podNs).
Get(client.podName, noop)
Get(context.TODO(), client.podName, noop)
if err != nil {
e := fmt.Errorf("Cannot retrieve Pod object for %s/%s,"+
" will not generate event(%s, %s): %v",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment