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

Customize opensearch deployment annotation through values.yaml #407

Merged
merged 35 commits into from
Apr 24, 2023

Conversation

prathaptce
Copy link
Contributor

@prathaptce prathaptce commented Mar 21, 2023

Description

[Currently, OpenSearch deployment is not customizable using values.yaml . I'm trying to add deployment annotation in the values.yaml , which will be used by the deployment.yaml and configures the metadata annotation of the deployment.]

Issues Resolved

[https://github.com/opensearch-project/opensearch-devops/issues/115]

Check List

  • Commits are signed per the DCO using --signoff

For any changes to files within Helm chart directories:

  • Helm chart version bumped
  • Helm chart CHANGELOG.md updated to reflect change

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor Author

@prathaptce prathaptce left a comment

Choose a reason for hiding this comment

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

Currently, OpenSearch deployment is not customizable using values.yaml . I'm trying to add deployment annotation in the values.yaml , which will be used by the deployment.yaml and configures the metadata annotation of the deployment.

Use case: In the DR site deployments, we want to control the deployment of OpenSearch based on a few Deployment annotations. which is not possible now as deployment annotations cannot be passed through values.yaml

@prathaptce prathaptce changed the title Prathaptce patch 1 1 Customize opensearch deployment annotation through values.yaml Mar 22, 2023
@prathaptce
Copy link
Contributor Author

@bbarani , Hi, I'm new to this review process. I have submitted the changes needed for customizing the OpenSearch deployment. Can someone review these changes? thanks

@prudhvigodithi
Copy link
Collaborator

Hey @prathaptce thanks for the contribution, please check the following points.

  1. The DCO check is missing, please make sure the commits are signed.
  2. The Helm chart version has to be bumped (sample PR).
  3. The CHANGELOG.md has to be recorded along with if required updating README.md.

Apart from this I will review the technical aspects of the chart shortly, thank you.

@prathaptce
Copy link
Contributor Author

Hey @prathaptce thanks for the contribution, please check the following points.

  1. The DCO check is missing, please make sure the commits are signed.
  2. The Helm chart version has to be bumped (sample PR).
  3. The CHANGELOG.md has to be recorded along with if required updating README.md.

Apart from this I will review the technical aspects of the chart shortly, thank you.

Now, DCO check is passing, helm chart version is bumped & 'CHANGELOG.md' is updated with the changes done for this PR

@@ -131,6 +131,9 @@ image:

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster

# Deployment annotations
annotations: {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey Can we please use as openSearchAnnotations?, also please change the comment to # OpenSearch Statefulset annotations
Thank you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to openSearchAnnotations & comments to stateful set annotations

@@ -67,6 +67,9 @@ secretMounts: []

podAnnotations: {}

# Deployment annotations
annotations: {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey Can we please use as dashboardAnnotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed this comment as well

@prudhvigodithi
Copy link
Collaborator

Hey @prathaptce apart from my previous suggestions, can you take care of the lint errors also please update the README files in the chart with the new annotation changes.
Thank you

@@ -3,6 +3,10 @@ kind: Deployment
metadata:
name: {{ template "opensearch-dashboards.fullname" . }}
labels: {{- include "opensearch-dashboards.labels" . | nindent 4 }}
{{- with .Values.annotations }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be as dashboardAnnotations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made the necessary changes here as well

@@ -7,6 +7,9 @@ metadata:
{{- include "opensearch.labels" . | nindent 4 }}
annotations:
majorVersion: "{{ include "opensearch.majorVersion" . }}"
{{- with .Values.annotations }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be as openSearchAnnotations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

incorporated the changes

@prathaptce
Copy link
Contributor Author

Hey @prathaptce apart from my previous suggestions, can you take care of the lint errors also please update the README files in the chart with the new annotation changes. Thank you

I'm not able to execute ct lint locally, is there a way I can trigger the ct lint job in GitHub & check the error? I'm not sure which line is creating the lint error

zelinh and others added 13 commits March 24, 2023 13:22
Signed-off-by: Zelin Hao <zelinhao@amazon.com>

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
…oject#356)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
* Resolve Kind Cluster not able to be built in PR checks

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Fix the kindest/node versions on docker images

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
…oject#358)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
…opensearch-project#342)

* allow adding plugins and change defaultmode for opensearch dashboards yaml file

Signed-off-by: Lu Yu <nluyu@amazon.com>

* bump version and update changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add new line

Signed-off-by: Lu Yu <nluyu@amazon.com>

* bump version for os

Signed-off-by: Lu Yu <nluyu@amazon.com>

* resolve conflict in changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

* trigger build

Signed-off-by: Lu Yu <nluyu@amazon.com>

Signed-off-by: Lu Yu <nluyu@amazon.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
…earch-project#344)

* fix securityConfig.path

Signed-off-by: Ruslan Gainanov <gromrx1@gmail.com>

* add link to issue

Signed-off-by: Ruslan Gainanov <gromrx1@gmail.com>

Signed-off-by: Ruslan Gainanov <gromrx1@gmail.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
* Update appVersion to 2.4.1

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Update appVersion to 2.4.1

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Fix changelog

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Fix changelog

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Fix version

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
…t#336)

Signed-off-by: Christian Kuhn <phello@gmx.de>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
opensearch-project#367)

Signed-off-by: dblock <dblock@amazon.com>

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
Signed-off-by: Rishabh Singh <sngri@amazon.com>

Signed-off-by: Rishabh Singh <sngri@amazon.com>
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
@prathaptce prathaptce requested review from prudhvigodithi and removed request for gaiksaya, peterzhuamazon and bbarani March 24, 2023 08:50
@prathaptce
Copy link
Contributor Author

prudhvigodithi

@prudhvigodithi, I have addressed all the comments. Let me know if the lint error still exists. thanks

@@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.9.2]
### Added
- Added custom opensearch deployment annotation through values.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

[NIT] Thanks @prathaptce noticed one more, please check

  • Added custom opensearch and dashboard annotations through values.yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. updated the same

Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
@prudhvigodithi prudhvigodithi self-requested a review March 24, 2023 15:18
@prudhvigodithi
Copy link
Collaborator

Thanks @prathaptce , @TheAlgo and @peterzhuamazon can you please review ?
Thank you

@prathaptce
Copy link
Contributor Author

Thanks @prathaptce , @TheAlgo and @peterzhuamazon can you please review ? Thank you

@TheAlgo @peterzhuamazon, can you please review? thank you

@prudhvigodithi
Copy link
Collaborator

Hey @prathaptce I did notice one thing the Chary.yaml file is not incremented, sample PR https://github.com/opensearch-project/helm-charts/pull/375/files, can you please check.

@prudhvigodithi prudhvigodithi self-requested a review March 29, 2023 18:07
Signed-off-by: prathaptce <86703966+prathaptce@users.noreply.github.com>
@prathaptce
Copy link
Contributor Author

Hey @prathaptce I did notice one thing the Chary.yaml file is not incremented, sample PR https://github.com/opensearch-project/helm-charts/pull/375/files, can you please check.

Just now pumped up the version numbers in Chart.yaml. Please check now

@prudhvigodithi
Copy link
Collaborator

prudhvigodithi commented Mar 29, 2023

Pinging @TheAlgo and @peterzhuamazon :)

@prathaptce
Copy link
Contributor Author

hi @TheAlgo @peterzhuamazon, Can you please review the changes & let me know your comments?

@prathaptce
Copy link
Contributor Author

Can this PR merged? if no other comments. thanks

@prudhvigodithi
Copy link
Collaborator

Hey @TheAlgo @peterzhuamazon please add your approval. Thanks for your patience @prathaptce
Thank you

@TheAlgo
Copy link
Member

TheAlgo commented Apr 22, 2023

Hey @TheAlgo @peterzhuamazon please add your approval. Thanks for your patience @prathaptce Thank you

Will check this week. Apologies for delays.

Copy link
Member

@TheAlgo TheAlgo left a comment

Choose a reason for hiding this comment

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

LGTM!

@prathaptce
Copy link
Contributor Author

@TheAlgo .Thank you. Can you please merge this PR?

@bbarani bbarani merged commit d5c3493 into opensearch-project:main Apr 24, 2023
@bbarani
Copy link
Member

bbarani commented Apr 24, 2023

Merging the PR as its approved.

@prudhvigodithi
Copy link
Collaborator

Hey @prathaptce can you please backport to 1.x? as I see this feature is useful for 1.x version as well.
Thank you

@prathaptce
Copy link
Contributor Author

Sure @prudhvigodithi, I will raise the PR for 1.x as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.