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

added missing secrets on statefulset template #272

Closed
wants to merge 3 commits into from

Conversation

phijojo
Copy link

@phijojo phijojo commented May 31, 2022

Signed-off-by: Phijo Jospeh [email protected]

Description

The Statefulset template is missing 2 secrets when adding individual secrets.

Issues Resolved

#191

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.

@phijojo phijojo force-pushed the add-missing-secrets branch from b9c70eb to 2460922 Compare June 1, 2022 09:21
@prudhvigodithi
Copy link
Member

prudhvigodithi commented Jun 1, 2022

From Comment #191 (comment)
@TheAlgo @DandyDeveloper @peterzhuamazon @bbarani are we good with adding nodesDnSecret and whitelistSecret option within chart, thoughts ?

@@ -30,3 +30,5 @@ maintainers:
- name: peterzhuamazon
- name: prudhvigodithi
- name: TheAlgo
- name: phijojo
Copy link
Member

@bbarani bbarani Jun 1, 2022

Choose a reason for hiding this comment

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

We wont be able to add you as a maintainer without going through the nomination process. Please refer to at maintainers.md guide to understand the process to become a maintainer.

Copy link
Author

Choose a reason for hiding this comment

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

Good to know, thanks for sharing the document. I have removed my name from the maintainer's list.

Copy link
Collaborator

@DandyDeveloper DandyDeveloper left a comment

Choose a reason for hiding this comment

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

One of the problems with the whitelist is in 1.X its whitelist but in 2.X its now become allowlist.

We need to cater to both by adding a condition on the version of Opensearch being deployed.

Comment on lines +198 to +202
{{- if .Values.securityConfig.whitelistSecret }}
- name: whitelist
secret:
secretName: {{ .Values.securityConfig.whitelistSecret }}
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it should be.
I have used 2.0.0 image, in which the securityadmin.sh doesn't check for allowlist.yml instead it's still using whitelist.yml.So I guess securityadmin.sh need a change before we use allowlist.yml.

Comment on lines +388 to +392
{{- if .Values.securityConfig.whitelistSecret }}
- mountPath: {{ .Values.securityConfig.path }}/whitelist.yml
name: whitelist
subPath: whitelist.yml
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it should be.
I have used 2.0.0 image, in which the securityadmin.sh doesn't check for allowlist.yml instead it's still using whitelist.yml.So I guess securityadmin.sh need a change before we use allowlist.yml.

Copy link
Author

Choose a reason for hiding this comment

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

@DandyDeveloper @prudhvigodithi @TheAlgo

I think it's a bug in securityadmin.sh. I have added a ticket for that opensearch-project/security#1879

I'll change whitelist.yml to allowlist.yml on this PR and will create another PR for 1.x.x to handle the whitelist.yml

@prudhvigodithi
Copy link
Member

prudhvigodithi commented Jun 3, 2022

Hey @DandyDeveloper and @phijojo we have main and 1.x branches that support 2.x and 1.x versions, PR can be raised to main branch that supports allowlist and use whitelist in 1.x branch.
https://github.com/opensearch-project/helm-charts#version-and-branching
@peterzhuamazon

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.

Changes looks good, the only thing I am not sure on the whitelist/allowlist thingy. I am fine with whatever @prudhvigodithi has suggested

@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [Unreleased]
### Added
- Updated StatefulSet with node_dn.yml and whitelist.yml
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind seeing the PR(s) before on updating the CHANGELOG?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, Do you want me to remove this from the current PR and submit a different one?

Copy link
Member

Choose a reason for hiding this comment

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

@prudhvigodithi
Copy link
Member

@prudhvigodithi
Copy link
Member

prudhvigodithi commented Jun 11, 2022

Hey since whitelist works for both 2.x and 1.x we can push this to add whitelist and ignore allowlist, until opensearch-project/security#1879 this gets addressed, I have tested with whitelist secret and the chart works fine. Thoughts ? @peterzhuamazon @DandyDeveloper @TheAlgo @bbarani @phijojo @smlx

@peterzhuamazon peterzhuamazon linked an issue Jul 11, 2022 that may be closed by this pull request
@peterzhuamazon
Copy link
Member

Hi @phijojo any progress to keep this PR going?
Thanks.

@bbarani
Copy link
Member

bbarani commented Feb 9, 2023

Hi @phijojo @prudhvigodithi Any updates on this PR?

@prudhvigodithi prudhvigodithi marked this pull request as draft March 2, 2023 00:35
@prudhvigodithi
Copy link
Member

Hey @phijojo I have converted this PR to draft, please let us know if this PR required and a valid scenario.
Thank you

@prudhvigodithi
Copy link
Member

Hey @phijojo closing this PR, please re-open if required.
Thank you for your contribution.

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.

[BUG][opensearch] securityConfigSecret not volumeMount(ed)
6 participants