From bca883314de34c714a537e03d227a74f1309bc4a Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 12:21:35 -0400 Subject: [PATCH 1/8] Switch from using .Values.opennmsVersion to .Chart.AppVersion For core, you can override the tag using core.image.tag. Fixes coming in a separate commit to do it for the services. --- horizon/templates/NOTES.txt | 4 ++-- horizon/templates/inspector.yaml | 4 ++-- horizon/templates/opennms-core.statefulset.yaml | 2 +- horizon/templates/opennms-post-config.job.yaml | 2 +- horizon/templates/opennms-sentinel.statefulset.yaml | 4 ++-- horizon/values.yaml | 5 ++--- minion/templates/minion-deployment.yaml | 2 +- minion/values.yaml | 2 -- scripts/k8s_on_docker_desktop.sh | 1 - scripts/update_OpenNMS_core_Version.sh | 7 ------- 10 files changed, 11 insertions(+), 22 deletions(-) diff --git a/horizon/templates/NOTES.txt b/horizon/templates/NOTES.txt index 1d9e01f..2d6ff58 100644 --- a/horizon/templates/NOTES.txt +++ b/horizon/templates/NOTES.txt @@ -1,4 +1,4 @@ -Thank you for installing OpenNMS {{ .Values.core.image.tag | default .Values.opennmsVersion }}. +Thank you for installing OpenNMS {{ .Values.core.image.tag | default .Chart.AppVersion }}. Your release is named "{{ .Release.Name }}", used for: - Customer/Deployment identifier. @@ -37,4 +37,4 @@ The inspector pod is enabled and OpenNMS pod is not running. This is how you can connect to the inspector pod: $ kubectl exec -it -n {{ .Release.Name }} pods/inspector -- /bin/bash -{{- end }} \ No newline at end of file +{{- end }} diff --git a/horizon/templates/inspector.yaml b/horizon/templates/inspector.yaml index bf6bca6..8602401 100644 --- a/horizon/templates/inspector.yaml +++ b/horizon/templates/inspector.yaml @@ -1,5 +1,5 @@ {{- if .Values.core.inspector.enabled }} -{{- $image := printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Values.opennmsVersion) -}} +{{- $image := printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Chart.AppVersion) -}} --- apiVersion: v1 kind: Pod @@ -42,4 +42,4 @@ spec: claimName: onms-mibs-pvc readOnly: false {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/horizon/templates/opennms-core.statefulset.yaml b/horizon/templates/opennms-core.statefulset.yaml index 7a4082d..d75fefa 100644 --- a/horizon/templates/opennms-core.statefulset.yaml +++ b/horizon/templates/opennms-core.statefulset.yaml @@ -1,4 +1,4 @@ -{{- $image := printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Values.opennmsVersion) -}} +{{- $image := printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Chart.AppVersion) -}} --- apiVersion: apps/v1 kind: StatefulSet diff --git a/horizon/templates/opennms-post-config.job.yaml b/horizon/templates/opennms-post-config.job.yaml index 8e9a24e..8d3c11e 100644 --- a/horizon/templates/opennms-post-config.job.yaml +++ b/horizon/templates/opennms-post-config.job.yaml @@ -15,7 +15,7 @@ spec: restartPolicy: Never containers: - name: init - image: {{ printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Values.opennmsVersion) }} + image: {{ printf "%s:%s" .Values.core.image.repository (.Values.core.image.tag | default .Chart.AppVersion) }} imagePullPolicy: IfNotPresent command: [ bash, /scripts/onms-post-init.sh ] envFrom: diff --git a/horizon/templates/opennms-sentinel.statefulset.yaml b/horizon/templates/opennms-sentinel.statefulset.yaml index 90240e3..4aa8be7 100644 --- a/horizon/templates/opennms-sentinel.statefulset.yaml +++ b/horizon/templates/opennms-sentinel.statefulset.yaml @@ -4,7 +4,7 @@ Use a StatefulSet for Sentinels to have a unique and immutable SENTINEL_ID. */}} {{- if gt ((.Values.sentinel).replicaCount|int) 0 }} -{{- $image := printf "%s:%s" .Values.sentinel.image.repository (.Values.core.image.tag | default .Values.opennmsVersion) -}} +{{- $image := printf "%s:%s" .Values.sentinel.image.repository (.Values.core.image.tag | default .Chart.AppVersion) -}} --- apiVersion: apps/v1 kind: StatefulSet @@ -162,4 +162,4 @@ spec: - name: jks secret: secretName: app-jks -{{- end }} \ No newline at end of file +{{- end }} diff --git a/horizon/values.yaml b/horizon/values.yaml index 64d7c15..e6d18d6 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -4,7 +4,6 @@ timezone: America/New_York domain: example.com # The common domain for the Ingress resource. -opennmsVersion: '32.0.0-SNAPSHOT' # Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. @@ -95,7 +94,7 @@ core: image: repository: opennms/horizon pullPolicy: IfNotPresent - tag: '' # Defaults to opennmsVersion + tag: '' # Defaults to the chart appVersion resources: limits: cpu: '2' @@ -151,7 +150,7 @@ sentinel: image: repository: opennms/sentinel pullPolicy: IfNotPresent - tag: '' # Defaults to opennmsVersion + tag: '' # Defaults to the chart appVersion resources: limits: cpu: '2' diff --git a/minion/templates/minion-deployment.yaml b/minion/templates/minion-deployment.yaml index 141a96f..b3cb5c0 100644 --- a/minion/templates/minion-deployment.yaml +++ b/minion/templates/minion-deployment.yaml @@ -31,7 +31,7 @@ spec: {{- end }} - name: TZ value: America/New_York - image: opennms/minion:{{ .Values.opennmsVersion }} + image: opennms/minion:{{ .Chart.AppVersion }} livenessProbe: exec: command: diff --git a/minion/values.yaml b/minion/values.yaml index 1e4f729..2c37d88 100644 --- a/minion/values.yaml +++ b/minion/values.yaml @@ -1,5 +1,3 @@ -opennmsVersion: '32.0.0-SNAPSHOT' # Must match OpenNMS Core version - minion: location: pod name: myminion diff --git a/scripts/k8s_on_docker_desktop.sh b/scripts/k8s_on_docker_desktop.sh index 1d61458..f275f69 100755 --- a/scripts/k8s_on_docker_desktop.sh +++ b/scripts/k8s_on_docker_desktop.sh @@ -61,7 +61,6 @@ echo "Domain: $our_domain" | tee -a $log_file echo "Kafka Domain: $our_kafka_domain" | tee -a $log_file echo "Namespace: $our_namespace" | tee -a $log_file echo $(grep "appVersion: \?" ${root_path}horizon/Chart.yaml) -echo $(grep "opennmsVersion: \?" ${root_path}horizon/values.yaml) echo "" # Maybe switch this check to \(onms-core\|*\).$our_namespace.$our_domain diff --git a/scripts/update_OpenNMS_core_Version.sh b/scripts/update_OpenNMS_core_Version.sh index 619c2fa..365bc4f 100755 --- a/scripts/update_OpenNMS_core_Version.sh +++ b/scripts/update_OpenNMS_core_Version.sh @@ -17,13 +17,6 @@ if [ ! -d "examples" ]; then fi -printf "\033[36m%s\033[0m:\033[0m\033[33m %s\n\033[0m" "Step 1" "Modifying opennms/values.yaml" -sed -rie 's/(opennmsVersion: ?).*/\1'$new_version'/g' "${root_path}opennms/values.yaml" -if [ -f "${root_path}opennms/values.yamle" ]; then - rm ${root_path}opennms/values.yamle -fi -echo "" - printf "\033[36m%s\033[0m:\033[0m\033[33m %s\n\033[0m" "Step 2" "Modifying opennms/Chart.yaml" sed -rie 's/(appVersion: ?).*/\1\"'$new_version'\"/g' "${root_path}opennms/Chart.yaml" if [ -f "${root_path}opennms/Chart.yamle" ]; then From 633fe340f945fb6488dfec7388ed1cd5ce77c1ee Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 12:23:31 -0400 Subject: [PATCH 2/8] Fix: make sure sentinal uses its own image.tag, not core's --- horizon/templates/opennms-sentinel.statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horizon/templates/opennms-sentinel.statefulset.yaml b/horizon/templates/opennms-sentinel.statefulset.yaml index 4aa8be7..dfed686 100644 --- a/horizon/templates/opennms-sentinel.statefulset.yaml +++ b/horizon/templates/opennms-sentinel.statefulset.yaml @@ -4,7 +4,7 @@ Use a StatefulSet for Sentinels to have a unique and immutable SENTINEL_ID. */}} {{- if gt ((.Values.sentinel).replicaCount|int) 0 }} -{{- $image := printf "%s:%s" .Values.sentinel.image.repository (.Values.core.image.tag | default .Chart.AppVersion) -}} +{{- $image := printf "%s:%s" .Values.sentinel.image.repository (.Values.sentinel.image.tag | default .Chart.AppVersion) -}} --- apiVersion: apps/v1 kind: StatefulSet From c75ad52aba457f66a5845b0e0f86be7e17beb97c Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 12:24:04 -0400 Subject: [PATCH 3/8] Minion: Give it the same image configurability as core/sentinel --- minion/templates/minion-deployment.yaml | 4 +++- minion/values.yaml | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/minion/templates/minion-deployment.yaml b/minion/templates/minion-deployment.yaml index b3cb5c0..34fec55 100644 --- a/minion/templates/minion-deployment.yaml +++ b/minion/templates/minion-deployment.yaml @@ -1,3 +1,4 @@ +{{- $image := printf "%s:%s" .Values.minion.image.repository (.Values.minion.image.tag | default .Chart.AppVersion) -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -31,7 +32,8 @@ spec: {{- end }} - name: TZ value: America/New_York - image: opennms/minion:{{ .Chart.AppVersion }} + image: {{ $image }} + imagePullPolicy: {{ .Values.minion.image.pullPolicy }} livenessProbe: exec: command: diff --git a/minion/values.yaml b/minion/values.yaml index 2c37d88..d229ad7 100644 --- a/minion/values.yaml +++ b/minion/values.yaml @@ -8,6 +8,11 @@ minion: configuration: storage: dataFolder: 5Gi + image: + repository: opennms/minion + pullPolicy: IfNotPresent + tag: '' # Defaults to the chart appVersion + core: instanceID: monms # Must match OpenNMS Core instance (namespace) From b87dc459bcc8f54e821cf5d84248419016cf75c9 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 12:25:42 -0400 Subject: [PATCH 4/8] Fix the value references to .*[iI]mage.pullPolicy --- horizon/templates/grafana-helm.deployment.yaml | 2 +- horizon/templates/grafana-renderer.deployment.yaml | 2 +- horizon/templates/opennms-core.statefulset.yaml | 8 ++++---- horizon/templates/opennms-sentinel.statefulset.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/horizon/templates/grafana-helm.deployment.yaml b/horizon/templates/grafana-helm.deployment.yaml index 91e0135..9567597 100644 --- a/horizon/templates/grafana-helm.deployment.yaml +++ b/horizon/templates/grafana-helm.deployment.yaml @@ -54,7 +54,7 @@ spec: containers: - name: grafana-helm image: {{ printf "%s:%s" .Values.grafana.image.repository .Values.grafana.image.tag }} - imagePullPolicy: {{ .Values.grafana.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.grafana.image.pullPolicy }} ports: - containerPort: 3000 name: http diff --git a/horizon/templates/grafana-renderer.deployment.yaml b/horizon/templates/grafana-renderer.deployment.yaml index e2050c6..5157e70 100644 --- a/horizon/templates/grafana-renderer.deployment.yaml +++ b/horizon/templates/grafana-renderer.deployment.yaml @@ -29,7 +29,7 @@ spec: containers: - name: grafana-renderer image: {{ printf "%s:%s" .Values.grafana.imageRenderer.image.repository .Values.grafana.imageRenderer.image.tag }} - imagePullPolicy: {{ .Values.grafana.imageRenderer.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.grafana.imageRenderer.image.pullPolicy }} ports: - containerPort: 8081 name: http diff --git a/horizon/templates/opennms-core.statefulset.yaml b/horizon/templates/opennms-core.statefulset.yaml index d75fefa..fc6b745 100644 --- a/horizon/templates/opennms-core.statefulset.yaml +++ b/horizon/templates/opennms-core.statefulset.yaml @@ -43,7 +43,7 @@ spec: {{- if and (.Values.core.configuration.enableAlec) (.Values.core.configuration.alecImage) }} - name: alec-kar image: {{ .Values.core.configuration.alecImage.repository }}:{{ .Values.core.configuration.alecImage.tag }} - imagePullPolicy: {{ .Values.core.configuration.alecImage.imagePullPolicy }} + imagePullPolicy: {{ .Values.core.configuration.alecImage.pullPolicy }} command: [ cp, /plugins/opennms-alec-plugin.kar, /opennms-deploy ] securityContext: # To guarantee ownership of the KAR file so that OpenNMS won't complain. runAsUser: 10001 @@ -55,7 +55,7 @@ spec: {{- if and (.Values.core.configuration.enableCortex) (.Values.core.configuration.cortexTssImage) }} - name: cortex-tss-kar image: {{ .Values.core.configuration.cortexTssImage.repository }}:{{ .Values.core.configuration.cortexTssImage.tag }} - imagePullPolicy: {{ .Values.core.configuration.cortexTssImage.imagePullPolicy }} + imagePullPolicy: {{ .Values.core.configuration.cortexTssImage.pullPolicy }} command: [ cp, /plugins/opennms-cortex-tss-plugin.kar, /opennms-deploy ] securityContext: # To guarantee ownership of the KAR file so that OpenNMS won't complain. runAsUser: 10001 @@ -68,7 +68,7 @@ spec: # Requires the same image/version used at runtime - name: init image: {{ $image }} - imagePullPolicy: {{ .Values.core.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.core.image.pullPolicy }} command: [ bash, /scripts/onms-core-init.sh ] envFrom: - configMapRef: @@ -90,7 +90,7 @@ spec: containers: - name: onms image: {{ $image }} - imagePullPolicy: {{ .Values.core.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.core.image.pullPolicy }} nodeSelector: {{- toYaml .Values.core.configuration.nodeSelector | nindent 10 }} affinity: diff --git a/horizon/templates/opennms-sentinel.statefulset.yaml b/horizon/templates/opennms-sentinel.statefulset.yaml index dfed686..a675426 100644 --- a/horizon/templates/opennms-sentinel.statefulset.yaml +++ b/horizon/templates/opennms-sentinel.statefulset.yaml @@ -38,7 +38,7 @@ spec: initContainers: - name: init image: {{ $image }} - imagePullPolicy: {{ .Values.sentinel.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.sentinel.image.pullPolicy }} command: [ bash, /init.sh ] envFrom: - configMapRef: @@ -57,7 +57,7 @@ spec: containers: - name: sentinel image: {{ $image }} - imagePullPolicy: {{ .Values.sentinel.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.sentinel.image.pullPolicy }} args: - -c ports: From 0045f8097dbb9fc6fceef9d0f826f30b521776e0 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 13:27:19 -0400 Subject: [PATCH 5/8] Version bump --- horizon/Chart.yaml | 2 +- minion/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/horizon/Chart.yaml b/horizon/Chart.yaml index ea10b96..d64b6b4 100644 --- a/horizon/Chart.yaml +++ b/horizon/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.8 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/minion/Chart.yaml b/minion/Chart.yaml index bcbc494..4fb5a27 100644 --- a/minion/Chart.yaml +++ b/minion/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.8 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to From 931020e576683ee88322d5c1bb18c5e43dc86ac2 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 13:38:04 -0400 Subject: [PATCH 6/8] Fix whitespace in values to make linter happy --- horizon/values.yaml | 72 ++++++++++++++++++++++----------------------- minion/values.yaml | 8 ++--- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/horizon/values.yaml b/horizon/values.yaml index e6d18d6..500d8a0 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. timezone: America/New_York -domain: example.com # The common domain for the Ingress resource. +domain: example.com # The common domain for the Ingress resource. # Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. @@ -21,34 +21,34 @@ dependencies: # A common JKS to white-list all CA certificates for all the dependencies OpenNMS or Sentinel uses. truststore: - content: '' # A base64 encoded content of the JKS Truststore file. + content: '' # A base64 encoded content of the JKS Truststore file. password: '0p3nNM5' # The main OpenNMS database requires PostgreSQL (this is mandatory). postgresql: - hostname: onms-db.shared.svc # IP or FQDN of the external PostgreSQL server + hostname: onms-db.shared.svc # IP or FQDN of the external PostgreSQL server port: 5432 username: postgres password: P0stgr3s - sslmode: require # disable, allow, prefer, require, verify-ca, verify-full - sslfactory: org.postgresql.ssl.LibPQFactory # LibPQFactory, DefaultJavaSSLFactory, NonValidatingFactory - caCert: '' # A base64 encoded content of the CA Certificate + sslmode: require # disable, allow, prefer, require, verify-ca, verify-full + sslfactory: org.postgresql.ssl.LibPQFactory # LibPQFactory, DefaultJavaSSLFactory, NonValidatingFactory + caCert: '' # A base64 encoded content of the CA Certificate # The chosen broker technology for the Minion-to-OpenNMS communication (this is mandatory). # For TLS with private CA, use the common Truststore. kafka: - hostname: '' # IP or FQDN of the external Kafka server (Example: onms-kafka-bootstrap.shared.svc) + hostname: '' # IP or FQDN of the external Kafka server (Example: onms-kafka-bootstrap.shared.svc) port: 9093 - username: opennms # Pass empty username when using saslMechanism=PLAIN - password: 0p3nNM5 # Pass empty password when using saslMechanism=PLAIN + username: opennms # Pass empty username when using saslMechanism=PLAIN + password: 0p3nNM5 # Pass empty password when using saslMechanism=PLAIN configuration: - saslMechanism: SCRAM-SHA-512 # PLAIN, SCRAM-SHA-512 - securityProtocol: SASL_SSL # PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL + saslMechanism: SCRAM-SHA-512 # PLAIN, SCRAM-SHA-512 + securityProtocol: SASL_SSL # PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL # Persisting flows requires Elasticsearch # For TLS with private CA, use the common Truststore. elasticsearch: - hostname: '' # IP or FQDN of the external Elasticsearch server (Example: onms-es-http.shared.svc) + hostname: '' # IP or FQDN of the external Elasticsearch server (Example: onms-es-http.shared.svc) port: 9200 username: elastic password: 31@st1c @@ -60,10 +60,10 @@ dependencies: # The chosen solution for log aggregation (OpenNMS and Sentinel will forward logs to it via Promtail) loki: - hostname: '' # IP or FQDN of the external Loki server (Example: loki.shared.svc); '' to disable + hostname: '' # IP or FQDN of the external Loki server (Example: loki.shared.svc); '' to disable username: '' password: '' - caCert: '' # A base64 encoded content of the CA Certificate (assumes HTTPS for Loki's URL) + caCert: '' # A base64 encoded content of the CA Certificate (assumes HTTPS for Loki's URL) port: 3100 # The metrics persistence layer as an alternative to RRDtool. @@ -77,7 +77,7 @@ dependencies: readTimeoutInMs: 1000 metricCacheSize: 1000 externalTagsCacheSize: 1000 - bulkheadMaxWaitDuration: '9223372036854775807' # this is set as a string so it doesn't end up in scientific notation along the way which causes problems later + bulkheadMaxWaitDuration: '9223372036854775807' # this is set as a string so it doesn't end up in scientific notation along the way which causes problems later # The Ingress to expose the OpenNMS and Grafana. ingress: @@ -88,13 +88,13 @@ ingress: # OpenNMS Core Instance. core: - inspector: + inspector: enabled: false terminationGracePeriodSeconds: 120 image: repository: opennms/horizon pullPolicy: IfNotPresent - tag: '' # Defaults to the chart appVersion + tag: '' # Defaults to the chart appVersion resources: limits: cpu: '2' @@ -104,11 +104,11 @@ core: memory: 4Gi configuration: alwaysRollDeployment: true - enableAlec: false # See alecImage below for how the KAR is retrieved - enableCortex: false # See cortexTssImage below for how the KAR is retrieved + enableAlec: false # See alecImage below for how the KAR is retrieved + enableCortex: false # See cortexTssImage below for how the KAR is retrieved enableTssDualWrite: false enableAcls: false - rras: # To optionally replace the RRDtool aggregations (pass [] to keep defaults). Affects Pollerd and Collectd + rras: # To optionally replace the RRDtool aggregations (pass [] to keep defaults). Affects Pollerd and Collectd - RRA:AVERAGE:0.5:1:2016 - RRA:AVERAGE:0.5:12:1488 - RRA:AVERAGE:0.5:288:366 @@ -124,19 +124,19 @@ core: # repository: opennms/opennms-cortex-tss-plugin # pullPolicy: IfNotPresent # tag: v2.0.1 - database: # Access to the OpenNMS database + database: # Access to the OpenNMS database username: opennms password: 0p3nNM5 poolSize: 50 - storage: # Sizes for RRDs and configuration - etc: 1Gi # Warning Google Filestore enforces 1TB at a minimum - rrd: 1000Gi # Depends on how many files you are planning to have (each installation is different) - mibs: null # Expects a size, e.g.: 1Gi - http: # Credentials to access the WebUI - restUsername: opennms # ReST user for Grafana/Helm, Sentinel and Minions (when Twin API is not available) + storage: # Sizes for RRDs and configuration + etc: 1Gi # Warning Google Filestore enforces 1TB at a minimum + rrd: 1000Gi # Depends on how many files you are planning to have (each installation is different) + mibs: null # Expects a size, e.g.: 1Gi + http: # Credentials to access the WebUI + restUsername: opennms # ReST user for Grafana/Helm, Sentinel and Minions (when Twin API is not available) restPassword: 0p3nNM5 - adminPassword: 0p3nNM5 # Password for the default admin account - etcUpdatePolicy: newer # Experimental: options: never (don't update any files), newer (only newer timestamps), new (only brand new files) + adminPassword: 0p3nNM5 # Password for the default admin account + etcUpdatePolicy: newer # Experimental: options: never (don't update any files), newer (only newer timestamps), new (only brand new files) nodeSelector: null affinity: null tolerations: null @@ -145,12 +145,12 @@ core: # OpenNMS Sentinel for flow processing (Optional) sentinel: - replicaCount: 0 # Use 0 to disable + replicaCount: 0 # Use 0 to disable terminationGracePeriodSeconds: 60 image: repository: opennms/sentinel pullPolicy: IfNotPresent - tag: '' # Defaults to the chart appVersion + tag: '' # Defaults to the chart appVersion resources: limits: cpu: '2' @@ -179,16 +179,16 @@ grafana: memory: 128Mi configuration: ui: - adminPassword: 0p3nNM5 # Default password for the admin account - database: # Assumes PostgreSQL + adminPassword: 0p3nNM5 # Default password for the admin account + database: # Assumes PostgreSQL username: grafana password: Gr@f@n@ - sslmode: require # disable, require, verify-full - image: # For the initialization container to create the database + sslmode: require # disable, require, verify-full + image: # For the initialization container to create the database repository: postgres pullPolicy: IfNotPresent tag: '13' - imageRenderer: # Required to generate PDF reports from OpenNMS + imageRenderer: # Required to generate PDF reports from OpenNMS replicaCount: 2 image: repository: grafana/grafana-image-renderer diff --git a/minion/values.yaml b/minion/values.yaml index d229ad7..c0beb8f 100644 --- a/minion/values.yaml +++ b/minion/values.yaml @@ -11,13 +11,13 @@ minion: image: repository: opennms/minion pullPolicy: IfNotPresent - tag: '' # Defaults to the chart appVersion + tag: '' # Defaults to the chart appVersion core: - instanceID: monms # Must match OpenNMS Core instance (namespace) - + instanceID: monms # Must match OpenNMS Core instance (namespace) + # A common JKS to white-list all CA certificates . truststore: - content: '' # A base64 encoded content of the JKS Truststore file. + content: '' # A base64 encoded content of the JKS Truststore file. password: '' From 3cd0b1578e1f8b7a665d5dc94e8e2269474e8fbf Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 13:44:36 -0400 Subject: [PATCH 7/8] add ability to disable creation of namespace From 450e752e9066c307e3265f999fcf97f5879c14dc --- horizon/templates/namespace.yaml | 4 ++-- horizon/values.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/horizon/templates/namespace.yaml b/horizon/templates/namespace.yaml index fb5a559..f81a2f4 100644 --- a/horizon/templates/namespace.yaml +++ b/horizon/templates/namespace.yaml @@ -1,4 +1,4 @@ -{{- if not (eq .Release.Name "default") }} +{{- if and .Values.createNamespace (not (eq .Release.Name "default")) }} --- apiVersion: v1 kind: Namespace @@ -6,4 +6,4 @@ metadata: name: {{ .Release.Name }} labels: {{- include "core.labels" . | nindent 4 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/horizon/values.yaml b/horizon/values.yaml index 500d8a0..776246a 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -4,6 +4,7 @@ timezone: America/New_York domain: example.com # The common domain for the Ingress resource. +createNamespace: true # Whether to create the namespace for this deployment # Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. From 7503f36945ae8c26a993b0e1d20d130f802f4b67 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Tue, 27 Jun 2023 14:02:58 -0400 Subject: [PATCH 8/8] Make sure minimal-resources.yaml doesn't re-enable grafana --- examples/minimal-resources.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/minimal-resources.yaml b/examples/minimal-resources.yaml index ea3ac47..1a60bad 100644 --- a/examples/minimal-resources.yaml +++ b/examples/minimal-resources.yaml @@ -1,14 +1,7 @@ -# Default values for minimal resource consumption, e.g.: minikube (for testing purposes only) +# Default values for basic core with minimal resource consumption, e.g.: minikube (for testing purposes only) core: resources: null configuration: storage: rrd: 100Gi - -grafana: - replicaCount: 1 - resources: null - imageRenderer: - replicaCount: 1 - resources: null