Skip to content

Commit 9815c31

Browse files
committed
Fix test failures
1 parent 84c5201 commit 9815c31

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

api/v1/coherence_webhook.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ func (in *Coherence) Default() {
5454
in.Spec.EnsureCoherenceUtilsImage(&utilsImage)
5555

5656
// Set the features supported by this version
57+
if in.Annotations == nil {
58+
in.Annotations = make(map[string]string)
59+
}
5760
in.Annotations[AnnotationFeatureSuspend] = "true"
5861
} else {
5962
logger.Info("skipping defaulting for existing resource")

api/v1/common_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,6 @@ func createMinimalExpectedStatefulSet(deployment *coh.Coherence) *appsv1.Statefu
265265
Name: "OPERATOR_REQUEST_TIMEOUT",
266266
Value: "120",
267267
},
268-
{
269-
Name: coh.EnvVarCohIdentity,
270-
Value: deployment.Name + "@" + deployment.Namespace,
271-
},
272268
},
273269
}
274270

api/v1/constants.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ const (
7373
VolumeMountPathManagementCerts = VolumeMountRoot + "/coherence/certs/management"
7474
VolumeMountPathMetricsCerts = VolumeMountRoot + "/coherence/certs/metrics"
7575

76-
AnnotationIdentity = "coherence.k8s.operator.identity"
77-
7876
// Start command for the runner
7977
RunnerCommand = VolumeMountPathUtils + "/runner"
8078

controllers/statefulset/statefulset_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ func (in *ReconcileStatefulSet) patchStatefulSet(deployment *coh.Coherence, curr
359359

360360
// ensure the utils image is present so that we do not patch on a Coherence resource
361361
// from pre-3.1.x that does not have images set
362-
if deployment.Spec.CoherenceUtils.Image == nil {
362+
if deployment.Spec.CoherenceUtils == nil || deployment.Spec.CoherenceUtils.Image == nil {
363363
utilsImage := in.getUtilsImage(desired)
364364
in.setUtilsImage(original, utilsImage)
365365
in.setUtilsImage(current, utilsImage)

pkg/runner/runner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func AppendCommonExpectedArgs(args []string) []string {
116116
"-XX:+PrintFlagsFinal",
117117
"-Dcoherence.wka=test-wka..svc.cluster.local",
118118
"-Dcoherence.cluster=test",
119-
"-Dcoherence.k8s.operator.identity=test@",
119+
//"-Dcoherence.k8s.operator.identity=test@",
120120
"-Dcoherence.k8s.operator.health.port=6676",
121121
"-Dcoherence.management.http.port=30000",
122122
"-Dcoherence.metrics.http.port=9612",

0 commit comments

Comments
 (0)