goncalo-m-c commented on code in PR #55832:
URL: https://github.com/apache/airflow/pull/55832#discussion_r2435195538


##########
chart/templates/statsd/statsd-serviceaccount.yaml:
##########
@@ -32,8 +32,8 @@ metadata:
     release: {{ .Release.Name }}
     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
     heritage: {{ .Release.Service }}
-    {{- with .Values.labels }}
-      {{- toYaml . | nindent 4 }}
+    {{- if or (.Values.labels) (.Values.statsd.labels) }}

Review Comment:
   There is no functional difference, I used it because it's used in other 
manifests in this chart. But the official Helm docs consistently show no 
parenthesis (`or value1 value2`) so I assume that is the recommended way. Let's 
just follow that. Parenthesis seem to make more sense in cases where we nest 
functions are used, like `deepEqual (list 1 2 3) (list 1 2 3)` (example 
[here](https://helm.sh/docs/chart_template_guide/function_list/#deepequal)). 



##########
chart/docs/customizing-labels.rst:
##########
@@ -0,0 +1,62 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+..   http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+
+Customizing Labels for Pods
+---------------------------
+
+The Helm chart allows you to customize labels for your Airflow objects. You 
can set global labels that apply to all objects and pods defined in the chart, 
as well as component-specific labels for individual Airflow components.
+
+Global Labels
+~~~~~~~~~~~~~
+
+Global labels can be set using the ``labels`` parameter in your values file. 
These labels will be applied to all Airflow objects and pods defined in the 
chart:
+
+.. code-block:: yaml
+
+    labels:
+      environment: production
+
+Component-Specific Labels
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You can also set specific labels for individual Airflow components. These 
labels will be merged with the global labels, with component-specific labels 
taking precedence.
+
+For example, to add specific labels to different components:
+
+.. code-block:: yaml
+
+    # Global labels applied to all pods
+    labels:
+      environment: production
+
+    # Scheduler specific labels
+    scheduler:
+      labels:
+        role: scheduler
+
+    # Worker specific labels
+    workers:
+      labels:
+        role: worker
+
+    # Webserver specific labels
+    webserver:
+      labels:
+        role: ui
+
+.. note::
+    Component-specific labels take precedence over global labels when there 
are conflicts. This allows you to override global labels for specific 
components when needed.

Review Comment:
   Makes sense, I'll clarify that



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to