Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More APIs for StackConfigPolicy #6195

Merged
merged 9 commits into from
Nov 30, 2022

Conversation

thbkrkr
Copy link
Contributor

@thbkrkr thbkrkr commented Nov 28, 2022

Adds support for more APIs to the StackConfigPolicy custom resource:

  • Ingest pipelines (/_ingest/pipeline)
  • Index Lifecycle Policies (/_ilm/policy)
  • Index templates (/_index_template)
  • Components templates (/_component_template)
  • Security Role mappings (/_security/role_mapping)

Additional things:

  • remove managed labels if they are no longer defined when reconciling file settings Secret
  • fix case 'Settings secret must be updated to reflect the policy settings' in controller_test.go

For testing (here is a manifest with all settings):

kubectl apply -f https://gist.githubusercontent.com/thbkrkr/70bf369e648218e477b2252f83e00ef7/raw/367833447d2d14ee9619045434a82a156d6bb4b5/stackconfigpolicy_all-settings.yaml

/_cluster/state | jq '.metadata.reserved_state' should return all configured settings:

{"file_settings":{"version":1669732664259516200,"handlers":"cluster_settings":{"keys":["indices.recovery.max_bytes_per_sec"]},"ilm":{"keys":["ilm_test"]},"index_templates":{"keys":["component_template:component_template_test","component_template:runtime_component_template_test","composable_index_template:template_test"]},"ingest_pipelines":{"keys":["pipeline_test"]},"role_mappings":{"keys":["role_test"]},"slm":{"keys":["slm_test"]},"snapshot_repositories":{"keys":["repo_test"]}},"errors":null}}

kubectl delete scp config-policy

/_cluster/state | jq '.metadata.reserved_state' should return no configured settings:

{"file_settings":{"version":1669733827130773500,"handlers":{"cluster_settings":{"keys":[]},"ilm":{"keys":[]},"index_templates":{"keys":[]},"ingest_pipelines":{"keys":[]},"role_mappings":{"keys":[]},"slm":{"keys":[]},"snapshot_repositories":{"keys":[]}},"errors":null}}

add empty objects corresponding to new apis
improve policy hash handling
fix case 'Settings secret must be updated to reflect the policy settings'
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have not tested it yet. Do we plan to make an exception to the feature freeze for 2.6?

@naemono
Copy link
Contributor

naemono commented Nov 30, 2022

💚 All backports created successfully

Status Branch Result
2.6

Questions ?

Please refer to the Backport tool documentation

naemono pushed a commit to naemono/cloud-on-k8s that referenced this pull request Nov 30, 2022
Adds support for more APIs to the StackConfigPolicy custom resource:
- Ingest pipelines (/_ingest/pipeline)
- Index Lifecycle Policies (/_ilm/policy)
- Index templates (/_index_template)
- Components templates (/_component_template)
- Security Role mappings (/_security/role_mapping)

Additional things:
- remove managed labels if they are no longer defined when reconciling file settings Secret
- fix case 'Settings secret must be updated to reflect the policy settings' in controller_test.go

(cherry picked from commit 4f9c235)
naemono added a commit that referenced this pull request Dec 12, 2022
… for StackConfigPolicy (#6195) | Update eck-diagnostics documentation for filters. (#6191) (#6203)

* Version gate for file-based settings volume (#6200)

Adds a version gate to configure the file-based settings volume and volumeMounts in the Elasticsearch pods and to reconcile the file-based settings Secret.

(cherry picked from commit 42a7f18)

* More APIs for StackConfigPolicy (#6195)

Adds support for more APIs to the StackConfigPolicy custom resource:
- Ingest pipelines (/_ingest/pipeline)
- Index Lifecycle Policies (/_ilm/policy)
- Index templates (/_index_template)
- Components templates (/_component_template)
- Security Role mappings (/_security/role_mapping)

Additional things:
- remove managed labels if they are no longer defined when reconciling file settings Secret
- fix case 'Settings secret must be updated to reflect the policy settings' in controller_test.go

(cherry picked from commit 4f9c235)

* Update eck-diagnostics documentation for filters. (#6191)

(cherry picked from commit 747518a)

Co-authored-by: Thibault Richard <[email protected]>
@thbkrkr thbkrkr deleted the stackconfigpolicy-more-apis branch December 20, 2022 16:53
@thbkrkr thbkrkr added the exclude-from-release-notes Exclude this PR from appearing in the release notes label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality exclude-from-release-notes Exclude this PR from appearing in the release notes v2.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants