Skip to content

Commit

Permalink
Merge 9bdb469 into backport/dans/NET-4256/helm-resource-values-for-se…
Browse files Browse the repository at this point in the history
…rver-acl-init/sincerely-immortal-tapir
  • Loading branch information
hc-github-team-consul-core authored Jun 23, 2023
2 parents 66b6640 + 9bdb469 commit 2e42f10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions charts/consul/test/unit/server-acl-init-cleanup-job.bats
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ load _helpers
@test "serverACLInitCleanup/Job: resources defined by default" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-acl-init-cleanup-job.yaml \
-s templates/server-acl-init-cleanup-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -rc '.spec.template.spec.containers[0].resources' | tee /dev/stderr)
[ "${actual}" = '{"limits":{"cpu":"50m","memory":"50Mi"},"requests":{"cpu":"50m","memory":"50Mi"}}' ]
Expand All @@ -175,7 +176,8 @@ load _helpers
@test "serverACLInitCleanup/Job: resources can be overridden" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-acl-init-cleanup-job.yaml \
-s templates/server-acl-init-cleanup-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.resources.foo=bar' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].resources.foo' | tee /dev/stderr)
Expand Down
6 changes: 4 additions & 2 deletions charts/consul/test/unit/server-acl-init-job.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,8 @@ load _helpers
@test "serverACLInit/Job: resources defined by default" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-acl-init-job.yaml \
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
. | tee /dev/stderr |
yq -rc '.spec.template.spec.containers[0].resources' | tee /dev/stderr)
[ "${actual}" = '{"limits":{"cpu":"50m","memory":"50Mi"},"requests":{"cpu":"50m","memory":"50Mi"}}' ]
Expand All @@ -2218,7 +2219,8 @@ load _helpers
@test "serverACLInit/Job: resources can be overridden" {
cd `chart_dir`
local actual=$(helm template \
-s templates/server-acl-init-job.yaml \
-s templates/server-acl-init-job.yaml \
--set 'global.acls.manageSystemACLs=true' \
--set 'global.acls.resources.foo=bar' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].resources.foo' | tee /dev/stderr)
Expand Down

0 comments on commit 2e42f10

Please sign in to comment.