Skip to content

Commit

Permalink
Add PodAntiAffinity for Semeru Cloud Compiler + update RCO (#514)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kabicin authored Oct 28, 2023
1 parent a4a9628 commit 47d89ef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions controllers/semeru_compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,23 @@ func (r *ReconcileWebSphereLiberty) reconcileSemeruDeployment(wlva *wlv1.WebSphe
Annotations: wlutils.GetWLOLicenseAnnotations(),
},
Spec: corev1.PodSpec{
Affinity: &corev1.Affinity{
PodAntiAffinity: &corev1.PodAntiAffinity{
PreferredDuringSchedulingIgnoredDuringExecution: []corev1.WeightedPodAffinityTerm{
{
Weight: 50,
PodAffinityTerm: corev1.PodAffinityTerm{
TopologyKey: "topology.kubernetes.io/zone",
LabelSelector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app.kubernetes.io/name": getSemeruCompilerName(wlva),
},
},
},
},
},
},
},
Containers: []corev1.Container{
{
Name: "compiler",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/WASdev/websphere-liberty-operator
go 1.21

require (
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9
github.com/cert-manager/cert-manager v1.10.2
github.com/go-logr/logr v1.2.4
github.com/openshift/api v0.0.0-20230928134114-673ed0cfc7f1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383 h1:X0UjPYAsuK+ByO9Iy18ZxPjOPnFYUWE+yBX5tM5606M=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231024192226-922d2a5db383/go.mod h1:mQO6jtL9OMEzAx+IyCTDyEUm9wN1vUeunw0aROcepBw=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9 h1:5NILNbUpUUW0eLTUSiDbTe01a/tDCb3sRXwfSl6v460=
github.com/application-stacks/runtime-component-operator v1.0.0-20220602-0850.0.20231027224121-66e9415767a9/go.mod h1:Yhxg+reeWEw4OnPUsX3ZYogS3RbtmC0M20TzX/w4N0I=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
Expand Down

0 comments on commit 47d89ef

Please sign in to comment.