Skip to content

Commit c5c5ad2

Browse files
authored
Merge pull request #294 from bshephar/controller-runtime
Controller runtime update
2 parents 82bdaed + e359625 commit c5c5ad2

23 files changed

+416
-1733
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.19-sdk-1.31
4+
tag: ci-build-root-golang-1.20-sdk-1.31

.github/workflows/build-telemetry-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1616
with:
1717
operator_name: telemetry
18-
go_version: 1.19.x
18+
go_version: 1.20.x
1919
operator_sdk_version: 1.31.0
2020
secrets:
2121
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}

.github/workflows/golangci-lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Install Go
1111
uses: actions/setup-go@v3
1212
with:
13-
go-version: 1.19.x
13+
go-version: 1.20.x
1414
- name: Checkout project code
1515
uses: actions/checkout@v3
1616
- name: Checkout openstack-k8s-operators-ci project
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v3
3434
with:
35-
go-version: 1.19.x
35+
go-version: 1.20.x
3636
- name: Checkout project code
3737
uses: actions/checkout@v3
3838
- name: Run golangci lint
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install Go
4949
uses: actions/setup-go@v3
5050
with:
51-
go-version: 1.19.x
51+
go-version: 1.20.x
5252
- name: Checkout project code
5353
uses: actions/checkout@v3
5454
- name: Run operator-lint

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.19
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.20
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33

44
# Build the manager binary
@@ -49,16 +49,16 @@ ARG IMAGE_TAGS="cn-openstack openstack"
4949

5050
# Labels required by upstream and osbs build system
5151
LABEL com.redhat.component="${IMAGE_COMPONENT}" \
52-
name="${IMAGE_NAME}" \
53-
version="${IMAGE_VERSION}" \
54-
summary="${IMAGE_SUMMARY}" \
55-
io.k8s.name="${IMAGE_NAME}" \
56-
io.k8s.description="${IMAGE_DESC}" \
57-
io.openshift.tags="${IMAGE_TAGS}"
52+
name="${IMAGE_NAME}" \
53+
version="${IMAGE_VERSION}" \
54+
summary="${IMAGE_SUMMARY}" \
55+
io.k8s.name="${IMAGE_NAME}" \
56+
io.k8s.description="${IMAGE_DESC}" \
57+
io.openshift.tags="${IMAGE_TAGS}"
5858
### DO NOT EDIT LINES ABOVE
5959

6060
ENV USER_UID=$USER_ID \
61-
OPERATOR_TEMPLATES=/usr/share/telemetry-operator/templates/
61+
OPERATOR_TEMPLATES=/usr/share/telemetry-operator/templates/
6262

6363
WORKDIR /
6464

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/telemetry-operator:latest
5555
IMG ?= $(DEFAULT_IMG)
5656
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
57-
ENVTEST_K8S_VERSION = 1.26
57+
ENVTEST_K8S_VERSION = 1.28
5858

5959
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6060
ifeq (,$(shell go env GOBIN))

api/bases/telemetry.openstack.org_metricstorages.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ spec:
269269
of compute resources required. If Requests is omitted
270270
for a container, it defaults to Limits if that is
271271
explicitly specified, otherwise to an implementation-defined
272-
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
272+
value. Requests cannot exceed Limits. More info:
273+
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
273274
type: object
274275
type: object
275276
selector:
@@ -1003,7 +1004,8 @@ spec:
10031004
description: 'Requests describes the minimum amount of compute
10041005
resources required. If Requests is omitted for a container,
10051006
it defaults to Limits if that is explicitly specified, otherwise
1006-
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1007+
to an implementation-defined value. Requests cannot exceed
1008+
Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
10071009
type: object
10081010
type: object
10091011
retention:
@@ -1023,6 +1025,12 @@ spec:
10231025
default: true
10241026
description: AlertingEnabled allows to enable or disable alertmanager
10251027
type: boolean
1028+
dataplaneNetwork:
1029+
default: ctlplane
1030+
description: DataplaneNetwork defines the network that will be
1031+
used to scrape dataplane node_exporter endpoints
1032+
pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]*[a-zA-Z0-9]$
1033+
type: string
10261034
scrapeInterval:
10271035
default: 30s
10281036
description: ScrapeInterval sets the interval between scrapes
@@ -1109,6 +1117,8 @@ spec:
11091117
- persistent
11101118
type: string
11111119
type: object
1120+
required:
1121+
- dataplaneNetwork
11121122
type: object
11131123
type: object
11141124
status:

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@ spec:
728728
of compute resources required. If Requests is
729729
omitted for a container, it defaults to Limits
730730
if that is explicitly specified, otherwise to
731-
an implementation-defined value. More info:
732-
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
731+
an implementation-defined value. Requests cannot
732+
exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
733733
type: object
734734
type: object
735735
selector:
@@ -1480,7 +1480,7 @@ spec:
14801480
compute resources required. If Requests is omitted for
14811481
a container, it defaults to Limits if that is explicitly
14821482
specified, otherwise to an implementation-defined value.
1483-
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
1483+
Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
14841484
type: object
14851485
type: object
14861486
retention:
@@ -1505,6 +1505,12 @@ spec:
15051505
default: true
15061506
description: AlertingEnabled allows to enable or disable alertmanager
15071507
type: boolean
1508+
dataplaneNetwork:
1509+
default: ctlplane
1510+
description: DataplaneNetwork defines the network that will
1511+
be used to scrape dataplane node_exporter endpoints
1512+
pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]*[a-zA-Z0-9]$
1513+
type: string
15081514
scrapeInterval:
15091515
default: 30s
15101516
description: ScrapeInterval sets the interval between scrapes
@@ -1593,6 +1599,8 @@ spec:
15931599
- persistent
15941600
type: string
15951601
type: object
1602+
required:
1603+
- dataplaneNetwork
15961604
type: object
15971605
type: object
15981606
type: object

api/go.mod

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,76 @@
11
module github.com/openstack-k8s-operators/telemetry-operator/api
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/onsi/ginkgo/v2 v2.14.0
77
github.com/onsi/gomega v1.30.0
8-
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240124141114-55d029e4658b
8+
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240214153927-179defb96a33
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240214144842-5dcac51e5b36
910
github.com/rhobs/observability-operator v0.0.20
10-
k8s.io/api v0.26.13
11-
k8s.io/apimachinery v0.26.13
12-
k8s.io/client-go v0.26.13
13-
sigs.k8s.io/controller-runtime v0.14.7
11+
k8s.io/api v0.28.3
12+
k8s.io/apimachinery v0.29.0
13+
k8s.io/client-go v0.28.3
14+
sigs.k8s.io/controller-runtime v0.16.4
1415
)
1516

1617
require (
1718
github.com/beorn7/perks v1.0.1 // indirect
1819
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1920
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
20-
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
21-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
22-
github.com/fsnotify/fsnotify v1.6.0 // indirect
21+
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
22+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
23+
github.com/fsnotify/fsnotify v1.7.0 // indirect
2324
github.com/go-logr/logr v1.4.1 // indirect
24-
github.com/go-logr/zapr v1.2.3 // indirect
25-
github.com/go-openapi/jsonpointer v0.20.0 // indirect
26-
github.com/go-openapi/jsonreference v0.20.2 // indirect
27-
github.com/go-openapi/swag v0.22.4 // indirect
25+
github.com/go-logr/zapr v1.3.0 // indirect
26+
github.com/go-openapi/jsonpointer v0.20.2 // indirect
27+
github.com/go-openapi/jsonreference v0.20.4 // indirect
28+
github.com/go-openapi/swag v0.22.9 // indirect
2829
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
2930
github.com/gogo/protobuf v1.3.2 // indirect
3031
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3132
github.com/golang/protobuf v1.5.3 // indirect
32-
github.com/google/gnostic v0.6.9 // indirect
33+
github.com/google/gnostic-models v0.6.8 // indirect
3334
github.com/google/go-cmp v0.6.0 // indirect
3435
github.com/google/gofuzz v1.2.0 // indirect
3536
github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect
36-
github.com/google/uuid v1.5.0 // indirect
37+
github.com/google/uuid v1.6.0 // indirect
3738
github.com/imdario/mergo v0.3.16 // indirect
3839
github.com/josharian/intern v1.0.0 // indirect
3940
github.com/json-iterator/go v1.1.12 // indirect
4041
github.com/mailru/easyjson v0.7.7 // indirect
41-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4242
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4343
github.com/modern-go/reflect2 v1.0.2 // indirect
4444
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4545
github.com/pkg/errors v0.9.1 // indirect
46-
github.com/prometheus/client_golang v1.16.0 // indirect
47-
github.com/prometheus/client_model v0.4.0 // indirect
48-
github.com/prometheus/common v0.44.0 // indirect
49-
github.com/prometheus/procfs v0.11.0 // indirect
46+
github.com/prometheus/client_golang v1.18.0 // indirect
47+
github.com/prometheus/client_model v0.5.0 // indirect
48+
github.com/prometheus/common v0.46.0 // indirect
49+
github.com/prometheus/procfs v0.12.0 // indirect
5050
github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3 // indirect
5151
github.com/spf13/pflag v1.0.5 // indirect
5252
go.uber.org/multierr v1.11.0 // indirect
5353
go.uber.org/zap v1.26.0 // indirect
54-
golang.org/x/net v0.20.0 // indirect
55-
golang.org/x/oauth2 v0.10.0 // indirect
56-
golang.org/x/sys v0.16.0 // indirect
57-
golang.org/x/term v0.16.0 // indirect
54+
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
55+
golang.org/x/net v0.21.0 // indirect
56+
golang.org/x/oauth2 v0.17.0 // indirect
57+
golang.org/x/sys v0.17.0 // indirect
58+
golang.org/x/term v0.17.0 // indirect
5859
golang.org/x/text v0.14.0 // indirect
59-
golang.org/x/time v0.3.0 // indirect
60-
golang.org/x/tools v0.17.0 // indirect
61-
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
62-
google.golang.org/appengine v1.6.7 // indirect
63-
google.golang.org/protobuf v1.31.0 // indirect
60+
golang.org/x/time v0.5.0 // indirect
61+
golang.org/x/tools v0.18.0 // indirect
62+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
63+
google.golang.org/appengine v1.6.8 // indirect
64+
google.golang.org/protobuf v1.32.0 // indirect
6465
gopkg.in/inf.v0 v0.9.1 // indirect
6566
gopkg.in/yaml.v2 v2.4.0 // indirect
6667
gopkg.in/yaml.v3 v3.0.1 // indirect
67-
k8s.io/apiextensions-apiserver v0.26.13 // indirect
68-
k8s.io/component-base v0.26.13 // indirect
69-
k8s.io/klog/v2 v2.100.1 // indirect
70-
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect
68+
k8s.io/apiextensions-apiserver v0.28.3 // indirect
69+
k8s.io/component-base v0.28.3 // indirect
70+
k8s.io/klog/v2 v2.120.1 // indirect
71+
k8s.io/kube-openapi v0.0.0-20240209001042-7a0d5b415232 // indirect
7172
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
7273
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
73-
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
74-
sigs.k8s.io/yaml v1.3.0 // indirect
74+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
75+
sigs.k8s.io/yaml v1.4.0 // indirect
7576
)

0 commit comments

Comments
 (0)