Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telemetry: security mode #2083

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}