-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nr-k8s-otel-collector] Add top level controls (#1352)
<!-- Thank you for contributing to New Relic's Helm charts. Before you submit this PR we'd like to make sure you are aware of our technical requirements: * https://github.com/newrelic-experimental/helm-charts/blob/master/CONTRIBUTING.md#technical-requirements For a quick overview across what we will look at reviewing your PR, please read our review guidelines: * https://github.com/newrelic-experimental/helm-charts/blob/master/REVIEW_GUIDELINES.md Following our best practices right from the start will accelerate the review process and help get your PR merged quicker. When updates to your PR are requested, please add new commits and do not squash the history. This will make it easier to identify new changes. The PR will be squashed anyways when it is merged. Thanks. For fast feedback, please @-mention maintainers that are listed in the Chart.yaml file. Please make sure you test your changes before you push them. Once pushed, a Github Action will run across your changes and do some initial checks and linting. These checks run very quickly. Please check the results. We would like these checks to pass before we even continue reviewing your changes. --> #### Is this a new chart #### What this PR does / why we need it: #### Which issue this PR fixes *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)* - fixes # #### 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]`) --------- Co-authored-by: csongnr <115833851+csongnr@users.noreply.github.com> Co-authored-by: chris <csong@newrelic.com>
- Loading branch information
1 parent
fd3b9cd
commit 3e7dc5d
Showing
15 changed files
with
341 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- /* | ||
A helper to return the affinity to apply to the deployment. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.deployment.affinity" -}} | ||
{{- if .Values.deployment.affinity -}} | ||
{{- toYaml .Values.deployment.affinity -}} | ||
{{- else if include "newrelic.common.affinity" . -}} | ||
{{- include "newrelic.common.affinity" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the affinity to apply to the daemonset. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.daemonset.affinity" -}} | ||
{{- if .Values.daemonset.affinity -}} | ||
{{- toYaml .Values.daemonset.affinity -}} | ||
{{- else if include "newrelic.common.affinity" . -}} | ||
{{- include "newrelic.common.affinity" . -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- /* | ||
A helper to return the nodeSelector to apply to the deployment. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.deployment.nodeSelector" -}} | ||
{{- if .Values.deployment.nodeSelector -}} | ||
{{- toYaml .Values.deployment.nodeSelector -}} | ||
{{- else if include "newrelic.common.nodeSelector" . -}} | ||
{{- include "newrelic.common.nodeSelector" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the nodeSelector to apply to the daemonset. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.daemonset.nodeSelector" -}} | ||
{{- if .Values.daemonset.nodeSelector -}} | ||
{{- toYaml .Values.daemonset.nodeSelector -}} | ||
{{- else if include "newrelic.common.nodeSelector" . -}} | ||
{{- include "newrelic.common.nodeSelector" . -}} | ||
{{- end -}} | ||
{{- end -}} |
43 changes: 43 additions & 0 deletions
43
charts/nr-k8s-otel-collector/templates/_security_context.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{{- /* | ||
A helper to return the pod security context to apply to the deployment. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.deployment.securityContext.pod" -}} | ||
{{- if .Values.deployment.podSecurityContext -}} | ||
{{- toYaml .Values.deployment.podSecurityContext -}} | ||
{{- else if include "newrelic.common.securityContext.pod" . -}} | ||
{{- include "newrelic.common.securityContext.pod" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the container security context to apply to the deployment. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.deployment.securityContext.container" -}} | ||
{{- if .Values.deployment.containerSecurityContext -}} | ||
{{- toYaml .Values.deployment.containerSecurityContext -}} | ||
{{- else if include "newrelic.common.securityContext.container" . -}} | ||
{{- include "newrelic.common.securityContext.container" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the pod security context to apply to the daemonset. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.daemonset.securityContext.pod" -}} | ||
{{- if .Values.daemonset.podSecurityContext -}} | ||
{{- toYaml .Values.daemonset.podSecurityContext -}} | ||
{{- else if include "newrelic.common.securityContext.pod" . -}} | ||
{{- include "newrelic.common.securityContext.pod" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the container security context to apply to the daemonset. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.daemonset.securityContext.container" -}} | ||
{{- if .Values.daemonset.containerSecurityContext -}} | ||
{{- toYaml .Values.daemonset.containerSecurityContext -}} | ||
{{- else if include "newrelic.common.securityContext.container" . -}} | ||
{{- include "newrelic.common.securityContext.container" . -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- /* | ||
A helper to return the tolerations to apply to the deployment. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.deployment.tolerations" -}} | ||
{{- if .Values.deployment.tolerations -}} | ||
{{- toYaml .Values.deployment.tolerations -}} | ||
{{- else if include "newrelic.common.tolerations" . -}} | ||
{{- include "newrelic.common.tolerations" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- /* | ||
A helper to return the tolerations to apply to the daemonset. | ||
*/ -}} | ||
{{- define "nrKubernetesOtel.daemonset.tolerations" -}} | ||
{{- if .Values.daemonset.tolerations -}} | ||
{{- toYaml .Values.daemonset.tolerations -}} | ||
{{- else if include "newrelic.common.tolerations" . -}} | ||
{{- include "newrelic.common.tolerations" . -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.