Documentation
¶
Index ¶
- Variables
- func InitGCP(ctx context.Context, kr *k8s.K8S) error
- func MergeKubeConfig(dst *kubeconfig.Config, src *kubeconfig.Config)
- func ProjectNumber(p string) string
- func RegionFromMetadata() (string, error)
- func SaveKubeConfig(kc *kubeconfig.Config, dir, file string) error
- func Token(ctx context.Context, aud string) (string, error)
- func TokenGKE(ctx context.Context, aud string) (string, error)
- type Cluster
- type JwtPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GCPInitTime time.Duration
)
Functions ¶
func MergeKubeConfig ¶
func MergeKubeConfig(dst *kubeconfig.Config, src *kubeconfig.Config)
func ProjectNumber ¶
func RegionFromMetadata ¶
func SaveKubeConfig ¶
func SaveKubeConfig(kc *kubeconfig.Config, dir, file string) error
SaveKubeConfig saves the KUBECONFIG to ./var/run/.kube/config The assumption is that on a read-only image, /var/run will be writeable and not backed up.
Types ¶
type Cluster ¶
type Cluster struct { ClusterName string ClusterLocation string ProjectId string GKECluster *containerpb.Cluster HubCluster *gkehubpb.Membership KubeConfig *kubeconfig.Config }
Cluster wraps cluster information for a discovered hub or gke cluster.
func AllClusters ¶
type JwtPayload ¶
type JwtPayload struct { // Aud is the expected audience, defaults to istio-ca - but is based on istiod.yaml configuration. // If set to a different value - use the value defined by istiod.yaml. Env variable can // still override Aud []string `json:"aud"` // Exp is not currently used - we don't use the token for authn, just to determine k8s settings Exp int `json:"exp"` // Issuer - configured by K8S admin for projected tokens. Will be used to verify all tokens. Iss string `json:"iss"` Sub string `json:"sub"` }
Click to show internal directories.
Click to hide internal directories.