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

Collect the InstallationID #4882

Closed
Tracked by #4877
shaun-nx opened this issue Jan 9, 2024 · 1 comment · Fixed by #5256
Closed
Tracked by #4877

Collect the InstallationID #4882

shaun-nx opened this issue Jan 9, 2024 · 1 comment · Fixed by #5256
Assignees
Labels
backlog Pull requests/issues that are backlog items
Milestone

Comments

@shaun-nx
Copy link
Contributor

shaun-nx commented Jan 9, 2024

UAC:

  • Determine if NIC is installed as a Daemonset or a Deployment
  • Get the UID of the Daemonset/Deployment

Example of UID from kubectl get deploy <deployment_name> -o yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
   ....
  creationTimestamp: "2024-03-06T08:35:52Z"
  generation: 2
  labels:
    ....
  name: test-nginx-ingress-controller
  namespace: default
  uid: 3ec77c9f-0ddc-44ab-8d3e-46208077d23f
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: nginx-ingress

Example of UID from kubectl get damonset <daemonset_name> -o yaml

apiVersion: apps/v1
kind: DaemonSet
metadata:
  annotations:
    ....
  creationTimestamp: "2024-03-06T11:15:56Z"
  generation: 1
  labels:
   ....
  name: test-nginx-ingress-controller
  namespace: default
  uid: f95aff08-2736-4c84-a031-e8ad66118176
spec:
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: test
      app.kubernetes.io/name: nginx-ingress

For nginx-gateway-fabric, they use the UID of the Deployment:
https://github.com/nginxinc/nginx-gateway-fabric/blob/f33db51fc9e05ccf98fc8cdae100772a5cc6775e/internal/mode/static/telemetry/collector.go#L244-L248


ALL DETAILS and REQUIREMENTS BELOW ARE OBSOLETE !!!


All details below here is from our original discussion around generated a GUID, which we are now calling the InstallationID

We want this GUID to be fully unique to ensure that multiple deployments/daemonsets of NIC on a single cluster can be uniquely identified:

Possible format:
A hash of ClusterID + pod-namespace + name + kind

Example GUID before hashing for a deployment kind (separated by / in this case)

d290f1ee-6c54-4b01-90e6-d701748f0851/nginx-ingress/nginx-ingress/deployment

Example GUID after hashing for a deployment kind

echo d290f1ee-6c54-4b01-90e6-d701748f0851/nginx-ingress/nginx-ingress/deployment | md5sum -t
23beab5d71a12ce7ed3db70e9a7beeda

Example of GUID for a daemonset kind:

echo d290f1ee-6c54-4b01-90e6-d701748f0851/nginx-ingress/nginx-ingress/daemonset | md5sum -t
413708edb16319506eba73642b46b9e5
Copy link

github-actions bot commented Jan 9, 2024

Hi @shaun-nx thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@shaun-nx shaun-nx added this to the v3.5.0 milestone Feb 21, 2024
@shaun-nx shaun-nx self-assigned this Feb 29, 2024
@shaun-nx shaun-nx added the backlog Pull requests/issues that are backlog items label Mar 5, 2024
@shaun-nx shaun-nx changed the title Define a GUID to be used when sending telemetry data Collect the InstallationID Mar 6, 2024
@jjngx jjngx self-assigned this Mar 13, 2024
@jjngx jjngx linked a pull request Mar 15, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Pull requests/issues that are backlog items
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants