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

fix: add release name as prefix to chart resource names during deployment #392

Closed
wants to merge 2 commits into from

Conversation

leninmehedy
Copy link
Member

@leninmehedy leninmehedy commented Oct 8, 2023

Description

This pull request changes the following:

  • allow custom release name as prefix to all resources same as mirror-node resources
  • update makefile scripts to use the RELEASE_NAME env var from env or .env file

Below screenshot shows an example deployment with RELEASE_NAME=fst:

Screenshot 2023-10-09 at 9 30 40 AM

Limitations:

I started working on this with the anticipation that this could allow deploying FST chart multiple times in the same namespace. For example, if a user has access to a single namespace, he/she could deploy the FST chart multiple times in the same namespace for different test scenario and avoid the explosion namespaces in the shared cluster.

However, it appears dependent charts e.g. mirror-node creates some secrets without release name prefix (e.g. it creates "mirror-passwords" instead of "{{.Release.Name}}-mirror-passwords)", so it blocks us from deploying the chart multiple times in the same namespace)

So at the end this PR doesn't add much value except the fact that it is now consistent with mirror-node resource naming. However, if mirror-node updates their secrets with release name prefix, we would be able to deploy the same chart multiple times for different test scenario and avoid the "namespace explosion" in the cluster...

Screenshot 2023-10-09 at 9 36 19 AM

Related Issues

@leninmehedy leninmehedy changed the title feat: allow deploying chart with custom release name feat: add release name as prefix to resource names Oct 8, 2023
@leninmehedy leninmehedy changed the title feat: add release name as prefix to resource names feat: add release name as prefix to chart resource names during deployment Oct 8, 2023
@leninmehedy leninmehedy changed the title feat: add release name as prefix to chart resource names during deployment fix: add release name as prefix to chart resource names during deployment Oct 8, 2023
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

Unit Test Results

  23 files  ±0    23 suites  ±0   48s ⏱️ +2s
103 tests ±0    99 ✔️ ±0  4 💤 ±0  0 ±0 
104 runs  ±0  100 ✔️ ±0  4 💤 ±0  0 ±0 

Results for commit d9009b8. ± Comparison against base commit 40e737a.

♻️ This comment has been updated with latest results.

@leninmehedy leninmehedy self-assigned this Oct 8, 2023
Base automatically changed from 373-nodeselector-to-all-pods to main October 15, 2023 23:30
@leninmehedy leninmehedy force-pushed the 388-allow-custom-release-name branch from 3fc98cb to d9009b8 Compare October 15, 2023 23:39
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@leninmehedy
Copy link
Member Author

leninmehedy commented Oct 16, 2023

After discussing with Nathan we decided not to proceed in this direction because of the following reasons:

  • Third-party dependent chart resources may not support multiple deployment in the same namespace (e.g. we already discovered issue with the 'secret' created by mirror-node)
  • Namespace is the best and standard way to segregate test environments. So all our tests environments should be segregated using namespace to avoid confusion.

So in summary, we shall assume that the chart can be deployed only once in a namespace.

However, all FST resources should be labeled with the test related metadata (see #409)

@leninmehedy leninmehedy deleted the 388-allow-custom-release-name branch October 16, 2023 04:51
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.

Charts[GKE-BUG] Allow the chart to be deployed with different release-name
1 participant