Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 4 additions & 0 deletions helm/templates/_jaas.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ Usage:
cp /tmpl/zookeeper-client.properties /jaas/zookeeper-client.properties
chmod 0400 /jaas/zookeeper-client.properties
{{- end }}
{{- with .Values.resources.jaasInitContainer }}
resources:
{{- toYaml . | nindent 4 }}
{{- end }}
volumeMounts:
- name: sasl-template
mountPath: /tmpl
Expand Down
56 changes: 56 additions & 0 deletions helm/tests/resources_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,59 @@ tests:
cpu: 1000m
memory: 2048Mi
template: templates/sts-tablet.yaml

- it: should not set resources on the JAAS init container by default
set:
security.internal.sasl.mechanism: plain
security.internal.sasl.plain.username: u
security.internal.sasl.plain.password: p
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: render-jaas-config
template: templates/sts-coordinator.yaml
- isNull:
path: spec.template.spec.initContainers[0].resources
template: templates/sts-coordinator.yaml
- equal:
path: spec.template.spec.initContainers[0].name
value: render-jaas-config
template: templates/sts-tablet.yaml
- isNull:
path: spec.template.spec.initContainers[0].resources
template: templates/sts-tablet.yaml

- it: should set resources on the JAAS init container in both statefulsets
set:
security.internal.sasl.mechanism: plain
security.internal.sasl.plain.username: u
security.internal.sasl.plain.password: p
resources:
jaasInitContainer:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
memory: 128Mi
asserts:
- equal:
path: spec.template.spec.initContainers[0].resources
value:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
memory: 128Mi
template: templates/sts-coordinator.yaml
- equal:
path: spec.template.spec.initContainers[0].resources
value:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
memory: 128Mi
template: templates/sts-tablet.yaml
10 changes: 10 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,16 @@ resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# Resources for the `render-jaas-config` init container, rendered into both
# StatefulSets when SASL is enabled. Set requests equal to limits (and do the
# same for the server containers) to get the Guaranteed QoS class.
# jaasInitContainer:
# requests:
# cpu: 100m
# memory: 128Mi
# limits:
# cpu: 100m
# memory: 128Mi

serviceAccount:
create: false
Expand Down
4 changes: 4 additions & 0 deletions website/docs/install-deploy/deploying-with-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ making rotation fully hands-off.
| `resources.tabletServer.requests.memory` | Memory requests for tablet servers | Not set |
| `resources.tabletServer.limits.cpu` | CPU limits for tablet servers | Not set |
| `resources.tabletServer.limits.memory` | Memory limits for tablet servers | Not set |
| `resources.jaasInitContainer.requests.cpu` | CPU requests for the `render-jaas-config` init container (SASL only) | Not set |
| `resources.jaasInitContainer.requests.memory` | Memory requests for the `render-jaas-config` init container (SASL only) | Not set |
| `resources.jaasInitContainer.limits.cpu` | CPU limits for the `render-jaas-config` init container (SASL only) | Not set |
| `resources.jaasInitContainer.limits.memory` | Memory limits for the `render-jaas-config` init container (SASL only) | Not set |

### Pod Extension Parameters

Expand Down