func envVars()

in cmd/cloudshell_open/cloudrun.go [96:112]


func envVars(project, name, region string) (map[string]struct{}, error) {
	service, err := getService(project, name, region)

	if err != nil {
		return nil, err
	}

	existing := make(map[string]struct{})

	for _, container := range service.Spec.Template.Spec.Containers {
		for _, envVar := range container.Env {
			existing[envVar.Name] = struct{}{}
		}
	}

	return existing, nil
}