(env string)
| 62 | } |
| 63 | |
| 64 | func GetResourceQuantityFromEnvVar(env string) (*resource.Quantity, error) { |
| 65 | val := os.Getenv(env) |
| 66 | if val == "" { |
| 67 | return nil, fmt.Errorf("environment variable %s is unset", env) |
| 68 | } |
| 69 | quantity, err := resource.ParseQuantity(val) |
| 70 | if err != nil { |
| 71 | return nil, fmt.Errorf("failed to parse environment variable %s: %s", env, err) |
| 72 | } |
| 73 | return &quantity, nil |
| 74 | } |
| 75 | |
| 76 | func GetWorkspaceControllerSA() (string, error) { |
| 77 | saName := os.Getenv(constants.ControllerServiceAccountNameEnvVar) |
no outgoing calls
no test coverage detected