From f4ff4d4dd63dbf7820c168f3781e9f3c298979e4 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Sat, 12 Aug 2023 02:41:29 +0300 Subject: [PATCH] :sparkles: Add `KMMConfig` struct to `TapConfig` --- config/configStructs/tapConfig.go | 5 +++++ helm-chart/templates/13-module-loader.yaml | 2 +- helm-chart/templates/14-module-loader-config-map.yaml | 2 +- helm-chart/templates/15-kernel-module-management.yaml | 4 ++-- helm-chart/values.yaml | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 2dd0bf3fa..c2e5c24cf 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -100,6 +100,10 @@ type ReleaseConfig struct { Namespace string `yaml:"namespace" json:"namespace" default:"default"` } +type KMMConfig struct { + Enabled bool `yaml:"enabled" json:"enabled" default:"true"` +} + type TapConfig struct { Docker DockerConfig `yaml:"docker" json:"docker"` Proxy ProxyConfig `yaml:"proxy" json:"proxy"` @@ -121,6 +125,7 @@ type TapConfig struct { NodeSelectorTerms []v1.NodeSelectorTerm `yaml:"nodeselectorterms" json:"nodeselectorterms" default:"[]"` Auth AuthConfig `yaml:"auth" json:"auth"` Ingress IngressConfig `yaml:"ingress" json:"ingress"` + KMM KMMConfig `yaml:"kmm" json:"kmm"` IPv6 bool `yaml:"ipv6" json:"ipv6" default:"true"` Debug bool `yaml:"debug" json:"debug" default:"false"` } diff --git a/helm-chart/templates/13-module-loader.yaml b/helm-chart/templates/13-module-loader.yaml index 8c7e1e0b2..71927f786 100644 --- a/helm-chart/templates/13-module-loader.yaml +++ b/helm-chart/templates/13-module-loader.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.kmm.enabled (.Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1") }} +{{ if and .Values.tap.kmm.enabled (.Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1") }} apiVersion: kmm.sigs.x-k8s.io/v1beta1 kind: Module metadata: diff --git a/helm-chart/templates/14-module-loader-config-map.yaml b/helm-chart/templates/14-module-loader-config-map.yaml index f3545faaf..993dc8b00 100644 --- a/helm-chart/templates/14-module-loader-config-map.yaml +++ b/helm-chart/templates/14-module-loader-config-map.yaml @@ -1,4 +1,4 @@ -{{ if and .Values.kmm.enabled (.Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1") }} +{{ if and .Values.tap.kmm.enabled (.Capabilities.APIVersions.Has "kmm.sigs.x-k8s.io/v1beta1") }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm-chart/templates/15-kernel-module-management.yaml b/helm-chart/templates/15-kernel-module-management.yaml index c87758a71..e86c56104 100644 --- a/helm-chart/templates/15-kernel-module-management.yaml +++ b/helm-chart/templates/15-kernel-module-management.yaml @@ -1,4 +1,4 @@ -{{ if .Values.kmm.enabled }} +{{ if .Values.tap.kmm.enabled }} apiVersion: v1 kind: Namespace metadata: @@ -3426,4 +3426,4 @@ webhooks: resources: - modules sideEffects: None -{{- end }} \ No newline at end of file +{{- end }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index df1dc5d05..5cb521b5b 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -57,6 +57,8 @@ tap: host: ks.svc.cluster.local tls: [] certmanager: letsencrypt-prod + kmm: + enabled: true ipv6: true debug: false logs: @@ -71,5 +73,3 @@ scripting: env: {} source: "" watchscripts: true -kmm: - enabled: true