Skip to content

Commit 84c5201

Browse files
committed
Fix code review issues
1 parent fc1451f commit 84c5201

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ test/**/test-report.xml
3939

4040
# Generated file created by the build
4141
/pkg/data/zz_generated_assets.go
42+
/__debug_bin

api/v1/coherence_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (in *Coherence) Default() {
5454
in.Spec.EnsureCoherenceUtilsImage(&utilsImage)
5555

5656
// Set the features supported by this version
57-
in.Annotations[ANNOTATION_FEATURE_SUSPEND] = "true"
57+
in.Annotations[AnnotationFeatureSuspend] = "true"
5858
} else {
5959
logger.Info("skipping defaulting for existing resource")
6060
}

api/v1/coherenceresourcespec_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ func (in *CoherenceResourceSpec) CreateDefaultEnv(deployment *Coherence) []corev
773773
corev1.EnvVar{Name: EnvVarCohHealthPort, Value: Int32ToString(in.GetHealthPort())},
774774
)
775775

776-
if deployment.Annotations[ANNOTATION_FEATURE_SUSPEND] == "true" {
776+
if deployment.Annotations[AnnotationFeatureSuspend] == "true" {
777777
env = append(env, corev1.EnvVar{Name: EnvVarCohIdentity, Value: deployment.Name + "@" + deployment.Namespace})
778778
}
779779

api/v1/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939
StatusSelectorTemplate = LabelCoherenceCluster + "=%s," + LabelCoherenceDeployment + "=%s"
4040

4141
// Feature annotations
42-
ANNOTATION_FEATURE_SUSPEND = "com.oracle.coherence.operator/feature.suspend"
42+
AnnotationFeatureSuspend = "com.oracle.coherence.operator/feature.suspend"
4343

4444
// The default k8s service account name.
4545
DefaultServiceAccount = "default"

controllers/statefulset/probe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ func (in *CoherenceProbe) SuspendServices(deployment *coh.Coherence, sts *appsv1
8787
}
8888

8989
// check whether the Coherence deployment supports service suspension
90-
if deployment.Annotations[coh.ANNOTATION_FEATURE_SUSPEND] != "true" {
90+
if deployment.Annotations[coh.AnnotationFeatureSuspend] != "true" {
9191
log.Info("Skipping suspension of Coherence services in StatefulSet "+sts.Name+
92-
coh.ANNOTATION_FEATURE_SUSPEND+" annotation is missing or not set to true",
92+
coh.AnnotationFeatureSuspend+" annotation is missing or not set to true",
9393
"Namespace", deployment.Namespace, "Name", deployment.Name)
9494
return true
9595
}

0 commit comments

Comments
 (0)