Skip to content

Commit

Permalink
[super-agent] Secret garbage collection (#1540)
Browse files Browse the repository at this point in the history
#### Is this a new chart
no
#### What this PR does / why we need it:
To garbage collect secrets after the disinstallation

#### Special notes for your reviewer:

#### Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove
unrelated fields.]
- [x] Chart Version bumped
- [x] Variables are documented in the README.md
- [x] Title of the PR starts with chart name (e.g. `[mychartname]`)
  • Loading branch information
paologallinaharbur authored Dec 10, 2024
1 parent ab3c2fd commit 1e67d35
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions charts/super-agent/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dependencies:
version: 2.13.0
- name: super-agent-deployment
repository: ""
version: 0.0.28-beta
version: 0.0.29-beta
- name: common-library
repository: https://helm-charts.newrelic.com
version: 1.3.0
digest: sha256:1f0d1be3ed6ab4f1cde3dd610f0743f217651cd93a87a2447d656452d0eaf853
generated: "2024-12-02T16:47:50.023256+01:00"
digest: sha256:c827e90c8a5deac2f2795887c33a545109ea2a8755121cfc0818da87c3effa6e
generated: "2024-12-06T10:45:07.728045+01:00"
4 changes: 2 additions & 2 deletions charts/super-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: super-agent
description: Bootstraps New Relic' Super Agent

type: application
version: 0.0.26-beta
version: 0.0.27-beta

dependencies:
- name: flux2
repository: https://fluxcd-community.github.io/helm-charts
version: 2.13.0
condition: flux2.enabled
- name: super-agent-deployment
version: 0.0.28-beta
version: 0.0.29-beta
condition: super-agent-deployment.enabled
# The following dependency is needed as sub-dependency of super-agent-deployment
- name: common-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart to install New Relic Super agent on Kubernetes

type: application

version: 0.0.28-beta
version: 0.0.29-beta

keywords:
- newrelic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ spec:
# We want to avoid having the SA recreating some of the resources we are deleting running this job
kubectl scale deployment --replicas=0 {{ include "newrelic.common.naming.fullname" . }} -n {{ $.Release.Namespace }} --timeout=60s
# Delete the standard resources (configmaps) managed by the super-agent
# Delete the standard resources (configmaps and secrets) managed by the super-agent
kubectl delete configmaps -n {{ .Release.Namespace }} -l {{ $saResourcesLabelSelector }}
kubectl delete secrets -n {{ .Release.Namespace }} -l {{ $saResourcesLabelSelector }}
# Delete the CRs managed by the super-agent if the corresponding CRDs exist
{{ range $i, $cr := $saCRList }}
Expand Down

0 comments on commit 1e67d35

Please sign in to comment.