feat: Add package registry to eck#8800
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔍 Preview links for changed docs |
jsoriano
left a comment
There was a problem hiding this comment.
Took a quick look from the side of the team maintaining Package Registry.
It looks great, thanks for adding support for package registry in ECK, this will help many users.
Added some comments, please let us know if you need a more in-depth review from our side.
There was a problem hiding this comment.
Pull Request Overview
This PR adds Elastic Package Registry (EPR) support to ECK, introducing a new CRD for deploying EPR instances and enabling Kibana to reference EPR instances for Fleet package management.
- Adds
ElasticPackageRegistryCRD with controller to manage EPR deployments - Enables Kibana to associate with EPR instances via
packageRegistryReffield - Implements TLS certificate handling and CA mounting for secure communication between Kibana and EPR
Reviewed Changes
Copilot reviewed 60 out of 61 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/apis/epr/v1alpha1/ |
New API definitions for ElasticPackageRegistry CRD |
pkg/controller/packageregistry/ |
Controller implementation for managing EPR resources |
pkg/controller/association/controller/kibana_epr.go |
Association controller for Kibana-EPR relationships |
pkg/apis/kibana/v1/kibana_types.go |
Adds packageRegistryRef field and EPR association support |
pkg/controller/kibana/ |
Updates Kibana controller to handle EPR associations and CA certificates |
test/e2e/ |
E2E tests for EPR functionality and associations |
Comments suppressed due to low confidence (1)
pkg/controller/kibana/pod_test.go:1
- The comment on line 67 says 'readinessProbe is the readiness probe for the maps container' but this function is in the packageregistry controller and should refer to the package registry container.
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ttp certification in building the config
|
buildkite test this -f p=gke,E2E_TAGS=epr |
|
buildkite test this -f p=gke,E2E_TAGS=epr |
pebrc
left a comment
There was a problem hiding this comment.
LGTM (let's address any follow up work around runAsNonRoot for 9.3.0 in a separate PR as this one is getting really hard to navigate now)
* Do not merge until after ECK 3.3 release * See elastic/cloud-on-k8s#8800 (comment). This is updating the documentation for Default memory resources for both EPR and Autoops --------- Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [eck-operator](https://github.com/elastic/cloud-on-k8s) | minor | `3.2.0` → `3.3.0` | --- ### Release Notes <details> <summary>elastic/cloud-on-k8s (eck-operator)</summary> ### [`v3.3.0`](https://github.com/elastic/cloud-on-k8s/releases/tag/v3.3.0) [Compare Source](elastic/cloud-on-k8s@v3.2.0...v3.3.0) ##### Elastic Cloud on Kubernetes 3.3.0 - [Quickstart guide](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s#eck-quickstart) ##### Release Highlights ##### AutoOps Integration (Enterprise feature) ECK now supports integration with Elastic AutoOps through a new `AutoOpsAgentPolicy` custom resource. This allows you to instrument multiple Elasticsearch clusters at once for automated health monitoring and performance recommendations. The [AutoOps documentation](https://www.elastic.co/docs/deploy-manage/monitor/autoops) provides more details. ##### Elastic Package Registry Integration ECK now supports deploying and managing Elastic Package Registry (EPR) through a new `PackageRegistry` custom resource. This is particularly useful for air-gapped environments, enabling Kibana to reference a self-hosted registry instead of the public one. The [package registry documentation](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/package-registry) provides more details. ##### Multiple Stack Configuration Policies composition support (Enterprise feature) ECK now includes support for multiple Stack Config Policies targeting the same Elasticsearch cluster or Kibana instance, using a weight-based priority system for deterministic policy composition. The [stack config policy documentation](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/elastic-stack-configuration-policies) provides more details. ##### Features and enhancements - AutoOpsAgentPolicy support [#​8941](elastic/cloud-on-k8s#8941) (issue: [#​8789](elastic/cloud-on-k8s#8789)) - ElasticPackageRegistry support [#​8800](elastic/cloud-on-k8s#8800) (issue: [#​8925](elastic/cloud-on-k8s#8925)) - Stack Config Policies composition support [#​8917](elastic/cloud-on-k8s#8917) - Use standard Kibana labels and Helm labels on the ECK Operator pod [#​8840](elastic/cloud-on-k8s#8840) (issue: [#​8584](elastic/cloud-on-k8s#8584)) - Add service customization support for Elasticsearch remote cluster server [#​8892](elastic/cloud-on-k8s#8892) - Removal of Elasticsearch 6.x support from codebase [#​8979](elastic/cloud-on-k8s#8979) ##### Fixes - Upgrade master StatefulSets last when performing a version upgrade of Elasticsearch [#​8871](elastic/cloud-on-k8s#8871) (issue: [#​8429](elastic/cloud-on-k8s#8429)) - Fix race condition for pre-existing Stack Config Policy [#​8928](elastic/cloud-on-k8s#8928) (issue: [#​8912](elastic/cloud-on-k8s#8912)) - Do not set Kibana server.name [#​8930](elastic/cloud-on-k8s#8930) (issue: [#​8929](elastic/cloud-on-k8s#8929)) - Do not write `elasticsearch.k8s.elastic.co/managed-remote-clusters` when not necessary [#​8932](elastic/cloud-on-k8s#8932) (issue: [#​8781](elastic/cloud-on-k8s#8781)) - Cleanup orphaned secret mounts when removed from StackConfigPolicy [#​8937](elastic/cloud-on-k8s#8937) (issue: [#​8921](elastic/cloud-on-k8s#8921)) - Avoid duplicate error logging for generate GET operations on a GVK [#​8957](elastic/cloud-on-k8s#8957) - Remove single master at a time upscale restriction [#​8940](elastic/cloud-on-k8s#8940) (issue: [#​8939](elastic/cloud-on-k8s#8939)) - AutoOps: Ignore deprecated ES clusters [#​9008](elastic/cloud-on-k8s#9008) (issue: [#​9000](elastic/cloud-on-k8s#9000)) - AutoOps: Require 9.2.1 for AutoOps agent [#​9007](elastic/cloud-on-k8s#9007) (issue: [#​9000](elastic/cloud-on-k8s#9000)) - Multi-SCP: Flip weight semantics - higher weight takes precedence [#​9046](elastic/cloud-on-k8s#9046) ##### Documentation improvements - Update Google Cloud LoadBalancer recipe for new requirements [#​8843](elastic/cloud-on-k8s#8843) - Fix minUnavailable typo in PDB documentation [#​8898](elastic/cloud-on-k8s#8898) - Use GKE ComputeClass instead of DaemonSet for GKE AutoPilot [#​8982](elastic/cloud-on-k8s#8982) - Adjust `vm.max_map_count` to [`1048576`](elastic/cloud-on-k8s@1048576) in GKE AutoPilot recipes [#​8986](elastic/cloud-on-k8s#8986) - Remove support for Stack 7.17. [#​9038](elastic/cloud-on-k8s#9038) ##### Dependency updates - Go 1.25.2 => 1.25.6 - github.com/KimMachineGun/automemlimit v0.7.4 => v0.7.5 - github.com/elastic/go-ucfg v0.8.9-0.20250307075119-2a22403faaea => v0.8.9-0.20251017163010-3520930bed4f - github.com/gkampitakis/go-snaps v0.5.15 => v0.5.19 - github.com/google/go-containerregistry v0.20.6 => v0.20.7 - github.com/googlecloudplatform/compute-class-api => v0.0.0-20251208134148-ae2e7936c1f8 - github.com/prometheus/common v0.67.1 => v0.67.5 - github.com/spf13/cobra v1.10.1 => v1.10.2 - go.elastic.co/apm/v2 v2.7.1 => v2.7.2 - go.uber.org/zap v1.27.0 => v1.27.1 - golang.org/x/crypto v0.40.0 => v0.46.0 - k8s.io/api v0.34.1 => v0.35.0 - k8s.io/apimachinery v0.34.1 => v0.35.0 - k8s.io/client-go v0.34.1 => v0.35.0 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 => v0.0.0-20251002143259-bc988d571ff4 - sigs.k8s.io/controller-runtime v0.22.2 => v0.22.4 - sigs.k8s.io/controller-tools v0.19.0 => v0.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4wLjMiLCJ1cGRhdGVkSW5WZXIiOiI0My4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImNoYXJ0Il19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3682 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [elastic/cloud-on-k8s](https://github.com/elastic/cloud-on-k8s) | minor | `v3.2.0` → `v3.3.0` | --- ### Release Notes <details> <summary>elastic/cloud-on-k8s (elastic/cloud-on-k8s)</summary> ### [`v3.3.0`](https://github.com/elastic/cloud-on-k8s/releases/tag/v3.3.0) [Compare Source](elastic/cloud-on-k8s@v3.2.0...v3.3.0) ### Elastic Cloud on Kubernetes 3.3.0 - [Quickstart guide](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s#eck-quickstart) ##### Release Highlights ##### AutoOps Integration (Enterprise feature) ECK now supports integration with Elastic AutoOps through a new `AutoOpsAgentPolicy` custom resource. This allows you to instrument multiple Elasticsearch clusters at once for automated health monitoring and performance recommendations. The [AutoOps documentation](https://www.elastic.co/docs/deploy-manage/monitor/autoops) provides more details. ##### Elastic Package Registry Integration ECK now supports deploying and managing Elastic Package Registry (EPR) through a new `PackageRegistry` custom resource. This is particularly useful for air-gapped environments, enabling Kibana to reference a self-hosted registry instead of the public one. The [package registry documentation](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/package-registry) provides more details. ##### Multiple Stack Configuration Policies composition support (Enterprise feature) ECK now includes support for multiple Stack Config Policies targeting the same Elasticsearch cluster or Kibana instance, using a weight-based priority system for deterministic policy composition. The [stack config policy documentation](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/elastic-stack-configuration-policies) provides more details. ##### Features and enhancements - AutoOpsAgentPolicy support [#​8941](elastic/cloud-on-k8s#8941) (issue: [#​8789](elastic/cloud-on-k8s#8789)) - ElasticPackageRegistry support [#​8800](elastic/cloud-on-k8s#8800) (issue: [#​8925](elastic/cloud-on-k8s#8925)) - Stack Config Policies composition support [#​8917](elastic/cloud-on-k8s#8917) - Use standard Kibana labels and Helm labels on the ECK Operator pod [#​8840](elastic/cloud-on-k8s#8840) (issue: [#​8584](elastic/cloud-on-k8s#8584)) - Add service customization support for Elasticsearch remote cluster server [#​8892](elastic/cloud-on-k8s#8892) - Removal of Elasticsearch 6.x support from codebase [#​8979](elastic/cloud-on-k8s#8979) ##### Fixes - Upgrade master StatefulSets last when performing a version upgrade of Elasticsearch [#​8871](elastic/cloud-on-k8s#8871) (issue: [#​8429](elastic/cloud-on-k8s#8429)) - Fix race condition for pre-existing Stack Config Policy [#​8928](elastic/cloud-on-k8s#8928) (issue: [#​8912](elastic/cloud-on-k8s#8912)) - Do not set Kibana server.name [#​8930](elastic/cloud-on-k8s#8930) (issue: [#​8929](elastic/cloud-on-k8s#8929)) - Do not write `elasticsearch.k8s.elastic.co/managed-remote-clusters` when not necessary [#​8932](elastic/cloud-on-k8s#8932) (issue: [#​8781](elastic/cloud-on-k8s#8781)) - Cleanup orphaned secret mounts when removed from StackConfigPolicy [#​8937](elastic/cloud-on-k8s#8937) (issue: [#​8921](elastic/cloud-on-k8s#8921)) - Avoid duplicate error logging for generate GET operations on a GVK [#​8957](elastic/cloud-on-k8s#8957) - Remove single master at a time upscale restriction [#​8940](elastic/cloud-on-k8s#8940) (issue: [#​8939](elastic/cloud-on-k8s#8939)) - AutoOps: Ignore deprecated ES clusters [#​9008](elastic/cloud-on-k8s#9008) (issue: [#​9000](elastic/cloud-on-k8s#9000)) - AutoOps: Require 9.2.1 for AutoOps agent [#​9007](elastic/cloud-on-k8s#9007) (issue: [#​9000](elastic/cloud-on-k8s#9000)) - Multi-SCP: Flip weight semantics - higher weight takes precedence [#​9046](elastic/cloud-on-k8s#9046) ##### Documentation improvements - Update Google Cloud LoadBalancer recipe for new requirements [#​8843](elastic/cloud-on-k8s#8843) - Fix minUnavailable typo in PDB documentation [#​8898](elastic/cloud-on-k8s#8898) - Use GKE ComputeClass instead of DaemonSet for GKE AutoPilot [#​8982](elastic/cloud-on-k8s#8982) - Adjust `vm.max_map_count` to [`1048576`](elastic/cloud-on-k8s@1048576) in GKE AutoPilot recipes [#​8986](elastic/cloud-on-k8s#8986) - Remove support for Stack 7.17. [#​9038](elastic/cloud-on-k8s#9038) ##### Dependency updates - Go 1.25.2 => 1.25.6 - github.com/KimMachineGun/automemlimit v0.7.4 => v0.7.5 - github.com/elastic/go-ucfg v0.8.9-0.20250307075119-2a22403faaea => v0.8.9-0.20251017163010-3520930bed4f - github.com/gkampitakis/go-snaps v0.5.15 => v0.5.19 - github.com/google/go-containerregistry v0.20.6 => v0.20.7 - github.com/googlecloudplatform/compute-class-api => v0.0.0-20251208134148-ae2e7936c1f8 - github.com/prometheus/common v0.67.1 => v0.67.5 - github.com/spf13/cobra v1.10.1 => v1.10.2 - go.elastic.co/apm/v2 v2.7.1 => v2.7.2 - go.uber.org/zap v1.27.0 => v1.27.1 - golang.org/x/crypto v0.40.0 => v0.46.0 - k8s.io/api v0.34.1 => v0.35.0 - k8s.io/apimachinery v0.34.1 => v0.35.0 - k8s.io/client-go v0.34.1 => v0.35.0 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 => v0.0.0-20251002143259-bc988d571ff4 - sigs.k8s.io/controller-runtime v0.22.2 => v0.22.4 - sigs.k8s.io/controller-tools v0.19.0 => v0.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4wLjMiLCJ1cGRhdGVkSW5WZXIiOiI0My4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3685 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Resolves #8925
Elastic Package Registry (EPR) has been highly requested to be added to ECK.
EPR does not have any references since it does not require a license nor any other application.
The following was implemented for EPR
xpack.fleet.registryUrland set the environment variableNODE_EXTRA_CA_CERTSto the path of EPR's CA which is mountedNODE_EXTRA_CA_CERTSwith a mount the controller will combine the certs appending the EPR's CA to the users specified CAThis was tested with and without setting
NODE_EXTRA_CA_CERTSusing the below manifest