Skip to content

Commit

Permalink
Telemetry: security mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Oct 13, 2023
1 parent c6a670b commit e8134fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/telemetry/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -101,6 +102,7 @@ func main() {
Namespace: *namespace,
LiqoVersion: *liqoVersion,
KubernetesVersion: *kubernetesVersion,
SecurityMode: *securityMode,
ClusterLabels: clusterLabels.StringMap,
}

Expand Down
1 change: 1 addition & 0 deletions deployments/liqo/templates/liqo-telemetry-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions pkg/telemetry/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions pkg/telemetry/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// - Cluster ID
// - Liqo version
// - Kubernetes version
// - Security mode
// - Provider (e.g. GKE, EKS, AKS, ...)
// - Peering info
// -- RemoteClusterID
Expand Down
2 changes: 2 additions & 0 deletions pkg/telemetry/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -67,4 +68,5 @@ type Builder struct {
LiqoVersion string
KubernetesVersion string
ClusterLabels map[string]string
SecurityMode string
}

0 comments on commit e8134fd

Please sign in to comment.