Conversation
|
Will update the docs as a separate PR. |
There was a problem hiding this comment.
Pull request overview
Adds a reusable “generic” Helm chart for JOSDK-based operators, updates the metrics-processing E2E deployment to use Helm, and enables Helm chart unit tests in PR CI.
Changes:
- Introduced
helm/generic-helm-chart(templates + default values + helm-unittest tests). - Updated metrics-processing E2E to install/uninstall the operator via Helm (instead of applying
k8s/operator.yaml). - Added a PR workflow job to run Helm unit tests via a helper script.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sample-operators/metrics-processing/src/test/resources/helm-values.yaml | Adds Helm values used by the metrics-processing E2E to deploy via the generic chart |
| sample-operators/metrics-processing/src/test/java/.../MetricsHandlingE2E.java | Switches cluster E2E operator deployment to Helm install/uninstall; refactors command/script execution helpers |
| sample-operators/metrics-processing/src/main/java/.../MetricsHandlingSampleOperator.java | Prepares config providers for env var + /config/config.yaml based configuration (not yet wired in shown diff) |
| sample-operators/metrics-processing/pom.xml | Configures JVM flag to load Log4j2 config from /config/log4j2.xml (matches chart-mounted config) |
| helm/run-tests.sh | Adds script to install helm-unittest plugin and run chart unit tests |
| helm/generic-helm-chart/* | Adds generic reusable Helm chart and helm-unittest suites for core rendered resources |
| .github/workflows/pr.yml | Adds CI job to run Helm unit tests on PRs |
.../src/main/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingSampleOperator.java
Show resolved
Hide resolved
|
Will update docs as a separate PR since, we would now deserve an "operations" section in docs |
- adds generic helm chart that can be reused and extended by users for their operators - adjusts metrics processing e2e test to use that helm chart - adjusts PR to run unit tests for helm chart Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
| name: generic-operator-chart | ||
| description: A generic reusable Helm chart for Java operators built with Java Operator SDK (JOSDK) | ||
| type: application | ||
| version: 0.1.0 |
There was a problem hiding this comment.
shouldn't this be same as JOSDK version?
There was a problem hiding this comment.
That is a good question, so I don't really want to advertise this helm chart, as something that follows josdk semver versioning. Rather it mean to be a starting point for users to basically copy paste and extend. But this is up to the debate. For now I would stick with this basic / simple approach and we can discuss on next community meeting if we should improve on that in a next iteration, and follow semver + add helm repository support from the webpage.
| log.info("Metrics Handling Sample Operator starting!"); | ||
|
|
||
| var configProviders = new ArrayList<ConfigProvider>(); | ||
| configProviders.add(new EnvVarConfigProvider()); |
There was a problem hiding this comment.
just I don't think this is related to Helm chart and maybe it should be in different commit.
There was a problem hiding this comment.
The config provider is related to the helm chart, we mount the config map from helm chart and those config values are loaded. (Not the env variable loader, since I think we don't add now env vars in the chart, I can remove that provider)
Uh oh!
There was an error while loading. Please reload this page.