Documentation ¶
Index ¶
- Constants
- func CreateGCPCredsSecret(GCPSAKey string, namespace string) v1.Secret
- func DeleteArtifacts(ctx context.Context, auth Auth) error
- func GetK8sClusterUUID(ctx context.Context, auth Auth) (string, error)
- func GetMembershipCR(ctx context.Context, auth Auth) (string, error)
- func GetMembershipCRD(ctx context.Context, auth Auth) (string, error)
- func InstallExclusivityManifests(ctx context.Context, auth Auth, CRDManifest string, CRManifest string) error
- func InstallOrUpdateGKEConnectAgent(ctx context.Context, auth Auth, manifestResponse ConnectManifestResponse, ...) error
- func KubeClientSet(auth Auth) (*kubernetes.Clientset, error)
- type Auth
- type ConnectAgentResource
- type ConnectAgentResourceType
- type ConnectManifestResponse
Constants ¶
const ( CRDAbspath string = "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/memberships.hub.gke.io" CRAbspath = "apis/hub.gke.io/v1/memberships/membership" )
Absolute Kubernetes API paths of the exclusivity artifacts
Variables ¶
This section is empty.
Functions ¶
func CreateGCPCredsSecret ¶
CreateGCPCredsSecret creates a kubernetes secret with a GCP Service Account key
func DeleteArtifacts ¶
DeleteArtifacts deletes the CRD and CR manifests in the cluster
func GetK8sClusterUUID ¶
GetK8sClusterUUID returns the kube-system namespace UID
func GetMembershipCR ¶
GetMembershipCR get the Membership CR
func GetMembershipCRD ¶
GetMembershipCRD get the Membership CRD
func InstallExclusivityManifests ¶
func InstallExclusivityManifests(ctx context.Context, auth Auth, CRDManifest string, CRManifest string) error
InstallExclusivityManifests applies the CRD and CR manifests in the cluster This will either install or upgrade them if already present
func InstallOrUpdateGKEConnectAgent ¶
func InstallOrUpdateGKEConnectAgent(ctx context.Context, auth Auth, manifestResponse ConnectManifestResponse, GCPSAKey string, namespace string) error
InstallOrUpdateGKEConnectAgent installs or update a gke-connect agent in a Kubernetes cluster TODO: try to simplify the whole thing using restMapper and dynamic client
func KubeClientSet ¶
func KubeClientSet(auth Auth) (*kubernetes.Clientset, error)
KubeClientSet initializes the kubernetes API client
Types ¶
type ConnectAgentResource ¶
type ConnectAgentResource struct { Type ConnectAgentResourceType `json:"type"` Manifest string `json:"manifest"` }
ConnectAgentResource is part of GenerateConnectManifestResponse
type ConnectAgentResourceType ¶
type ConnectAgentResourceType struct { Kind string `json:"kind"` APIVersion string `json:"apiVersion"` }
ConnectAgentResourceType is part of ConnectAgentResource
type ConnectManifestResponse ¶
type ConnectManifestResponse struct {
Manifest []ConnectAgentResource `json:"manifest"`
}
ConnectManifestResponse contains the connect agent manifest response