dongjoon-hyun commented on code in PR #279:
URL:
https://github.com/apache/spark-kubernetes-operator/pull/279#discussion_r2196851988
##########
spark-operator-api/src/main/resources/finalize-generated-crd.sh:
##########
@@ -23,5 +23,15 @@
SCRIPT_PATH=$(cd "$(dirname "$0")"; pwd)
for f in $(ls
${SCRIPT_PATH}/../../../build/classes/java/main/META-INF/fabric8/*.spark.apache.org-v1.yml);
do
yq -i '.spec.versions[0] += ({"additionalPrinterColumns": [{"jsonPath":
".status.currentState.currentStateSummary", "name": "Current State", "type":
"string"}, {"jsonPath": ".metadata.creationTimestamp", "name": "Age", "type":
"date"}]})' $f
+ filename=$(basename "$f")
+
template_file_path="${SCRIPT_PATH}/../../../../build-tools/crd-templates/${filename}"
+
target_dir="${SCRIPT_PATH}/../../../../build-tools/helm/spark-kubernetes-operator/crds"
+ mkdir -p "${target_dir}"
+ target_file_path="${target_dir}/${filename}"
+ yq eval-all '
+ select(fileIndex == 1) as $source
+ | select(fileIndex == 0)
+ | .spec.versions += [$source.spec.versions[0]]
Review Comment:
Is it a little over-engineering without much clear benefits, isn't it. If we
leave it in the existing way,
1. It's logically simple because only a PR (which changes the specs) will
add minimal and required lines.
2. For all CRDs (including the latest CRD), we can have a full traceability
with Git too.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]