Skip to content

Commit

Permalink
Bump k8s to 1.29, Go to 1.22 and various dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Feb 28, 2024
1 parent a82de9e commit ca094b3
Show file tree
Hide file tree
Showing 52 changed files with 441 additions and 1,294 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coherence-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2023, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/istio-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/k8s-matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2020, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -40,42 +40,42 @@ jobs:
fail-fast: false
matrix:
matrixName:
- v1.29
- v1.28
- v1.27
- v1.26
- v1.25
- v1.24
- v1.23
- v1.22
- v1.21
include:
- matrixName: v1.29
k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.28
k8s: kindest/node:v1.28.7@sha256:9bc6c451a289cf96ad0bbaf33d416901de6fd632415b076ab05f5fa7e4f65c58
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.27
k8s: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
k8s: kindest/node:v1.27.11@sha256:681253009e68069b8e01aad36a1e0fa8cf18bb0ab3e5c4069b2e65cafdd70843
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.26
k8s: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
k8s: kindest/node:v1.26.14@sha256:5d548739ddef37b9318c70cb977f57bf3e5015e4552be4e27e57280a8cbb8e4f
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.25
k8s: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
k8s: kindest/node:v1.25.16@sha256:e8b50f8e06b44bb65a93678a65a26248fae585b3d3c2a669e5ca6c90c69dc519
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.24
k8s: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
k8s: kindest/node:v1.24.17@sha256:bad10f9b98d54586cba05a7eaa1b61c6b90bfc4ee174fdc43a7b75ca75c95e51
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.23
k8s: kindest/node:v1.23.17@sha256:e5fd1d9cd7a9a50939f9c005684df5a6d145e8d695e78463637b79464292e66c
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.22
k8s: kindest/node:v1.22.17@sha256:c8a828709a53c25cbdc0790c8afe12f25538617c7be879083248981945c38693
k8s: kindest/node:v1.23.17@sha256:14d0a9a892b943866d7e6be119a06871291c517d279aedb816a4b4bc0ec0a5b3
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.21
k8s: kindest/node:v1.21.14@sha256:27ef72ea623ee879a25fe6f9982690a3e370c68286f4356bf643467c552a3888
kindCommand: kind
runNetTests: false

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/minikube-matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2020, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -45,14 +45,16 @@ jobs:
- v1.26
- v1.25
include:
- matrixName: v1.29
k8s: v1.29.2
- matrixName: v1.28
k8s: v1.28.2
k8s: v1.28.6
- matrixName: v1.27
k8s: v1.27.6
k8s: v1.27.11
- matrixName: v1.26
k8s: v1.26.9
k8s: v1.26.14
- matrixName: v1.25
k8s: 1.25.14
k8s: 1.25.16

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -90,7 +92,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prometheus-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tanzu-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019, 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2022, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ COMPATIBLE_SELECTOR ?= control-plane=coherence
# The GitHub project URL
PROJECT_URL = https://github.com/oracle/coherence-operator

KUBERNETES_DOC_VERSION=v1.28
KUBERNETES_DOC_VERSION=v1.29

# ----------------------------------------------------------------------------------------------------------------------
# The Coherence image to use for deployments that do not specify an image
Expand Down
13 changes: 6 additions & 7 deletions api/v1/coherence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down Expand Up @@ -1201,7 +1201,6 @@ func (in *NamedPortSpec) CreateServiceMonitor(deployment CoherenceResource) *mon

endpoint := in.ServiceMonitor.CreateEndpoint()
endpoint.Port = in.Name
endpoint.TargetPort = nil
endpoint.RelabelConfigs = append(endpoint.RelabelConfigs, &monitoringv1.RelabelConfig{
Action: "labeldrop",
Regex: "(endpoint|instance|job|service)",
Expand Down Expand Up @@ -1275,10 +1274,10 @@ func (in *NamedPortSpec) GetDefaultAppProtocol() *string {
return nil
case strings.ToLower(in.Name) == PortNameMetrics:
// special case for well known port - metrics
return pointer.String(AppProtocolHttp)
return ptr.To(AppProtocolHttp)
case in.Port == 0 && strings.ToLower(in.Name) == PortNameManagement:
// special case for well known port - management
return pointer.String(AppProtocolHttp)
return ptr.To(AppProtocolHttp)
default:
return nil
}
Expand Down Expand Up @@ -1332,7 +1331,7 @@ type ServiceMonitorSpec struct {
// SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitorspec
// +optional
SampleLimit uint64 `json:"sampleLimit,omitempty"`
SampleLimit *uint64 `json:"sampleLimit,omitempty"`
// HTTP path to scrape for metrics.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +optional
Expand Down Expand Up @@ -1366,7 +1365,7 @@ type ServiceMonitorSpec struct {
// the Prometheus Operator.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +optional
BearerTokenSecret corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
// HonorLabels chooses the metric labels on collisions with target labels.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +optional
Expand Down Expand Up @@ -1844,7 +1843,7 @@ func (in *PortSpecWithSSL) AddSSLVolumesForPod(podTemplate *corev1.PodTemplateSp
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: *in.SSL.Secrets,
DefaultMode: pointer.Int32(int32(0777)),
DefaultMode: ptr.To(int32(0777)),
},
},
})
Expand Down
8 changes: 4 additions & 4 deletions api/v1/coherence_webhook.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
Expand All @@ -17,7 +17,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
logf "sigs.k8s.io/controller-runtime/pkg/log"
Expand Down Expand Up @@ -83,12 +83,12 @@ func SetCommonDefaults(in CoherenceResource) {
if spec.Coherence == nil {
var lpa = intstr.FromInt32(DefaultUnicastPortAdjust)
spec.Coherence = &CoherenceSpec{
LocalPort: pointer.Int32(DefaultUnicastPort),
LocalPort: ptr.To(DefaultUnicastPort),
LocalPortAdjust: &lpa,
}
} else {
if spec.Coherence.LocalPort == nil {
spec.Coherence.LocalPort = pointer.Int32(DefaultUnicastPort)
spec.Coherence.LocalPort = ptr.To(DefaultUnicastPort)
}
if spec.Coherence.LocalPortAdjust == nil {
lpa := intstr.FromInt32(DefaultUnicastPortAdjust)
Expand Down
8 changes: 4 additions & 4 deletions api/v1/coherence_webhook_job.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
Expand All @@ -13,7 +13,7 @@ import (
apiequality "k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
Expand Down Expand Up @@ -46,7 +46,7 @@ func (in *CoherenceJob) Default() {

// default to storage disabled to false
if coherenceSpec.StorageEnabled == nil {
coherenceSpec.StorageEnabled = pointer.Bool(false)
coherenceSpec.StorageEnabled = ptr.To(false)
}

// default the restart policy to never
Expand All @@ -57,7 +57,7 @@ func (in *CoherenceJob) Default() {
co := spec.Coherence
if co != nil {
if co.StorageEnabled == nil {
co.StorageEnabled = pointer.Bool(false)
co.StorageEnabled = ptr.To(false)
}
}

Expand Down
Loading

0 comments on commit ca094b3

Please sign in to comment.