You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gitlab.com/gitlab-com/gl-infra/gke-notifications

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab.com/gitlab-com/gl-infra/gke-notifications

v0.0.0-20200923012405-7285e779d6a6
Source
Go
Version published
Created
Source

GKE Notifications

This is a small cloud function that listens on a pubsub topic for messages from a GKE cluster indiciating a manual or automatic upgrade has been initiated. The function then writes an annotation into Grafana with specific tags allowing you to easily determine when GKE upgrades have taken place when looking at metrics in Grafana.

Setting up a GKE cluster to send notifications

You need to setup a pubsub topic in the same GCP project as the GKE cluster in question, then you need to follow the instructions at https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-upgrade-notifications in order to have the cluster send upgrade notifications to the topic.

Deploying this cloud function

You can deploy this cloud function by referencing the source code which is automatically uploaded to

gs://gitlab-gke-notifications-function/gke-notifications.zip

You will need to make sure your cloud function has the following environment variables set

  • ENVIRONMENT: The environment of the cluster (set as a tag on the annotation)
  • GRAFANA_URL: the URL to the Grafana instance that you are writing annotations to
  • GRAFANA_API_KEY: The API key used to authenticate to the Grafana instance

FAQs

Package last updated on 23 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts