You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/25 11:58:09 UTC

[GitHub] [airflow] Aakcht opened a new pull request, #25283: Chart: custom labels for extrasecrets/configmaps

Aakcht opened a new pull request, #25283:
URL: https://github.com/apache/airflow/pull/25283

   This PR allows users to specify custom labels for secrets/configmaps created with `extraSecrets`/`extraConfigMaps` params
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] jedcunningham merged pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
jedcunningham merged PR #25283:
URL: https://github.com/apache/airflow/pull/25283


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Aakcht commented on pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
Aakcht commented on PR #25283:
URL: https://github.com/apache/airflow/pull/25283#issuecomment-1205131856

   @jedcunningham please take a look,  I removed `description` and moved `default` up a level, though I had to make an exception for extraconfigmap/secrets in values_schema.schema.json .


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Aakcht commented on a diff in pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
Aakcht commented on code in PR #25283:
URL: https://github.com/apache/airflow/pull/25283#discussion_r936508551


##########
chart/values.schema.json:
##########
@@ -857,6 +857,15 @@
                         "description": "Type **as string** of secret E.G. Opaque, kubernetes.io/dockerconfigjson, etc.",
                         "type": "string"
                     },
+                    "labels": {
+                        "description": "Labels for the secret",
+                        "type": "object",
+                        "additionalProperties": {
+                            "description": "Label key",

Review Comment:
   @jedcunningham probably not, but I am getting the following error in static checks when I try to remove `description` or `default` from here:
   
   ```
   Processing file:  chart/values.schema.json
   'description' is a required property
   
   Failed validating 'required' in schema['properties']['properties']['additionalProperties']['allOf'][0]['additionalProperties']['additionalProperties']['additionalProperties']['additionalProperties']['then']:
       {'required': ['description', 'default']}
   
   On instance['properties']['extraConfigMaps']['additionalProperties']['properties']['labels']['additionalProperties']:
       {'type': 'string'}
   'default' is a required property
   
   Failed validating 'required' in schema['properties']['properties']['additionalProperties']['allOf'][0]['additionalProperties']['additionalProperties']['additionalProperties']['additionalProperties']['then']:
       {'required': ['description', 'default']}
   
   On instance['properties']['extraConfigMaps']['additionalProperties']['properties']['labels']['additionalProperties']:
       {'type': 'string'}
   ```
   
   Looks like one possible way to fix it is to remove the lines 7-11 from https://github.com/apache/airflow/blob/main/chart/values_schema.schema.json :
   
   ```
               "additionalProperties": {
                   "additionalProperties": {
                       "$ref": "#/definitions/leafs"
                   }
               },
   ```
   
   Should I just remove these lines? Or should I leave it as it is? Or maybe there are better ways to fix it? 
   



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] jedcunningham commented on a diff in pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on code in PR #25283:
URL: https://github.com/apache/airflow/pull/25283#discussion_r936057724


##########
chart/values.schema.json:
##########
@@ -857,6 +857,15 @@
                         "description": "Type **as string** of secret E.G. Opaque, kubernetes.io/dockerconfigjson, etc.",
                         "type": "string"
                     },
+                    "labels": {
+                        "description": "Labels for the secret",
+                        "type": "object",
+                        "additionalProperties": {
+                            "description": "Label key",
+                            "default": null,

Review Comment:
   Shouldn't this default be set up a level, as the default for `labels`?



##########
chart/values.schema.json:
##########
@@ -857,6 +857,15 @@
                         "description": "Type **as string** of secret E.G. Opaque, kubernetes.io/dockerconfigjson, etc.",
                         "type": "string"
                     },
+                    "labels": {
+                        "description": "Labels for the secret",
+                        "type": "object",
+                        "additionalProperties": {
+                            "description": "Label key",

Review Comment:
   I'm not sure we need this description?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Aakcht commented on pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
Aakcht commented on PR #25283:
URL: https://github.com/apache/airflow/pull/25283#issuecomment-1195078040

   Looks like the failing checks are not related to this PR so I won't retrigger the test runs.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Aakcht commented on a diff in pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
Aakcht commented on code in PR #25283:
URL: https://github.com/apache/airflow/pull/25283#discussion_r937671320


##########
chart/values.schema.json:
##########
@@ -857,6 +857,15 @@
                         "description": "Type **as string** of secret E.G. Opaque, kubernetes.io/dockerconfigjson, etc.",
                         "type": "string"
                     },
+                    "labels": {
+                        "description": "Labels for the secret",
+                        "type": "object",
+                        "additionalProperties": {
+                            "description": "Label key",

Review Comment:
   Removed this `description` - after some thinking looks like there is a way to remove `description`  and `default` from here without breaking or making useless other checks from [values_schema.schema.json](https://github.com/apache/airflow/blob/main/chart/values_schema.schema.json) .



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Aakcht commented on a diff in pull request #25283: Chart: custom labels for extrasecrets/configmaps

Posted by GitBox <gi...@apache.org>.
Aakcht commented on code in PR #25283:
URL: https://github.com/apache/airflow/pull/25283#discussion_r937671544


##########
chart/values.schema.json:
##########
@@ -857,6 +857,15 @@
                         "description": "Type **as string** of secret E.G. Opaque, kubernetes.io/dockerconfigjson, etc.",
                         "type": "string"
                     },
+                    "labels": {
+                        "description": "Labels for the secret",
+                        "type": "object",
+                        "additionalProperties": {
+                            "description": "Label key",
+                            "default": null,

Review Comment:
   Moved up a level



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org