Conversation
adwk67
left a comment
There was a problem hiding this comment.
Not finished yet, but here are some initial comments.
| ---- | ||
| <1> The kind of the resource is `SparkApplicationTemplate` to indicate that this is an application template. | ||
| <2> Name of the application template. | ||
| <3> The value of `mainApplicationFile` is set to a placeholder value, which will be overridden by the application resource. Similarly to the application, The fields `sparkImage`, `mode`, `mainClass`, and `mainApplicationFile` are required for the template to be valid. |
There was a problem hiding this comment.
Why do we have to have define sparkImage etc. both in the template and the app? Is the plan with v1alpha2 to remove them as being mandatory in the application so we can only have them in the template (or override them)? If so, can they be optional in the template?
|
|
||
| Spark application templates are used to define reusable configurations for Spark applications. | ||
| When you have many applications with similar configurations, templates can help you avoid duplication by grouping common settings together. | ||
| Application templates are available for the `v1alpha1` version of the SparkApplication custom resource and share the exact same structure as the SparkApplication resource, but with some differences in the way the operator handles them: |
There was a problem hiding this comment.
Do we know yet if the plan is to keep versions in step with another (e.g a v1alpha2 is created for one entity when the other entity is bumped to v1alpha2). I think that might make mapping between app and template a little easier.
| When you have many applications with similar configurations, templates can help you avoid duplication by grouping common settings together. | ||
| Application templates are available for the `v1alpha1` version of the SparkApplication custom resource and share the exact same structure as the SparkApplication resource, but with some differences in the way the operator handles them: | ||
|
|
||
| 1. Application templates are cluster wide resources, while Spark application resources are namespace-scoped. This means that application templates can be used across multiple namespaces, while Spark application resources are limited to the namespace they are created in. |
There was a problem hiding this comment.
Sentences should be on new lines in the docs e.g.
| 1. Application templates are cluster wide resources, while Spark application resources are namespace-scoped. This means that application templates can be used across multiple namespaces, while Spark application resources are limited to the namespace they are created in. | |
| 1. Application templates are cluster wide resources, while Spark application resources are namespace-scoped. | |
| This means that application templates can be used across multiple namespaces, while Spark application resources are limited to the namespace they are created in. |
(not sure if we want indenting there...)
| mainApplicationFile: "/examples.jar" | ||
| ---- | ||
| <1> Enable application template merging for this application. | ||
| <2> The name of the application templates to reference. The settings from these templates will be merged together in the order they are referenced, with `app-template-0` having the lowest precedence and `app-template-2` having the highest precedence. Tha application fields have the highest overall precedence and will override any conflicting settings from the templates. |
There was a problem hiding this comment.
| <2> The name of the application templates to reference. The settings from these templates will be merged together in the order they are referenced, with `app-template-0` having the lowest precedence and `app-template-2` having the highest precedence. Tha application fields have the highest overall precedence and will override any conflicting settings from the templates. | |
| <2> The name of the application templates to reference. The settings from these templates will be merged together in the order they are referenced, with `app-template-0` having the lowest precedence and `app-template-2` having the highest precedence. The application fields have the highest overall precedence and will override any conflicting settings from the templates. |
| metadata: | ||
| name: app | ||
| annotations: | ||
| spark-application.template.merge: "true" # <1> |
There was a problem hiding this comment.
I think it would be good to include all available annotations in the example to be comprehensive.
…late run up to stackabletech/operator-templating@dc62e95 (#662) Reference-to: stackabletech/operator-templating@dc62e95 (UBI10 rollout, new rust toolchain)
Fixes: stackabletech/issues#817
🟢 CI: https://testing.stackable.tech/view/02%20Operator%20Tests%20(custom)/job/spark-k8s-operator-it-custom/63/