| 1 |
// Copyright 2019 The Kubernetes Authors. |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
package types |
| 5 |
|
| 6 |
type Cloud string |
| 7 |
|
| 8 |
const GKE Cloud = "gke" |
| 9 |
|
| 10 |
// IAMPolicyGeneratorArgs contains arguments to generate a GKE service account resource. |
| 11 |
type IAMPolicyGeneratorArgs struct { |
| 12 |
// which cloud provider to generate for (e.g. "gke") |
| 13 |
Cloud `json:"cloud" yaml:"cloud"` |
| 14 |
|
| 15 |
// information about the kubernetes cluster for this object |
| 16 |
KubernetesService `json:"kubernetesService" yaml:"kubernetesService"` |
| 17 |
|
| 18 |
// information about the service account and project |
| 19 |
ServiceAccount `json:"serviceAccount" yaml:"serviceAccount"` |
| 20 |
} |
| 21 |
|
| 22 |
type KubernetesService struct { |
| 23 |
// the name used for the Kubernetes service account |
| 24 |
Name string `json:"name" yaml:"name"` |
| 25 |
|
| 26 |
// the name of the Kubernetes namespace for this object |
| 27 |
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` |
| 28 |
} |
| 29 |
|
| 30 |
type ServiceAccount struct { |
| 31 |
// the name of the new cloud provider service account |
| 32 |
Name string `json:"name" yaml:"name"` |
| 33 |
|
| 34 |
// The ID of the project |
| 35 |
ProjectId string `json:"projectId" yaml:"projectId"` |
| 36 |
} |