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

Randomizing default helm credentials #8180

Merged
merged 57 commits into from
Dec 10, 2023

Conversation

Param-29
Copy link
Contributor

Description

Please include a summary of the change, the motivation, and any additional context that will help others understand your PR. If it closes one or more open issues, please tag them as described here.

Affected Dependencies

List any dependencies that are required for this change.

How has this been tested?

  • Describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • List any relevant details for your test configuration.

Checklist

@Param-29 Param-29 changed the title Randomizing default helm credentials [WIP] Randomizing default helm credentials Oct 19, 2023
@madhavajay
Copy link
Collaborator

Suggestions:

  • change {{}} go templates to '{{}}' syntax in .yaml file
  • remove /helm chart folder from pre-commit yaml
  • add lookup syntax to secrets so that it keeps existing secrets

@madhavajay madhavajay added 0.8.2 and removed 0.8.2 labels Oct 30, 2023
@Param-29
Copy link
Contributor Author

from local testing

(syft311) $ kubectl get secrets -n syft
NAME                          TYPE                 DATA   AGE
mongosecret                   Opaque               4      94s
syftsecret                    Opaque               2      94s
sh.helm.release.v1.syft3.v1   helm.sh/release.v1   1      94s
$ kubectl describe secret mongosecret -n syft
Name:         mongosecret
Namespace:    syft
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  meta.helm.sh/release-name: syft3
              meta.helm.sh/release-namespace: syft

Type:  Opaque

Data
====
mongo-password-secret:    32 bytes
mongo-username-secret:    32 bytes
mongoInitdbRootPassword:  32 bytes
mongoInitdbRootUsername:  32 bytes
$ kubectl describe secret syftsecret -n 
syft
Name:         syftsecret
Namespace:    syft
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  meta.helm.sh/release-name: syft3
              meta.helm.sh/release-namespace: syft

Type:  Opaque

Data
====
defaultRootPassword:  32 bytes
stackApiKey:          32 bytes

@Param-29 Param-29 changed the title [WIP] Randomizing default helm credentials Randomizing default helm credentials Nov 15, 2023
@Param-29
Copy link
Contributor Author

(syft311) param@param-Legion-5-15IAH7H:~/projects/oss/PySyft/packages/grid$ kubectl describe secrets seaweedfsecret -n syft4
Name:         seaweedfsecret
Namespace:    syft4
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  meta.helm.sh/release-name: syft4
              meta.helm.sh/release-namespace: syft4

Type:  Opaque

Data
====
S3_ROOT_PWD_SECRET:   32 bytes
S3_ROOT_USER_SECRET:  32 bytes

rasswanth-s and others added 27 commits December 6, 2023 21:28
Co-authored-by: Param-29 <param.mirani1999@gmail.com>
- Deduplicated values in mongo-secret
- Removed seaweedfs username during randomization
- Added a new field for mongo username in values.yaml
- As environment variables cannot have hypens
- And cluster names cannot have underscores
- These are required for passing the password as environment variables to test randomization
- Add environment variable mapping for randomized password in tox
Copy link
Collaborator

@rasswanth-s rasswanth-s left a comment

Choose a reason for hiding this comment

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

Great work @Param-29 🚀 🎸

@rasswanth-s rasswanth-s merged commit 6b0da6a into OpenMined:dev Dec 10, 2023
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants