Skip to content

Commit 47d89ef

Browse files
authored
Add PodAntiAffinity for Semeru Cloud Compiler + update RCO (#514)
* Add PodAffinity for semeru cloud compiler * Add PodAffinity for Semeru compiler * Add preferredMaxLoad variable to Semeru compiler * Indicate soft max for preferredMaxLoad * Update zz_generated.deepcopy.go * Remove Semeru spec variable * Remove topology-mode * Update semeru_compiler.go * Revert replicas CRD description * Update ibm-websphere-liberty.clusterserviceversion.yaml * Update RCO dependency * Remove ununsed packages using go mod tidy
1 parent a4a9628 commit 47d89ef

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

controllers/semeru_compiler.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,23 @@ func (r *ReconcileWebSphereLiberty) reconcileSemeruDeployment(wlva *wlv1.WebSphe
304304
Annotations: wlutils.GetWLOLicenseAnnotations(),
305305
},
306306
Spec: corev1.PodSpec{
307+
Affinity: &corev1.Affinity{
308+
PodAntiAffinity: &corev1.PodAntiAffinity{
309+
PreferredDuringSchedulingIgnoredDuringExecution: []corev1.WeightedPodAffinityTerm{
310+
{
311+
Weight: 50,
312+
PodAffinityTerm: corev1.PodAffinityTerm{
313+
TopologyKey: "topology.kubernetes.io/zone",
314+
LabelSelector: &metav1.LabelSelector{
315+
MatchLabels: map[string]string{
316+
"app.kubernetes.io/name": getSemeruCompilerName(wlva),
317+
},
318+
},
319+
},
320+
},
321+
},
322+
},
323+
},
307324
Containers: []corev1.Container{
308325
{
309326
Name: "compiler",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/WASdev/websphere-liberty-operator
33
go 1.21
44

55
require (
6-
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383
6+
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9
77
github.com/cert-manager/cert-manager v1.10.2
88
github.com/go-logr/logr v1.2.4
99
github.com/openshift/api v0.0.0-20230928134114-673ed0cfc7f1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
5454
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
5555
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
5656
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
57-
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383 h1:X0UjPYAsuK+ByO9Iy18ZxPjOPnFYUWE+yBX5tM5606M=
58-
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383/go.mod h1:mQO6jtL9OMEzAx+IyCTDyEUm9wN1vUeunw0aROcepBw=
57+
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9 h1:5NILNbUpUUW0eLTUSiDbTe01a/tDCb3sRXwfSl6v460=
58+
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9/go.mod h1:Yhxg+reeWEw4OnPUsX3ZYogS3RbtmC0M20TzX/w4N0I=
5959
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
6060
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
6161
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=

0 commit comments

Comments
 (0)