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

feat: propagate labels such as envName and projectName #5063

Merged
merged 16 commits into from May 14, 2024

Conversation

prakash100198
Copy link
Contributor

@prakash100198 prakash100198 commented May 4, 2024

Description

This pr addresses the issue that we don't export appName, envName and project into k8s objects managed in devtron.
Fixes #5031

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


…emplate and changes in ReleaseAttributes obj to support diff labels such as appName, envName etc..
Copy link

gitguardian bot commented May 4, 2024

⚠️ GitGuardian has uncovered 6 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9257608 Triggered Base64 AWS keys dc23583 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/test-values.json View secret
9257608 Triggered Base64 AWS keys 8e61016 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/test-values.json View secret
2763127 Triggered Generic High Entropy Secret 8e61016 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/secrets-test-values.yaml View secret
2763127 Triggered Generic High Entropy Secret dc23583 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/secrets-test-values.yaml View secret
141558 Triggered Generic High Entropy Secret dc23583 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/env-values.yaml View secret
141558 Triggered Generic High Entropy Secret 8e61016 scripts/devtron-reference-helm-charts/deployment-chart_4-20-0-prakash-test1/env-values.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

{{- end}}
{{- end}}
{{- end}}
- name: {{ $.Chart.Name }}

Check warning

Code scanning / SonarCloud

Memory limits should be enforced

<!--SONAR_ISSUE_KEY:AY9D2vB0R3RBEdb3q_2_-->Specify a memory limit for this container. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_devtron&issues=AY9D2vB0R3RBEdb3q_2_&open=AY9D2vB0R3RBEdb3q_2_&pullRequest=5063">SonarCloud</a></p>
{{- end}}
{{- end}}
{{- end}}
- name: {{ $.Chart.Name }}

Check warning

Code scanning / SonarCloud

CPU limits should be enforced

<!--SONAR_ISSUE_KEY:AY9D2vB0R3RBEdb3q_2--->Specify a CPU limit for this container. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_devtron&issues=AY9D2vB0R3RBEdb3q_2-&open=AY9D2vB0R3RBEdb3q_2-&pullRequest=5063">SonarCloud</a></p>
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
spec:

Check warning

Code scanning / SonarCloud

Service account tokens should not be mounted in pods

<!--SONAR_ISSUE_KEY:AY9D2vB0R3RBEdb3q_3A-->Set automountServiceAccountToken to false for this specification of kind Deployment. <p>See more on <a href="https://sonarcloud.io/project/issues?id=devtron-labs_devtron&issues=AY9D2vB0R3RBEdb3q_3A&open=AY9D2vB0R3RBEdb3q_3A&pullRequest=5063">SonarCloud</a></p>
nishant-d
nishant-d previously approved these changes May 7, 2024
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@prakash100198 prakash100198 changed the title Propagate labels enhancement: propagate labels such as envName and projectName May 14, 2024
@prakash100198 prakash100198 changed the title enhancement: propagate labels such as envName and projectName feat: propagate labels such as envName and projectName May 14, 2024
@prakash100198 prakash100198 merged commit 3f8a211 into main May 14, 2024
7 of 10 checks passed
@prakash100198 prakash100198 deleted the propagate-labels branch May 14, 2024 06:48
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.

Feature: Need AppName and EnvName in resources of devtronApp
2 participants