Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 73 additions & 44 deletions .github/workflows/coherence-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ jobs:
fail-fast: false
matrix:
matrixName:
# - "15.1.1-0-SNAPSHOT"
# - "15.1.1-0-SNAPSHOT-Graal"
- "15.1.1-0-SNAPSHOT"
- "15.1.1-0-SNAPSHOT-Graal"
- "25.03"
- "25.03-Graal"
- "14.1.2-0"
# - "14.1.2-0-SNAPSHOT"
- "14.1.2-0-SNAPSHOT"
- "22.06"
# - "14.1.1-2206-SNAPSHOT"
# - "14.1.1-0-SNAPSHOT"
- "14.1.1-2206-SNAPSHOT"
- "14.1.1-0-SNAPSHOT"
- "14.1.1-0"
- "14.1.1.0.0"
- "12.2.1.4.0"
# - "12.2.1-4-SNAPSHOT"
- "12.2.1-4-SNAPSHOT"
include:
# - matrixName: "15.1.1-0-SNAPSHOT"
# coherenceVersion: "15.1.1-0-0-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-0-SNAPSHOT-java17"
# javaVersion: 17
# coherenceIsJava8: false
# baseImage: "gcr.io/distroless/java17-debian12"
- matrixName: "15.1.1-0-SNAPSHOT"
coherenceVersion: "15.1.1-0-3-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-3-SNAPSHOT-java17"
javaVersion: 17
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java17-debian12"

# - matrixName: "15.1.1-0-SNAPSHOT-Graal"
# coherenceVersion: "15.1.1-0-0-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-0-SNAPSHOT-graal"
# javaVersion: 17
# coherenceIsJava8: false
# baseImage: "gcr.io/distroless/java17-debian12"
- matrixName: "15.1.1-0-SNAPSHOT-Graal"
coherenceVersion: "15.1.1-0-3-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:15.1.1-0-3-SNAPSHOT-graal"
javaVersion: 17
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java17-debian12"

- matrixName: "25.03"
coherenceVersion: "25.03.2"
Expand All @@ -76,12 +76,12 @@ jobs:
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java17-debian12"

# - matrixName: "14.1.2-0-SNAPSHOT"
# coherenceVersion: "14.1.2-0-3-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.2-0-3-SNAPSHOT"
# javaVersion: 17
# coherenceIsJava8: false
# baseImage: "gcr.io/distroless/java17-debian12"
- matrixName: "14.1.2-0-SNAPSHOT"
coherenceVersion: "14.1.2-0-7-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.2-0-7-SNAPSHOT"
javaVersion: 17
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java17-debian12"

- matrixName: "14.1.2-0"
coherenceVersion: "14.1.2-0-2"
Expand All @@ -97,19 +97,19 @@ jobs:
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java11-debian11"

# - matrixName: "14.1.1-2206-SNAPSHOT"
# coherenceVersion: "14.1.1-2206-13-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-2206-13-SNAPSHOT"
# javaVersion: 11
# coherenceIsJava8: false
# baseImage: "gcr.io/distroless/java11-debian11"
#
# - matrixName: "14.1.1-0-SNAPSHOT"
# coherenceVersion: "14.1.1-0-21-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-0-21-SNAPSHOT"
# javaVersion: 11
# coherenceIsJava8: false
# baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "14.1.1-2206-SNAPSHOT"
coherenceVersion: "14.1.1-2206-17-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-2206-17-SNAPSHOT"
javaVersion: 11
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java11-debian11"

- matrixName: "14.1.1-0-SNAPSHOT"
coherenceVersion: "14.1.1-0-26-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:14.1.1-0-26-SNAPSHOT"
javaVersion: 11
coherenceIsJava8: false
baseImage: "gcr.io/distroless/java11-debian11"

- matrixName: "14.1.1-0"
coherenceVersion: "14.1.1-0-22"
Expand All @@ -132,12 +132,12 @@ jobs:
coherenceIsJava8: true
baseImage: "gcr.io/distroless/java11-debian11"

# - matrixName: "12.2.1-4-SNAPSHOT"
# coherenceVersion: "12.2.1-4-26-SNAPSHOT"
# coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:12.2.1-4-26-SNAPSHOT"
# javaVersion: 8
# coherenceIsJava8: true
# baseImage: "gcr.io/distroless/java11-debian11"
- matrixName: "12.2.1-4-SNAPSHOT"
coherenceVersion: "12.2.1-4-30-SNAPSHOT"
coherenceImage: "iad.ocir.io/odx-stateservice/test/coherence:12.2.1-4-30-SNAPSHOT"
javaVersion: 8
coherenceIsJava8: true
baseImage: "gcr.io/distroless/java11-debian11"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
else
echo "Skipping OCR login because this matrix image is not hosted by container-registry.oracle.com"
fi
# docker login "${{ secrets.OCI_REGISTRY }}" -u "${{ secrets.OCI_USERNAME }}" -p "${{ secrets.OCI_PASSWORD }}"
docker login "${{ secrets.OCI_REGISTRY }}" -u "${{ secrets.OCI_USERNAME }}" -p "${{ secrets.OCI_PASSWORD }}"
docker pull gcr.io/distroless/java
docker pull gcr.io/distroless/java11-debian11
docker pull gcr.io/distroless/java17-debian11
Expand Down Expand Up @@ -257,6 +257,35 @@ jobs:
export TEST_LOGS_DIR=build/_output/test-logs/${{ matrix.matrixName }}
make coherence-compatibility-test

- name: Collect failure diagnostics
if: ${{ failure() || cancelled() }}
shell: bash
continue-on-error: true
run: |
DIAG_DIR="build/_output/test-logs/${{ matrix.matrixName }}/diagnostics"
mkdir -p "${DIAG_DIR}"

collect() {
local name="$1"
shift
echo "Collecting ${name}"
{
echo "$ $*"
"$@"
} > "${DIAG_DIR}/${name}.log" 2>&1 || true
}

collect nodes kubectl get nodes -o wide
collect pods-all-namespaces kubectl get pods -A -o wide
collect events-all-namespaces kubectl get events -A --sort-by=.lastTimestamp
collect operator-test-all kubectl -n operator-test get all
collect operator-pods kubectl -n operator-test get pod -l control-plane=coherence -o wide
collect operator-pod-describe kubectl -n operator-test describe pod -l control-plane=coherence
collect operator-logs kubectl -n operator-test logs -l control-plane=coherence --all-containers --prefix --tail=-1
collect operator-logs-previous kubectl -n operator-test logs -l control-plane=coherence --all-containers --previous --prefix --tail=-1
collect coherence-crds kubectl get crd coherence.coherence.oracle.com coherencejob.coherence.oracle.com
collect coherence-resources kubectl get coherence.coherence.oracle.com,coherencejob.coherence.oracle.com -A

- uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/prometheus-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,40 @@ jobs:
df -h
make e2e-prometheus-test

- name: Collect failure diagnostics
if: ${{ failure() || cancelled() }}
shell: bash
continue-on-error: true
run: |
DIAG_DIR="build/_output/test-logs/diagnostics"
mkdir -p "${DIAG_DIR}"

collect() {
local name="$1"
shift
echo "Collecting ${name}"
{
echo "$ $*"
"$@"
} > "${DIAG_DIR}/${name}.log" 2>&1 || true
}

collect nodes kubectl get nodes -o wide
collect pods-all-namespaces kubectl get pods -A -o wide
collect events-all-namespaces kubectl get events -A --sort-by=.lastTimestamp
collect operator-test-all kubectl -n operator-test get all
collect operator-pods kubectl -n operator-test get pod -l control-plane=coherence -o wide
collect operator-deployment kubectl -n operator-test get deployment coherence-operator-controller-manager -o yaml
collect operator-pod-describe kubectl -n operator-test describe pod -l control-plane=coherence
collect operator-logs kubectl -n operator-test logs -l control-plane=coherence --all-containers --prefix --tail=-1
collect operator-logs-previous kubectl -n operator-test logs -l control-plane=coherence --all-containers --previous --prefix --tail=-1
collect monitoring-all kubectl -n monitoring get all
collect monitoring-pods kubectl -n monitoring get pod -o wide
collect monitoring-pod-describe kubectl -n monitoring describe pod
collect prometheus-logs kubectl -n monitoring logs -l app.kubernetes.io/name=prometheus --all-containers --prefix --tail=500
collect coherence-crds kubectl get crd coherence.coherence.oracle.com coherencejob.coherence.oracle.com
collect coherence-resources kubectl get coherence.coherence.oracle.com,coherencejob.coherence.oracle.com -A

- uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.26.2
1.26.3
30 changes: 20 additions & 10 deletions api/v1/coherence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,16 +1062,22 @@ type SSLSpec struct {
// This value MUST be provided if SSL is enabled on the Coherence management over REST endpoint.
// +optional
Secrets *string `json:"secrets,omitempty"`
// Keystore is the name of the Java key store file in the k8s secret to use as the SSL keystore
// when configuring component over REST to use SSL.
// Keystore is the Java key store value used as the SSL keystore when configuring component
// over REST to use SSL. When Secrets is set this is a file name in that k8s secret;
// without Secrets it is an explicit path in the container, which lets users provide
// externally mounted stores without rewriting them as secret keys.
// +optional
KeyStore *string `json:"keyStore,omitempty"`
// KeyStorePasswordFile is the name of the file in the k8s secret containing the keystore
// password when configuring component over REST to use SSL.
// KeyStorePasswordFile is the file containing the keystore password when configuring
// component over REST to use SSL. When Secrets is set this is a file name in that k8s
// secret; without Secrets it is an explicit path in the container read by the
// operator's FileBasedPasswordProvider.
// +optional
KeyStorePasswordFile *string `json:"keyStorePasswordFile,omitempty"`
// KeyStorePasswordFile is the name of the file in the k8s secret containing the key
// password when configuring component over REST to use SSL.
// KeyPasswordFile is the file containing the key password when configuring component over
// REST to use SSL. When Secrets is set this is a file name in that k8s secret; without
// Secrets it is an explicit path in the container read by the operator's
// FileBasedPasswordProvider.
// +optional
KeyPasswordFile *string `json:"keyPasswordFile,omitempty"`
// KeyStoreAlgorithm is the name of the keystore algorithm for the keystore in the k8s secret
Expand All @@ -1086,12 +1092,16 @@ type SSLSpec struct {
// when configuring component over REST to use SSL. If not set the default is JKS.
// +optional
KeyStoreType *string `json:"keyStoreType,omitempty"`
// TrustStore is the name of the Java trust store file in the k8s secret to use as the SSL
// trust store when configuring component over REST to use SSL.
// TrustStore is the Java trust store value used as the SSL trust store when configuring
// component over REST to use SSL. When Secrets is set this is a file name in that k8s
// secret; without Secrets it is an explicit path in the container, which keeps trust-only
// configurations independent from the keystore settings.
// +optional
TrustStore *string `json:"trustStore,omitempty"`
// TrustStorePasswordFile is the name of the file in the k8s secret containing the trust store
// password when configuring component over REST to use SSL.
// TrustStorePasswordFile is the file containing the trust store password when configuring
// component over REST to use SSL. When Secrets is set this is a file name in that k8s
// secret; without Secrets it is an explicit path in the container read by the
// operator's FileBasedPasswordProvider.
// +optional
TrustStorePasswordFile *string `json:"trustStorePasswordFile,omitempty"`
// TrustStoreAlgorithm is the name of the keystore algorithm for the trust store in the k8s
Expand Down
8 changes: 1 addition & 7 deletions api/v1/coherenceresource_types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2025, Oracle and/or its affiliates.
* Copyright (c) 2020, 2026, 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 @@ -63,12 +63,6 @@ const (

type CoherenceType string

// The package init function that will automatically register the Coherence resource types with
// the default k8s Scheme.
func init() {
SchemeBuilder.Register(&Coherence{}, &CoherenceList{}, &CoherenceJob{}, &CoherenceJobList{})
}

// ----- Coherence type ------------------------------------------------------------------

var _ CoherenceResource = &Coherence{}
Expand Down
20 changes: 16 additions & 4 deletions api/v1/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates.
* Copyright (c) 2020, 2026, 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 @@ -10,17 +10,29 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "coherence.oracle.com", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// SchemeBuilder stays on apimachinery's registration path so importing the API package
// avoids the deprecated controller-runtime helper while preserving AddToScheme behavior.
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

func addKnownTypes(scheme *runtime.Scheme) error {
// Registering the root API objects here keeps scheme setup explicit for this group/version,
// which replaces the deprecated controller-runtime object-registration helper.
scheme.AddKnownTypes(GroupVersion, &Coherence{}, &CoherenceList{}, &CoherenceJob{}, &CoherenceJobList{})
// AddToGroupVersion records the API metadata so serialized objects keep the expected
// coherence.oracle.com/v1 identity after the registration path changes.
metav1.AddToGroupVersion(scheme, GroupVersion)
return nil
}
62 changes: 62 additions & 0 deletions api/v1/groupversion_info_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 2026, Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/

package v1_test

import (
"testing"

. "github.com/onsi/gomega"
coh "github.com/oracle/coherence-operator/api/v1"
"k8s.io/apimachinery/pkg/runtime"
)

func TestAddToSchemeRegistersCoherenceAPITypes(t *testing.T) {
g := NewGomegaWithT(t)

// Use an empty scheme so the test proves AddToScheme owns the API type registration
// contract instead of inheriting it from broader test setup.
scheme := runtime.NewScheme()
g.Expect(coh.AddToScheme(scheme)).To(Succeed())

tests := []struct {
name string
kind string
expected runtime.Object
}{
{
name: "coherence",
kind: "Coherence",
expected: &coh.Coherence{},
},
{
name: "coherence list",
kind: "CoherenceList",
expected: &coh.CoherenceList{},
},
{
name: "coherence job",
kind: "CoherenceJob",
expected: &coh.CoherenceJob{},
},
{
name: "coherence job list",
kind: "CoherenceJobList",
expected: &coh.CoherenceJobList{},
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewGomegaWithT(t)

obj, err := scheme.New(coh.GroupVersion.WithKind(tt.kind))

g.Expect(err).NotTo(HaveOccurred())
g.Expect(obj).To(BeAssignableToTypeOf(tt.expected))
})
}
}
Loading
Loading