-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change helm chart to use common-library (#383)
* add common library to chart's dependencies * Refactor fullname * refactor selectorLabels * refactor labels * refactor podLabels * refactor cluster * refactor license * refactor service accounts * refactor lowdatamode * refactor staging * refactor tolerations * refactor affinity * refactor nodeSelector * refactor security context * refactor newrelic.mode * refactor custom attributes * refactor agent configuration files * refactor verboseLog * refactor priorityClassName * refactor dnsconfig * refactor imagePullSecrets * refactor image * refactor hostNetwork * bring registry back to the values * change env and envFrom back to extraEnv and extraEnvFrom * remove unneeded secure forward only flags * remove ksm unneeded tolerations * fix tolerations evaluation in a more meaningful way * fixed privileged mode not being correctly configure in the kubelet * fix enableProcessMetrics behavior * remove privileged default to be explicit in the values * use podLabels and let the common library deal with merging this * get rid of tolerations hidden defaults * get rid of affinity hidden defaults * forgot ksm tolerations * nit-picking issues * update common library to fix labels issue * template license secret hash only when it is rendered * change hostNetwork behaviour * typo fix
- Loading branch information
1 parent
f97cb39
commit 5ade166
Showing
62 changed files
with
2,097 additions
and
770 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
.DS_Store | ||
bin | ||
.idea | ||
|
||
nri-kubernetes.yaml | ||
nri-kubernetes.yml | ||
|
||
charts/internal/e2e-resources/Chart.lock | ||
charts/internal/e2e-resources/charts/ | ||
|
||
# Downloaded chart dependencies | ||
**/charts/*.tgz | ||
|
||
# OSX trash | ||
.DS_Store | ||
|
||
# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
|
||
# Vscode files | ||
.vscode | ||
|
||
# Emacs save files | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
# Vim-related files | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
*.un~ | ||
Session.vim | ||
.netrwhist |
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,6 @@ | ||
dependencies: | ||
- name: common-library | ||
repository: https://helm-charts.newrelic.com | ||
version: 0.17.2 | ||
digest: sha256:505ecd9915ecd1c3a5e406e5b30876d032486ed745d6868fb37a688e9780265d | ||
generated: "2022-04-13T10:27:38.214041+02:00" |
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
43 changes: 43 additions & 0 deletions
43
charts/newrelic-infrastructure/templates/_common_library_overrides.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 @@ | ||
{{- /* | ||
By default the common library uses .Chart.Name for creating the name. | ||
This chart's name is too long so we shorted to `nrk8s` | ||
*/ -}} | ||
{{- define "common.naming.chartnameOverride" -}} | ||
nrk8s | ||
{{- end -}} | ||
{{- /* Allow to change container defaults dynamically based if we are running in privileged mode or not */ -}} | ||
{{- define "common.securityContext.containerDefaults" -}} | ||
runAsUser: 1000 | ||
runAsGroup: 2000 | ||
allowPrivilegeEscalation: false | ||
readOnlyRootFilesystem: true | ||
{{- end -}} | ||
{{- /* Allow to change pod defaults dynamically based if we are running in privileged mode or not */ -}} | ||
{{- define "common.securityContext.podDefaults" -}} | ||
{{- end -}} | ||
{{- /* Add mode to each object create */ -}} | ||
{{- define "common.labels.overrides.addLabels" -}} | ||
{{- if ( include "common.privileged" . ) -}} | ||
mode: privileged | ||
{{- else -}} | ||
mode: unprivileged | ||
{{- end -}} | ||
{{- end -}} | ||
{{/* | ||
This function allows easily to overwrite custom attributes to the function "common.customAttributes" | ||
*/}} | ||
{{- define "common.customAttributes.overrideAttributes" -}} | ||
clusterName: {{ include "common.cluster" . }} | ||
{{- 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
Oops, something went wrong.