Skip to content

Commit 8a32b66

Browse files
[agent-control] imageToolkit is not part of child chart values (#1761)
1 parent d7a2aa2 commit 8a32b66

File tree

6 files changed

+31
-17
lines changed

6 files changed

+31
-17
lines changed

charts/agent-control/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: agent-control
33
description: Bootstraps New Relic' Agent Control
44

55
type: application
6-
version: 0.0.68
6+
version: 0.0.69
77
# This is the agent-control-deployment chart version.
88
appVersion: 0.0.52
99

charts/agent-control/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ agent-control-deployment:
7474
| agent-control-deployment | object | See `values.yaml` | Values for the agent-control-deployment chart. Ref.: https://github.com/newrelic/helm-charts/blob/master/charts/agent-control-deployment/values.yaml |
7575
| agent-control-deployment.chartRepositoryUrl | string | `"https://helm-charts.newrelic.com"` | The repository URL from where the `agent-control-deployment` chart will be installed. |
7676
| agent-control-deployment.enabled | bool | `true` | Enable the installation of the Agent Control. |
77-
| agent-control-deployment.toolkitImage | object | `{"pullPolicy":"IfNotPresent","pullSecrets":[],"registry":null,"repository":"newrelic/newrelic-agent-control-cli","tag":"nightly"}` | The image that contains the necessary tools to install and uninstall Agent Control. |
78-
| agent-control-deployment.toolkitImage.pullSecrets | list | `[]` | The secrets that are needed to pull images from a custom registry. |
7977
| flux2 | object | See `values.yaml` | Values for the Flux chart. Ref.: https://github.com/fluxcd-community/helm-charts/blob/flux2-2.10.2/charts/flux2/values.yaml |
8078
| flux2.clusterDomain | string | `"cluster.local"` | This is the domain name of the cluster. |
8179
| flux2.enabled | bool | `true` | Enable or disable FluxCD installation. New Relic' Agent Control need Flux to work, but the user can use an already existing Flux deployment. With that use case, the use can disable Flux and use this chart to only install the CRs to deploy the Agent Control. |
@@ -86,6 +84,8 @@ agent-control-deployment:
8684
| flux2.watchAllNamespaces | bool | `false` | As we are using Flux as a tool from the agent control to release new workloads, we do not want Flux to listen to all CRs created on the whole cluster. If the user does not want to use Flux and is only using it because of the agent control, this is the way to go so the cluster has deployed all operators needed by the agent control. But if the user want to use Flux for other purposes besides the agent control, this toggle can be used to allow Flux to work on the whole cluster. |
8785
| fullnameOverride | string | `""` | Override the full name of the release |
8886
| nameOverride | string | `""` | Override the name of the chart |
87+
| toolkitImage | object | `{"pullPolicy":"IfNotPresent","pullSecrets":[],"registry":null,"repository":"newrelic/newrelic-agent-control-cli","tag":"nightly"}` | The image that contains the necessary tools to install and uninstall Agent Control. |
88+
| toolkitImage.pullSecrets | list | `[]` | The secrets that are needed to pull images from a custom registry. |
8989

9090
## Maintainers
9191

charts/agent-control/templates/install.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
serviceAccountName: {{ include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" .Release.Name "suffix" "install-job") }}
1919
containers:
2020
- name: install-agent-control-deployment
21-
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" (index .Values "agent-control-deployment").toolkitImage "context" .) }}
22-
imagePullPolicy: {{ (index .Values "agent-control-deployment").toolkitImage.pullPolicy }}
21+
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" .Values.toolkitImage "context" .) }}
22+
imagePullPolicy: {{ .Values.toolkitImage.pullPolicy }}
2323
resources:
2424
limits:
2525
cpu: 100m

charts/agent-control/templates/uninstall.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
serviceAccountName: {{ include "newrelic.common.naming.truncateToDNSWithSuffix" (dict "name" .Release.Name "suffix" "uninstall-job") }}
1919
containers:
2020
- name: uninstall-agent-control-deployment
21-
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" (index .Values "agent-control-deployment").toolkitImage "context" .) }}
22-
imagePullPolicy: {{ (index .Values "agent-control-deployment").toolkitImage.pullPolicy }}
21+
image: {{ include "newrelic.common.images.image" ( dict "imageRoot" .Values.toolkitImage "context" .) }}
22+
imagePullPolicy: {{ .Values.toolkitImage.pullPolicy }}
2323
resources:
2424
limits:
2525
cpu: 100m

charts/agent-control/tests/install_test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
suite: Validate AC Installation
22
tests:
3+
- it: should leverage correct image tag
4+
set:
5+
toolkitImage:
6+
tag: 123
7+
repository: test
8+
asserts:
9+
- template: templates/install.yaml
10+
equal:
11+
path: spec.template.spec.containers[0].image
12+
value: "test:123"
13+
- template: templates/uninstall.yaml
14+
equal:
15+
path: spec.template.spec.containers[0].image
16+
value: "test:123"
317
- it: should allow custom repositoryUrl
418
set:
519
agent-control-deployment:

charts/agent-control/values.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ nameOverride: ""
33
# -- Override the full name of the release
44
fullnameOverride: ""
55

6+
# -- The image that contains the necessary tools to install and uninstall Agent Control.
7+
toolkitImage:
8+
registry:
9+
repository: newrelic/newrelic-agent-control-cli
10+
# @default It defaults to `appVersion` in `Chart.yaml`.
11+
tag: nightly
12+
pullPolicy: IfNotPresent
13+
# -- The secrets that are needed to pull images from a custom registry.
14+
pullSecrets: []
15+
616
# -- Values for the agent-control-deployment chart. Ref.: https://github.com/newrelic/helm-charts/blob/master/charts/agent-control-deployment/values.yaml
717
# @default -- See `values.yaml`
818
agent-control-deployment:
@@ -12,16 +22,6 @@ agent-control-deployment:
1222
# -- The repository URL from where the `agent-control-deployment` chart will be installed.
1323
chartRepositoryUrl: https://helm-charts.newrelic.com
1424

15-
# -- The image that contains the necessary tools to install and uninstall Agent Control.
16-
toolkitImage:
17-
registry:
18-
repository: newrelic/newrelic-agent-control-cli
19-
# @default It defaults to `appVersion` in `Chart.yaml`.
20-
tag: nightly
21-
pullPolicy: IfNotPresent
22-
# -- The secrets that are needed to pull images from a custom registry.
23-
pullSecrets: []
24-
2525
# -- Values for the Flux chart. Ref.: https://github.com/fluxcd-community/helm-charts/blob/flux2-2.10.2/charts/flux2/values.yaml
2626
# @default -- See `values.yaml`
2727
flux2:

0 commit comments

Comments
 (0)