You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ChenYi015 (via GitHub)" <gi...@apache.org> on 2025/06/06 16:50:19 UTC

[PR] [FLINK-37911][Helm] Reorganize Helm chart templates [flink-kubernetes-operator]

ChenYi015 opened a new pull request, #985:
URL: https://github.com/apache/flink-kubernetes-operator/pull/985

   <!--
   *Thank you very much for contributing to the Apache Flink Kubernetes Operator - we are happy that you want to help us improve the project. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix][docs] Fix typo in event time introduction` or `[hotfix][javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can read more on how we use GitHub Actions for CI [here](https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/development/guide/#cicd).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *(For example: This pull request adds a new feature to periodically create and maintain savepoints through the `FlinkDeployment` custom resource.)*
   
   - To make  #971  easier to review, reorganize the Helm chart templates without any refactoring:
   
   ## Brief change log
   
   Reorganize the directory structure of Helm chart as follows:
   
   ```bash
   $ # Before
   $ tree helm/flink-kubernetes-operator
   helm/flink-kubernetes-operator
   ├── .helmignore
   ├── Chart.yaml
   ├── conf
   │   ├── flink-conf.yaml
   │   ├── log4j-console.properties
   │   └── log4j-operator.properties
   ├── crds
   │   ├── flinkdeployments.flink.apache.org-v1.yml
   │   ├── flinksessionjobs.flink.apache.org-v1.yml
   │   └── flinkstatesnapshots.flink.apache.org-v1.yml
   ├── templates
   │   ├── _helpers.tpl
   │   ├── flink-operator.yaml
   │   ├── rbac.yaml
   │   ├── serviceaccount.yaml
   │   └── webhook.yaml
   └── values.yaml
   
   $ # After
   $ tree helm/flink-kubernetes-operator
   helm/flink-kubernetes-operator
   ├── .helmignore
   ├── Chart.yaml
   ├── conf
   │   ├── flink-conf.yaml
   │   ├── log4j-console.properties
   │   └── log4j-operator.properties
   ├── crds
   │   ├── flinkdeployments.flink.apache.org-v1.yml
   │   ├── flinksessionjobs.flink.apache.org-v1.yml
   │   └── flinkstatesnapshots.flink.apache.org-v1.yml
   ├── templates
   │   ├── _helpers.tpl
   │   ├── cert-manager
   │   │   ├── certificate.yaml
   │   │   └── issuer.yaml
   │   ├── controller
   │   │   ├── configmap.yaml
   │   │   └── deployment.yaml
   │   ├── flink
   │   │   ├── _helpers.tpl
   │   │   ├── role.yaml
   │   │   ├── role_binding.yaml
   │   │   └── service_account.yaml
   │   ├── rbac
   │   │   ├── _helpers.tpl
   │   │   ├── cluster_role.yaml
   │   │   ├── cluster_role_binding.yaml
   │   │   ├── role.yaml
   │   │   ├── role_binding.yaml
   │   │   └── service_account.yaml
   │   └── webhook
   │       ├── _helpers.tpl
   │       ├── mutating_webhook_configuration.yaml
   │       ├── secret.yaml
   │       ├── service.yaml
   │       └── validating_webhook_configuration.yaml
   └── values.yaml
   ```
   
   ## Verifying this change
   <!--
   Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
   -->
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   One can verify there is no changes to the rendered manifests as follows:
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: (no)
     - Core observer or reconciler logic that is regularly executed: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
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@flink.apache.org

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


Re: [PR] [FLINK-37911][Helm] Reorganize Helm chart templates [flink-kubernetes-operator]

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #985:
URL: https://github.com/apache/flink-kubernetes-operator/pull/985


-- 
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@flink.apache.org

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


Re: [PR] [FLINK-37911][Helm] Reorganize Helm chart templates [flink-kubernetes-operator]

Posted by "ChenYi015 (via GitHub)" <gi...@apache.org>.
ChenYi015 commented on PR #985:
URL: https://github.com/apache/flink-kubernetes-operator/pull/985#issuecomment-2949887793

   One can verify that there is no changes to the templated manifests after this reorganization:
   
   ```bash
   $ # main branch
   $ git checkout main
   
   $ # helm template with default values
   $ helm template flink-operator helm/flink-kubernetes-operator | yq eval-all '[.] | map(select(length > 0)) | sort_by(.kind,.metadata.name,.metadata.namespace) | .[] | splitDoc' > before-1.yaml
   
   $ # helm template with multi-namespaces values
   $ helm template flink-operator helm/flink-kubernetes-operator --set 'watchNamespaces={ns1,ns2,ns3}' | yq eval-all '[.] | map(select(length > 0)) | sort_by(.kind,.metadata.name,.metadata.namespace) | .[] | splitDoc' > before-2.yaml
   
   $ # this branch
   $ git checkout helm/reorganize-templates
   
   $ # helm template with default values
   $ helm template flink-operator helm/flink-kubernetes-operator | yq eval-all '[.] | map(select(length > 0)) | sort_by(.kind,.metadata.name,.metadata.namespace) | .[] | splitDoc' > after-1.yaml
   
   $ # helm template with multi-namespaces values
   $ helm template flink-operator helm/flink-kubernetes-operator --set 'watchNamespaces={ns1,ns2,ns3}' | yq eval-all '[.] | map(select(length > 0)) | sort_by(.kind,.metadata.name,.metadata.namespace) | .[] | splitDoc' > after-2.yaml
   
   $ # diff
   $ diff before-1.yaml after-1.yaml
   1c1
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/cert-manager/certificate.yaml
   23c23
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/cluster_role.yaml
   139c139
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/cluster_role_binding.yaml
   159c159
   < # Source: flink-kubernetes-operator/templates/flink-operator.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/controller/configmap.yaml
   418c418
   < # Source: flink-kubernetes-operator/templates/flink-operator.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/controller/deployment.yaml
   558c558
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/cert-manager/issuer.yaml
   567c567
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/mutating_webhook_configuration.yaml
   595c595
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role.yaml
   636c636
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role_binding.yaml
   658c658
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/secret.yaml
   667a668
   > # Source: flink-kubernetes-operator/templates/webhook/service.yaml
   680c681
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/service_account.yaml
   694c695
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/service_account.yaml
   706c707
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/validating_webhook_configuration.yaml
   
   $ diff before-2.yaml after-2.yaml 
   1c1
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/cert-manager/certificate.yaml
   23c23
   < # Source: flink-kubernetes-operator/templates/flink-operator.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/controller/configmap.yaml
   284c284
   < # Source: flink-kubernetes-operator/templates/flink-operator.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/controller/deployment.yaml
   424c424
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/cert-manager/issuer.yaml
   433c433
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/mutating_webhook_configuration.yaml
   466c466
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role.yaml
   507c507
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role.yaml
   548c548
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role.yaml
   589c589
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role.yaml
   613a614
   > # Source: flink-kubernetes-operator/templates/rbac/role.yaml
   729c730
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role.yaml
   845c846
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role.yaml
   961c962
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role_binding.yaml
   981c982
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role_binding.yaml
   1001c1002
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role_binding.yaml
   1021c1022
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/role_binding.yaml
   1041c1042
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role_binding.yaml
   1063c1064
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role_binding.yaml
   1085c1086
   < # Source: flink-kubernetes-operator/templates/rbac.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/role_binding.yaml
   1107c1108
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/secret.yaml
   1116a1118
   > # Source: flink-kubernetes-operator/templates/webhook/service.yaml
   1129c1131
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/service_account.yaml
   1143c1145
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/service_account.yaml
   1157c1159
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/flink/service_account.yaml
   1171c1173
   < # Source: flink-kubernetes-operator/templates/serviceaccount.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/rbac/service_account.yaml
   1183c1185
   < # Source: flink-kubernetes-operator/templates/webhook.yaml
   ---
   > # Source: flink-kubernetes-operator/templates/webhook/validating_webhook_configuration.yaml
   ```


-- 
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@flink.apache.org

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