Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release new memory limit rules #1259

Merged
merged 53 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
aa123c4
feat: Add Healtchchecks to RadixConfig
Richard87 Dec 2, 2024
73d8c6c
sync RadixDeployment to KubeDeployment with Healtchchecks
Richard87 Dec 2, 2024
1e58644
sync RadixApplication to RadixDeployment with Healtchchecks
Richard87 Dec 2, 2024
d6b357a
fix tests
Richard87 Dec 3, 2024
44966ea
fix linting
Richard87 Dec 3, 2024
952545d
Add RA validation
Richard87 Dec 3, 2024
b117b4b
Start testing
Richard87 Dec 3, 2024
d22b56c
replace k8s types with radix, add pointers where optional
Richard87 Dec 4, 2024
813d9ef
bump chart
Richard87 Dec 4, 2024
b80eeae
fix correct error component name
Richard87 Dec 4, 2024
4ced5b6
fix correct error component name
Richard87 Dec 4, 2024
992bb60
Allow redis ports in policy (#1237)
Richard87 Dec 9, 2024
2e5a5fb
Add support for defining pod failure policies for jobs in radixconfig…
nilsgstrabo Dec 10, 2024
8dc3a7f
simplify structures
Richard87 Dec 10, 2024
da0f7c4
init commit
Richard87 Dec 10, 2024
cc03820
Merge branch 'master' into feat-custom-health-checks-and-probes
Richard87 Dec 10, 2024
3e09af3
bump charts
Richard87 Dec 10, 2024
b861dbf
Build on docker, push same image to all container registries
Richard87 Dec 11, 2024
53ec29d
test workflow on pull (acr tasks should fail)
Richard87 Dec 11, 2024
917544e
fix buildx
Richard87 Dec 11, 2024
06fb153
revert test
Richard87 Dec 11, 2024
77780fd
push latest tag to ACR
Richard87 Dec 11, 2024
b47dd8a
dont export pipeline long tag
Richard87 Dec 11, 2024
7dafc38
Merge pull request #1238 from equinor/refactor-build
Richard87 Dec 11, 2024
03ddac8
configur container image name
Richard87 Dec 11, 2024
fa8bd69
Merge pull request #1239 from equinor/container-image-name
Richard87 Dec 11, 2024
702e227
simpler validateProbe, remove unneeded tests
Richard87 Dec 11, 2024
9f815c7
fix typo
Richard87 Dec 11, 2024
1bd3985
cleanup
Richard87 Dec 11, 2024
203e754
Merge pull request #1240 from equinor/fix-build
Richard87 Dec 11, 2024
1cf1655
wait 2 minutes
Richard87 Dec 11, 2024
191f6f8
Merge pull request #1241 from equinor/fix-build-2
Richard87 Dec 11, 2024
d663945
configure buildx platforms
Richard87 Dec 11, 2024
7ab1561
Merge pull request #1242 from equinor/fix-build-3
Richard87 Dec 11, 2024
bc39c7b
Merge pull request #1234 from equinor/feat-custom-health-checks-and-p…
Richard87 Dec 11, 2024
84f0707
Revert to Registry Cache, push latest operator image
Richard87 Dec 11, 2024
f4c8df3
remove unused variable
Richard87 Dec 11, 2024
4fc1570
specify buildcache tag
Richard87 Dec 11, 2024
53c0e5e
fix quote sign
Richard87 Dec 11, 2024
414f724
Merge pull request #1243 from equinor/revert-caching-to-registry
Richard87 Dec 11, 2024
d1c7f08
fix quote sign
Richard87 Dec 11, 2024
1e30b00
Merge pull request #1244 from equinor/fix-build-4
Richard87 Dec 11, 2024
0a0a7be
Create a index manifest for the target repo (#1245)
Richard87 Dec 12, 2024
a6fa72b
Fix typo in buildscript (#1247)
Richard87 Dec 12, 2024
622bff0
echo out dry-run and push versioned pipeline runner (#1248)
Richard87 Dec 12, 2024
5da2ff6
Build and push image to all registries, use cache (#1249)
Richard87 Dec 12, 2024
dedbca8
fix merge conflict (#1250)
Richard87 Dec 12, 2024
4fa2b81
Log in to GHCR to enable cache (#1251)
Richard87 Dec 12, 2024
ef123ba
Bump golang.org/x/crypto from 0.26.0 to 0.31.0 (#1246)
dependabot[bot] Dec 16, 2024
f07283d
fix build process (#1253)
Richard87 Dec 16, 2024
f759b05
Allow higher memory limit than request (#1257)
Richard87 Dec 19, 2024
0d28be2
Merge branch 'release'
nilsgstrabo Dec 20, 2024
20d238b
bump chart (#1260)
Richard87 Dec 20, 2024
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
4 changes: 2 additions & 2 deletions charts/radix-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: radix-operator
version: 1.48.1
appVersion: 1.68.1
version: 1.48.2
appVersion: 1.68.2
kubeVersion: ">=1.24.0"
description: Radix Operator
keywords:
Expand Down
15 changes: 12 additions & 3 deletions pkg/apis/pipeline/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,22 @@ func correctRadixApplication(ctx context.Context, ra *radixv1.RadixApplication)
func buildResource(component radixv1.RadixCommonComponent) radixv1.ResourceRequirements {
memoryReqName := corev1.ResourceMemory.String()
resources := component.GetResources()
delete(resources.Limits, memoryReqName)

if requestsMemory, ok := resources.Requests[memoryReqName]; ok {
memReq, hasMemReq := resources.Requests[memoryReqName]
memLimit, hasMemLimit := resources.Limits[memoryReqName]

if hasMemReq && !hasMemLimit {
if resources.Limits == nil {
resources.Limits = radixv1.ResourceList{}
}
resources.Limits[memoryReqName] = requestsMemory
resources.Limits[memoryReqName] = memReq
}

if !hasMemReq && hasMemLimit {
if resources.Requests == nil {
resources.Requests = radixv1.ResourceList{}
}
resources.Requests[memoryReqName] = memLimit
}
return resources
}
14 changes: 11 additions & 3 deletions pkg/apis/pipeline/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/equinor/radix-operator/pkg/apis/config/dnsalias"
"github.com/equinor/radix-operator/pkg/apis/pipeline/application"
validate "github.com/equinor/radix-operator/pkg/apis/radixvalidators"
"github.com/equinor/radix-operator/pkg/apis/utils"
radixfake "github.com/equinor/radix-operator/pkg/client/clientset/versioned/fake"
"github.com/stretchr/testify/assert"
Expand All @@ -27,8 +28,15 @@ func Test_CreateRadixApplication_LimitMemoryIsTakenFromRequestsMemory(t *testing
require.NoError(t, err)
ra, err := application.CreateRadixApplication(context.Background(), radixClient, &dnsalias.DNSConfig{}, string(configFileContent))
require.NoError(t, err)
assert.Equal(t, "100Mi", ra.Spec.Components[0].Resources.Requests["memory"], "server1 invalid resource requests memory")
assert.Equal(t, "100Mi", ra.Spec.Components[0].Resources.Limits["memory"], "server1 invalid resource limits memory")
assert.Equal(t, "100Mi", ra.Spec.Components[1].Resources.Limits["memory"], "server2 invalid resource limits memory")
assert.Empty(t, ra.Spec.Components[2].Resources.Limits["memory"], "server3 not expected resource limits memory")
assert.Empty(t, ra.Spec.Components[3].Resources.Limits["memory"], "server4 not expected resource limits memory")
assert.Equal(t, "100Mi", ra.Spec.Components[1].Resources.Requests["memory"], "server2 invalid resource requests memory")
assert.Equal(t, "200Mi", ra.Spec.Components[1].Resources.Limits["memory"], "server2 invalid resource limits memory")
assert.Equal(t, "200Mi", ra.Spec.Components[2].Resources.Requests["memory"], "server3 invalid resource requests memory")
assert.Equal(t, "200Mi", ra.Spec.Components[2].Resources.Limits["memory"], "server3 invalid resource limits memory")
assert.Equal(t, "200Mi", ra.Spec.Components[3].Resources.Requests["memory"], "server4 invalid resource requests memory")
assert.Equal(t, "200Mi", ra.Spec.Components[3].Resources.Limits["memory"], "server4 invalid resource limits memory")

err = validate.CanRadixApplicationBeInserted(context.Background(), radixClient, ra, nil)
assert.NoError(t, err)
}