Skip to content

Commit

Permalink
Update versions (#658)
Browse files Browse the repository at this point in the history
* Bump Operator version to 3.4.0

* Build against k8s 1.30.2

* Add k8s 1.30 to test matrix

* Update controller-gen and Kubstomize versions

* Update deprecated GitHub action versions

* Use kube-prometheus directly from main branch instead of released version
  • Loading branch information
thegridman authored Jul 1, 2024
1 parent 6ac72c9 commit e4bf43e
Show file tree
Hide file tree
Showing 52 changed files with 338 additions and 344 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,27 @@ jobs:
make e2e-helm-test
- name: Upload Manifests
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
if: success()
with:
name: coherence-operator-manifests.tar.gz
path: build/_output/coherence-operator-manifests.tar.gz

- name: Upload Yaml
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
if: success()
with:
name: coherence-operator.yaml
path: build/_output/coherence-operator.yaml

- name: Upload CRD
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
if: success()
with:
name: coherence.oracle.com_coherence.yaml
path: build/_output/manifests/crd/coherence.oracle.com_coherence.yaml

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output
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 @@ -212,7 +212,7 @@ jobs:
export TEST_LOGS_DIR=build/_output/test-logs/${{ matrix.matrixName }}
make coherence-compatibility-test
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.matrixName }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
fail-fast: false
matrix:
compatibilityVersion:
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
Expand All @@ -48,6 +49,10 @@ jobs:
- 3.2.7
- 3.2.6
include:
- compatibilityVersion: 3.3.5
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.7"
compatibilitySelector: control-plane=coherence
k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
- compatibilityVersion: 3.3.4
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.7"
compatibilitySelector: control-plane=coherence
Expand Down Expand Up @@ -187,7 +192,7 @@ jobs:
export COMPATIBLE_SELECTOR=${{ matrix.compatibilitySelector }}
make compatibility-test
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.compatibilityVersion }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/istio-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
make undeploy
ISTIO_VERSION=${{ matrix.istioVersion }} make uninstall-istio
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.istioVersion }}
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/k8s-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,35 @@ jobs:
fail-fast: false
matrix:
matrixName:
- v1.30
- v1.29
- v1.28
- v1.27
- v1.26
- v1.25
- v1.24
- v1.23
include:
- matrixName: v1.30
k8s: kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.29
k8s: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
k8s: kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.28
k8s: kindest/node:v1.28.7@sha256:9bc6c451a289cf96ad0bbaf33d416901de6fd632415b076ab05f5fa7e4f65c58
k8s: kindest/node:v1.28.9@sha256:dca54bc6a6079dd34699d53d7d4ffa2e853e46a20cd12d619a09207e35300bd0
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.27
k8s: kindest/node:v1.27.11@sha256:681253009e68069b8e01aad36a1e0fa8cf18bb0ab3e5c4069b2e65cafdd70843
k8s: kindest/node:v1.27.13@sha256:17439fa5b32290e3ead39ead1250dca1d822d94a10d26f1981756cd51b24b9d8
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.26
k8s: kindest/node:v1.26.14@sha256:5d548739ddef37b9318c70cb977f57bf3e5015e4552be4e27e57280a8cbb8e4f
k8s: kindest/node:v1.26.15@sha256:84333e26cae1d70361bb7339efb568df1871419f2019c80f9a12b7e2d485fe19
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.25
k8s: kindest/node:v1.25.16@sha256:e8b50f8e06b44bb65a93678a65a26248fae585b3d3c2a669e5ca6c90c69dc519
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.24
k8s: kindest/node:v1.24.17@sha256:bad10f9b98d54586cba05a7eaa1b61c6b90bfc4ee174fdc43a7b75ca75c95e51
kindCommand: kind-calico
runNetTests: true
- matrixName: v1.23
k8s: kindest/node:v1.23.17@sha256:14d0a9a892b943866d7e6be119a06871291c517d279aedb816a4b4bc0ec0a5b3
k8s: kindest/node:v1.25.16@sha256:5da57dfc290ac3599e775e63b8b6c49c0c85d3fec771cd7d55b45fae14b38d3b
kindCommand: kind-calico
runNetTests: true

Expand Down Expand Up @@ -160,7 +155,7 @@ jobs:
export RUN_NET_TEST=${{ matrix.runNetTests }}
./hack/k8s-certification.sh
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.matrixName }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/minikube-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
fail-fast: false
matrix:
matrixName:
- v1.29
- v1.28
- v1.27
- v1.26
Expand Down Expand Up @@ -139,7 +140,7 @@ jobs:
docker pull gcr.io/distroless/java17-debian11
./hack/k8s-certification.sh
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.matrixName }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prometheus-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
make kind-load
make e2e-prometheus-test
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tanzu-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ jobs:
make kind-load
make run-certification OPERATOR_NAMESPACE=coherence
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: tanzu-artifacts
path: build/_output/tanzu

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output
Expand Down
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
# ======================================================================================================================

# The version of the Operator being build - this should be a valid SemVer format
VERSION ?= 3.3.6
VERSION ?= 3.4.0
MVN_VERSION ?= $(VERSION)

# The version number to be replaced by this release
PREV_VERSION ?= 3.3.4
PREV_VERSION ?= 3.3.5

# The operator version to use to run certification tests against
CERTIFICATION_VERSION ?= $(VERSION)

# The previous Operator version used to run the compatibility tests.
COMPATIBLE_VERSION ?= 3.3.4
COMPATIBLE_VERSION ?= 3.3.5
# The selector to use to find Operator Pods of the COMPATIBLE_VERSION (do not put in double quotes!!)
COMPATIBLE_SELECTOR ?= control-plane=coherence

Expand All @@ -39,12 +39,13 @@ KUBERNETES_DOC_VERSION=v1.29
# ----------------------------------------------------------------------------------------------------------------------
# The Coherence version to build against - must be a Java 8 compatible version
COHERENCE_VERSION ?= 21.12.5
COHERENCE_VERSION_LTS ?= 22.06.7
COHERENCE_VERSION_LTS ?= 22.06.8
# The default Coherence image the Operator will run if no image is specified
COHERENCE_IMAGE_REGISTRY ?= ghcr.io/oracle
COHERENCE_IMAGE_NAME ?= coherence-ce
COHERENCE_IMAGE_TAG ?= $(COHERENCE_VERSION_LTS)
COHERENCE_IMAGE ?= $(COHERENCE_IMAGE_REGISTRY)/$(COHERENCE_IMAGE_NAME):$(COHERENCE_IMAGE_TAG)
COHERENCE_GROUP_ID ?= com.oracle.coherence.ce
# The Java version that tests will be compiled to.
# This should match the version required by the COHERENCE_IMAGE version
BUILD_JAVA_VERSION ?= 11
Expand Down Expand Up @@ -93,7 +94,7 @@ OPERATOR_SDK_VERSION := v1.9.0
# Options to append to the Maven command
# ----------------------------------------------------------------------------------------------------------------------
MAVEN_OPTIONS ?= -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3
MAVEN_BUILD_OPTS :=$(USE_MAVEN_SETTINGS) -Drevision=$(MVN_VERSION) -Dcoherence.version=$(COHERENCE_VERSION) -Dcoherence.version.2206=$(COHERENCE_VERSION_LTS) -Dcoherence.test.base.image=$(COHERENCE_TEST_BASE_IMAGE) -Dbuild.java.version=$(BUILD_JAVA_VERSION) $(MAVEN_OPTIONS)
MAVEN_BUILD_OPTS :=$(USE_MAVEN_SETTINGS) -Drevision=$(MVN_VERSION) -Dcoherence.version=$(COHERENCE_VERSION) -Dcoherence.version=$(COHERENCE_VERSION_LTS) -Dcoherence.groupId=$(COHERENCE_GROUP_ID) -Dcoherence.test.base.image=$(COHERENCE_TEST_BASE_IMAGE) -Dbuild.java.version=$(BUILD_JAVA_VERSION) $(MAVEN_OPTIONS)

# ----------------------------------------------------------------------------------------------------------------------
# Operator image names
Expand Down Expand Up @@ -338,7 +339,8 @@ TEST_SSL_SECRET := coherence-ssl-secret
# ----------------------------------------------------------------------------------------------------------------------
# Prometheus Operator settings (used in integration tests)
# ----------------------------------------------------------------------------------------------------------------------
PROMETHEUS_VERSION ?= v0.13.0
# The version of kube-prometheus to use (main = latest main branch from https://github.com/prometheus-operator/kube-prometheus)
PROMETHEUS_VERSION ?= main
PROMETHEUS_HOME = $(TOOLS_DIRECTORY)/prometheus/$(PROMETHEUS_VERSION)
PROMETHEUS_NAMESPACE ?= monitoring
PROMETHEUS_ADAPTER_VERSION ?= 2.5.0
Expand Down Expand Up @@ -1567,7 +1569,7 @@ create-ssl-secrets: $(BUILD_OUTPUT)/certs
##@ KinD

KIND_CLUSTER ?= operator
KIND_IMAGE ?= "kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245"
KIND_IMAGE ?= "kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e"
CALICO_TIMEOUT ?= 300s

# ----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1678,15 +1680,18 @@ $(TOOLS_BIN)/minikube:
ifeq (Darwin, $(UNAME_S))
ifeq (x86_64, $(UNAME_M))
curl -LOs https://storage.googleapis.com/minikube/releases/$(MINIKUBE_VERSION)/minikube-darwin-amd64
mkdir -p $(TOOLS_BIN) || true
install minikube-darwin-amd64 $(TOOLS_BIN)/minikube
rm minikube-darwin-amd64
else
curl -LOs https://storage.googleapis.com/minikube/releases/$(MINIKUBE_VERSION)/minikube-darwin-arm64
mkdir -p $(TOOLS_BIN) || true
install minikube-darwin-arm64 $(TOOLS_BIN)/minikube
rm minikube-darwin-arm64
endif
else
curl -LOs https://storage.googleapis.com/minikube/releases/$(MINIKUBE_VERSION)/minikube-linux-amd64
mkdir -p $(TOOLS_BIN) || true
install minikube-linux-amd64 $(TOOLS_BIN)/minikube
rm minikube-linux-amd64
endif
Expand Down Expand Up @@ -1843,14 +1848,14 @@ controller-gen: $(TOOLS_BIN)/controller-gen ## Download controller-gen locally i

$(TOOLS_BIN)/controller-gen:
@echo "Downloading controller-gen"
test -s $(TOOLS_BIN)/controller-gen || GOBIN=$(TOOLS_BIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0
test -s $(TOOLS_BIN)/controller-gen || GOBIN=$(TOOLS_BIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
ls -al $(TOOLS_BIN)

# ----------------------------------------------------------------------------------------------------------------------
# find or download kustomize
# ----------------------------------------------------------------------------------------------------------------------
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
KUSTOMIZE_VERSION ?= v3.8.7
KUSTOMIZE_VERSION ?= v5.4.2

.PHONY: kustomize
KUSTOMIZE = $(TOOLS_BIN)/kustomize
Expand Down Expand Up @@ -2024,7 +2029,11 @@ push-release-images: push-operator-image tanzu-repo
get-prometheus: $(PROMETHEUS_HOME)/$(PROMETHEUS_VERSION).txt ## Download Prometheus Operator kube-prometheus

$(PROMETHEUS_HOME)/$(PROMETHEUS_VERSION).txt: $(BUILD_PROPS)
ifeq (main, $(PROMETHEUS_VERSION))
curl -sL https://github.com/prometheus-operator/kube-prometheus/archive/main.tar.gz -o $(BUILD_OUTPUT)/prometheus.tar.gz --header $(GH_AUTH)
else
curl -sL https://github.com/prometheus-operator/kube-prometheus/archive/refs/tags/$(PROMETHEUS_VERSION).tar.gz -o $(BUILD_OUTPUT)/prometheus.tar.gz --header $(GH_AUTH)
endif
mkdir -p $(PROMETHEUS_HOME)
tar -zxf $(BUILD_OUTPUT)/prometheus.tar.gz --directory $(PROMETHEUS_HOME) --strip-components=1
rm $(BUILD_OUTPUT)/prometheus.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions api/v1/coherence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ func (in *NamedPortSpec) CreateServiceMonitor(deployment CoherenceResource) *mon

endpoint := in.ServiceMonitor.CreateEndpoint()
endpoint.Port = in.Name
endpoint.RelabelConfigs = append(endpoint.RelabelConfigs, &monitoringv1.RelabelConfig{
endpoint.RelabelConfigs = append(endpoint.RelabelConfigs, monitoringv1.RelabelConfig{
Action: "labeldrop",
Regex: "(endpoint|instance|job|service)",
})
Expand Down Expand Up @@ -1383,13 +1383,13 @@ type ServiceMonitorSpec struct {
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +listType=atomic
// +optional
MetricRelabelings []*monitoringv1.RelabelConfig `json:"metricRelabelings,omitempty"`
MetricRelabelings []monitoringv1.RelabelConfig `json:"metricRelabelings,omitempty"`
// Relabelings to apply to samples before scraping.
// More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +listType=atomic
// +optional
Relabelings []*monitoringv1.RelabelConfig `json:"relabelings,omitempty"`
Relabelings []monitoringv1.RelabelConfig `json:"relabelings,omitempty"`
// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
// See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
// +optional
Expand Down
20 changes: 6 additions & 14 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ commonLabels:
app.kubernetes.io/instance: coherence-operator-crd
app.kubernetes.io/name: coherence-operator
app.kubernetes.io/part-of: coherence-operator
app.kubernetes.io/version: 3.3.6
app.kubernetes.io/version: 3.4.0
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ resources:
images:
- name: controller
newName: ghcr.io/oracle/coherence-operator
newTag: 3.3.6
newTag: 3.4.0
Loading

0 comments on commit e4bf43e

Please sign in to comment.