You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "chehsunliu (via GitHub)" <gi...@apache.org> on 2025/11/23 10:36:48 UTC
[PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
chehsunliu opened a new pull request, #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22
## What changes were proposed in this pull request?
Support configuring additional pod annotations via values.yaml. This allows users to customize annotations such as those used to control Istio sidecar resources:
```yaml
apiVersion: apps/v1
kind: StatefulSet
spec:
template:
metadata:
annotations:
sidecar.istio.io/proxyCPU: 100m
sidecar.istio.io/proxyCPULimit: 200m
sidecar.istio.io/proxyMemory: 128Mi
sidecar.istio.io/proxyMemoryLimit: 256Mi
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13992
## How was this patch tested?
1. Test that the rendered templates aren't changed with default values
```bash
# Before making any code change
$ helm template charts/ozone > /tmp/ozone.v0.yaml
# After this change
$ helm template charts/ozone > /tmp/ozone.v1.yaml
$ diff -u /tmp/ozone.*.yaml
# No diff
```
2. Test that templates are correct with provided annotations
```bash
$ helm template charts/ozone \
--set "datanode.podAnnotations.sidecar\\.istio\\.io/proxyCPU=100m" \
--set "datanode.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=200m" \
--set "om.podAnnotations.sidecar\\.istio\\.io/proxyCPU=110m" \
--set "om.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=210m" \
--set "s3g.podAnnotations.sidecar\\.istio\\.io/proxyCPU=120m" \
--set "s3g.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=220m" \
--set "scm.podAnnotations.sidecar\\.istio\\.io/proxyCPU=130m" \
--set "scm.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=230m" \
> /tmp/ozone.v1.yaml
$ diff -u /tmp/ozone.*.yaml
```
Output
```diff
--- /tmp/ozone.v0.yaml 2025-11-23 17:43:24
+++ /tmp/ozone.v1.yaml 2025-11-23 18:33:31
@@ -234,16 +234,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: datanode
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 100m
+ sidecar.istio.io/proxyCPULimit: 200m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: datanode
spec:
containers:
- name: datanode
image: "apache/ozone:2.0.0"
@@ -313,16 +315,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: om
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 110m
+ sidecar.istio.io/proxyCPULimit: 210m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: om
spec:
containers:
- name: om
image: "apache/ozone:2.0.0"
@@ -398,16 +402,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: s3g
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 120m
+ sidecar.istio.io/proxyCPULimit: 220m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: s3g
spec:
containers:
- name: s3g
image: "apache/ozone:2.0.0"
@@ -479,16 +485,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: scm
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 130m
+ sidecar.istio.io/proxyCPULimit: 230m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: scm
spec:
initContainers:
- name: init
image: "apache/ozone:2.0.0"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22#issuecomment-3567836602
@dnskr @Tejaskriya would you like to take a look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
Posted by "dnskr (via GitHub)" <gi...@apache.org>.
dnskr commented on code in PR #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22#discussion_r2554005729
##########
charts/ozone/templates/scm/scm-statefulset.yaml:
##########
@@ -40,6 +40,9 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/ozone-configmap.yaml") . | sha256sum }}
+ {{- with .Values.scm.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
Review Comment:
```suggestion
{{- with .Values.scm.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
```
nit: I suggest adding two spaces to follow the project's formatting approach.
##########
charts/ozone/templates/s3g/s3g-statefulset.yaml:
##########
@@ -40,6 +40,9 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/ozone-configmap.yaml") . | sha256sum }}
+ {{- with .Values.s3g.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
Review Comment:
```suggestion
{{- with .Values.s3g.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
```
nit: I suggest adding two spaces to follow the project's formatting approach.
##########
charts/ozone/templates/datanode/datanode-statefulset.yaml:
##########
@@ -40,6 +40,9 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/ozone-configmap.yaml") . | sha256sum }}
+ {{- with .Values.datanode.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
Review Comment:
```suggestion
{{- with .Values.datanode.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
```
nit: I suggest adding two spaces to follow the project's formatting approach.
##########
charts/ozone/templates/om/om-statefulset.yaml:
##########
@@ -40,6 +40,9 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/ozone-configmap.yaml") . | sha256sum }}
+ {{- with .Values.om.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
Review Comment:
```suggestion
{{- with .Values.om.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
```
nit: I suggest adding two spaces to follow the project's formatting approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
Posted by "chehsunliu (via GitHub)" <gi...@apache.org>.
chehsunliu commented on PR #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22#issuecomment-3567967622
Test the precedence with this command instead:
```bash
$ helm template charts/ozone \
--set "podAnnotations.sidecar\\.istio\\.io/proxyCPU=100m" \
--set "datanode.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=200m" \
--set "om.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=210m" \
--set "s3g.podAnnotations.sidecar\\.istio\\.io/proxyCPU=120m" \
--set "s3g.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=220m" \
--set "scm.podAnnotations.sidecar\\.istio\\.io/proxyCPU=130m" \
--set "scm.podAnnotations.sidecar\\.istio\\.io/proxyCPULimit=230m" \
> /tmp/ozone.v1.yaml
```
Output:
```diff
--- /tmp/ozone.v0.yaml 2025-11-23 17:43:24
+++ /tmp/ozone.v1.yaml 2025-11-23 21:31:24
@@ -234,16 +234,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: datanode
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 100m
+ sidecar.istio.io/proxyCPULimit: 200m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: datanode
spec:
containers:
- name: datanode
image: "apache/ozone:2.0.0"
@@ -313,16 +315,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: om
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 100m
+ sidecar.istio.io/proxyCPULimit: 210m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: om
spec:
containers:
- name: om
image: "apache/ozone:2.0.0"
@@ -398,16 +402,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: s3g
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 120m
+ sidecar.istio.io/proxyCPULimit: 220m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: s3g
spec:
containers:
- name: s3g
image: "apache/ozone:2.0.0"
@@ -479,16 +485,18 @@
matchLabels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: scm
template:
metadata:
annotations:
checksum/config: 6d1d3f4f11b1bab096dd5d48cebba6471332987371961847c439d6a9cb229678
+ sidecar.istio.io/proxyCPU: 130m
+ sidecar.istio.io/proxyCPULimit: 230m
labels:
app.kubernetes.io/name: ozone
app.kubernetes.io/instance: release-name
app.kubernetes.io/component: scm
spec:
initContainers:
- name: init
image: "apache/ozone:2.0.0"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22#issuecomment-3568165127
Thanks @chehsunliu for the patch, @dnskr, @peterxcli for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13992. Support additional annotations for pods [ozone-helm-charts]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #22:
URL: https://github.com/apache/ozone-helm-charts/pull/22
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org