func main()

in pubsub/src/main.go [24:39]


func main() {
	err := configmap.CanRead()
	if err != nil {
		log.Fatal("Could not read from ConfigMap. Verify the ConfigMap exists and that the pod's ServiceAccount"+
			"is bound to a role that grants access to the ConfigMap", err)
	}
	bs, err := ioutil.ReadFile("/etc/fleetiq/fleetiq.conf")
	if err != nil {
		log.Fatal("Could not read from ConfigMap. Verify the pod is mounting the ConfigMap to /etc/fleetiq/", err)
	}
	var g Groups
	if err := json.Unmarshal(bs, &g); err != nil {
		log.Fatalf("JSON unmarshaling failed: %s", err)
	}
	publish(g)
}