From 32caeb37e41dc77544ec16f17ccb9b929ae9f5e4 Mon Sep 17 00:00:00 2001 From: Serhii Ponomarenko <116438358+tiptophelmet@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:36:58 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Create=20`dissectorsUiEnabled`?= =?UTF-8?q?=20flag=20(#1599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔨 Create `dissectorsUiEnabled` flag * 🔨 Rename `dissectorsUiEnabled` flag * 🔨 Add `DISSECTORS_UPDATING_ENABLED` config * 🔨 Set `dissectorsUpdatingEnabled: true` by default --- config/configStruct.go | 27 ++++++++++--------- helm-chart/README.md | 1 + helm-chart/templates/06-front-deployment.yaml | 2 ++ helm-chart/templates/12-config-map.yaml | 1 + helm-chart/values.yaml | 1 + 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/config/configStruct.go b/config/configStruct.go index 97b42fa0a..c63c909be 100644 --- a/config/configStruct.go +++ b/config/configStruct.go @@ -99,19 +99,20 @@ type ManifestsConfig struct { } type ConfigStruct struct { - Tap configStructs.TapConfig `yaml:"tap" json:"tap"` - Logs configStructs.LogsConfig `yaml:"logs" json:"logs"` - Config configStructs.ConfigConfig `yaml:"config,omitempty" json:"config,omitempty"` - Kube KubeConfig `yaml:"kube" json:"kube"` - DumpLogs bool `yaml:"dumpLogs" json:"dumpLogs" default:"false"` - HeadlessMode bool `yaml:"headless" json:"headless" default:"false"` - License string `yaml:"license" json:"license" default:""` - CloudLicenseEnabled bool `yaml:"cloudLicenseEnabled" json:"cloudLicenseEnabled" default:"true"` - SupportChatEnabled bool `yaml:"supportChatEnabled" json:"supportChatEnabled" default:"true"` - InternetConnectivity bool `yaml:"internetConnectivity" json:"internetConnectivity" default:"true"` - Scripting configStructs.ScriptingConfig `yaml:"scripting" json:"scripting"` - Manifests ManifestsConfig `yaml:"manifests,omitempty" json:"manifests,omitempty"` - Timezone string `yaml:"timezone" json:"timezone"` + Tap configStructs.TapConfig `yaml:"tap" json:"tap"` + Logs configStructs.LogsConfig `yaml:"logs" json:"logs"` + Config configStructs.ConfigConfig `yaml:"config,omitempty" json:"config,omitempty"` + Kube KubeConfig `yaml:"kube" json:"kube"` + DumpLogs bool `yaml:"dumpLogs" json:"dumpLogs" default:"false"` + HeadlessMode bool `yaml:"headless" json:"headless" default:"false"` + License string `yaml:"license" json:"license" default:""` + CloudLicenseEnabled bool `yaml:"cloudLicenseEnabled" json:"cloudLicenseEnabled" default:"true"` + SupportChatEnabled bool `yaml:"supportChatEnabled" json:"supportChatEnabled" default:"true"` + InternetConnectivity bool `yaml:"internetConnectivity" json:"internetConnectivity" default:"true"` + DissectorsUpdatingEnabled bool `yaml:"dissectorsUpdatingEnabled" json:"dissectorsUpdatingEnabled" default:"true"` + Scripting configStructs.ScriptingConfig `yaml:"scripting" json:"scripting"` + Manifests ManifestsConfig `yaml:"manifests,omitempty" json:"manifests,omitempty"` + Timezone string `yaml:"timezone" json:"timezone"` } func (config *ConfigStruct) ImagePullPolicy() v1.PullPolicy { diff --git a/helm-chart/README.md b/helm-chart/README.md index f6771eb91..67b1a4fa1 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -188,6 +188,7 @@ Please refer to [metrics](./metrics.md) documentation for details. | `timezone` | IANA time zone applied to time shown in the front-end | `""` (local time zone applies) | | `supportChatEnabled` | Enable real-time support chat channel based on Intercom | `true` | | `internetConnectivity` | Turns off API requests that are dependant on Internet connectivity such as `telemetry` and `online-support`. | `true` | +| `dissectorsUpdatingEnabled` | Turns off UI for enabling/disabling dissectors | `true` | KernelMapping pairs kernel versions with a DriverContainer image. Kernel versions can be matched diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index 0af20d4df..8d1d1a36f 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -60,6 +60,8 @@ spec: {{- end }}' - name: REACT_APP_SUPPORT_CHAT_ENABLED value: '{{ and .Values.supportChatEnabled .Values.internetConnectivity | ternary "true" "false" }}' + - name: REACT_APP_DISSECTORS_UPDATING_ENABLED + value: '{{ .Values.dissectorsUpdatingEnabled | ternary "true" "false" }}' {{- if .Values.tap.docker.overrideTag.front }} image: '{{ .Values.tap.docker.registry }}/front:{{ .Values.tap.docker.overrideTag.front }}' {{ else }} diff --git a/helm-chart/templates/12-config-map.yaml b/helm-chart/templates/12-config-map.yaml index 908e4236e..e17dbf3ad 100644 --- a/helm-chart/templates/12-config-map.yaml +++ b/helm-chart/templates/12-config-map.yaml @@ -47,5 +47,6 @@ data: {{- end }}' DUPLICATE_TIMEFRAME: '{{ .Values.tap.misc.duplicateTimeframe }}' ENABLED_DISSECTORS: '{{ gt (len .Values.tap.enabledDissectors) 0 | ternary (join "," .Values.tap.enabledDissectors) "" }}' + DISSECTORS_UPDATING_ENABLED: '{{ .Values.dissectorsUpdatingEnabled | ternary "true" "false" }}' DETECT_DUPLICATES: '{{ .Values.tap.misc.detectDuplicates | ternary "true" "false" }}' diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index a80cf8039..9970a5c9a 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -152,6 +152,7 @@ license: "" cloudLicenseEnabled: true supportChatEnabled: true internetConnectivity: true +dissectorsUpdatingEnabled: true scripting: env: {} source: ""