diff --git a/cmd/telemetry/main.go b/cmd/telemetry/main.go index 55c560e037..300df69cc8 100644 --- a/cmd/telemetry/main.go +++ b/cmd/telemetry/main.go @@ -70,6 +70,7 @@ func main() { namespace := flag.String("namespace", "liqo", "the namespace where liqo is deployed") liqoVersion := flag.String("liqo-version", "", "the liqo version") kubernetesVersion := flag.String("kubernetes-version", "", "the kubernetes version") + securityMode := flag.String("security-mode", "", "the security mode of the cluster") dryRun := flag.Bool("dry-run", false, "if true, do not send the telemetry item and print it on stdout") flag.Var(&clusterLabels, consts.ClusterLabelsParameter, "The set of labels which characterizes the local cluster when exposed remotely as a virtual node") @@ -101,6 +102,7 @@ func main() { Namespace: *namespace, LiqoVersion: *liqoVersion, KubernetesVersion: *kubernetesVersion, + SecurityMode: *securityMode, ClusterLabels: clusterLabels.StringMap, } diff --git a/deployments/liqo/templates/liqo-telemetry-cronjob.yaml b/deployments/liqo/templates/liqo-telemetry-cronjob.yaml index 49c6a86252..8c2c14882f 100644 --- a/deployments/liqo/templates/liqo-telemetry-cronjob.yaml +++ b/deployments/liqo/templates/liqo-telemetry-cronjob.yaml @@ -45,6 +45,7 @@ spec: - --liqo-version={{ include "liqo.version" . }} - --kubernetes-version={{ .Capabilities.KubeVersion.GitVersion }} - --namespace={{ .Release.Namespace }} + - --security-mode={{ .Values.networking.securityMode }} {{- if .Values.discovery.config.clusterLabels }} {{- $d := dict "commandName" "--cluster-labels" "dictionary" .Values.discovery.config.clusterLabels }} {{- include "liqo.concatenateMap" $d | nindent 14 }} diff --git a/pkg/telemetry/builder.go b/pkg/telemetry/builder.go index 936558f400..65f41ec852 100644 --- a/pkg/telemetry/builder.go +++ b/pkg/telemetry/builder.go @@ -45,6 +45,7 @@ func (c *Builder) ForgeTelemetryItem(ctx context.Context) (*Telemetry, error) { ClusterID: clusterIdentity.ClusterID, LiqoVersion: c.LiqoVersion, KubernetesVersion: c.KubernetesVersion, + SecurityMode: c.SecurityMode, Provider: c.getProvider(), PeeringInfo: c.getPeeringInfoSlice(ctx), NamespacesInfo: c.getNamespacesInfo(ctx), diff --git a/pkg/telemetry/doc.go b/pkg/telemetry/doc.go index fa1389b111..a9c112b9c1 100644 --- a/pkg/telemetry/doc.go +++ b/pkg/telemetry/doc.go @@ -20,6 +20,7 @@ // - Cluster ID // - Liqo version // - Kubernetes version +// - Security mode // - Provider (e.g. GKE, EKS, AKS, ...) // - Peering info // -- RemoteClusterID diff --git a/pkg/telemetry/types.go b/pkg/telemetry/types.go index 501937ef7c..323650a96b 100644 --- a/pkg/telemetry/types.go +++ b/pkg/telemetry/types.go @@ -55,6 +55,7 @@ type Telemetry struct { ClusterID string `json:"clusterID"` LiqoVersion string `json:"liqoVersion,omitempty"` KubernetesVersion string `json:"kubernetesVersion,omitempty"` + SecurityMode string `json:"securityMode,omitempty"` Provider string `json:"provider,omitempty"` PeeringInfo []PeeringInfo `json:"peeringInfo,omitempty"` NamespacesInfo []NamespaceInfo `json:"namespacesInfo,omitempty"` @@ -67,4 +68,5 @@ type Builder struct { LiqoVersion string KubernetesVersion string ClusterLabels map[string]string + SecurityMode string }