Currently, The service ping can be disabled by going into the
admin settings. Users are more likely to do that if they have
no clue what is being sent.
This PR tries to improve this experience, by showcasing the
exact data that is being sent below the option. This is possible
by creating a new TelemetryDataProvider and injecting that
both in the `installation-admin-collector` controller
and the `gitpod-service` (`getTelemetryData` func is added here
that can be used).
This PR also adds a gaurd to the `/admin/settings` page which
was missing previously
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
replace cluster with gitpod instance in desc
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
easy nits around design and TelemetryData naming
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
gaurd telemetry method with admin access
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
replace TelemetryData at more places
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
gaurd access to `admin/settings` like other admin settings
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
call useEffect hook early
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
Fixes https://github.com/gitpod-io/gitpod/issues/7866
This PR updates the `installation-admin-controller` to also retrieve
more data to send with telemetry. These are not part of the
`installationAdminDb` as we do not want to store this in the database
but lazily retrieve whenever a request is sent to `/data` endpoint
of the `installation-admin` express app unlike the `uuid` and settings
which need to be stored and updated.
The following fields are added:
- `totalUsers` : specifies the total number of users in the instance
- `totalWorkspaces`: specifies the total number of **regular** workspaces in the instance
- `totalInstances`: specifies the total number of **regular** workspace instances in the gitpod instance
Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
1. Generalized cluster selection for "HasPermission" AdmissionConstraints
Before the "constraintNewWorkspaceCluster" was seen as special case, that also was too general. This way it's straight forward to extend to other permissions
2. Separated "cluster authorization" into a separate Constraint which is applied to all ClusterSets. Before the authoritzation was more an optimization of the cluster precedence
Additionally:
- always prefer `ws.context.normalizedContextURL` over `ws.contextURL`
- if `normalizedContextURL` is not set, always try to normalize it