Documentation
¶
Overview ¶
Package installer exposes functions for applying resources to a Kubernetes cluster. Its exposed functions receive a client for communicating with the cluster.
Index ¶
- type Installer
- func (i *Installer) ApplyMesh(prev, mesh *v1alpha1.Mesh)
- func (i *Installer) RemoveMesh(mesh *v1alpha1.Mesh)
- func (i *Installer) Sidecar(namespace, xdsCluster string) (version.Sidecar, bool)
- func (i *Installer) Start(ctx context.Context) error
- func (i *Installer) SyncMeshes() error
- func (i *Installer) WatchedBy(namespace string) string
- type SpireManifests
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Installer ¶
Installer stores a map of version.Version and a distinct version.Sidecar for each mesh.
func New ¶
func New(c client.Client, load cuemodule.Loader, gmcli *cli.CLI, cs *cfsslsrv.CFSSLServer, clusterIngressName string) (*Installer, error)
New returns a new *Installer instance for installing Grey Matter components and dependencies.
func (*Installer) ApplyMesh ¶
ApplyMesh installs and updates Grey Matter core components and dependencies for a single mesh.
func (*Installer) RemoveMesh ¶
RemoveMesh removes all references to a deleted Mesh custom resource. It does not uninstall core components and dependencies, since that is handled by the apiserver when the Mesh custom resource is deleted.
func (*Installer) Sidecar ¶
Sidecar returns sidecar manifests for the mesh that a namespace is a membeer of. It is used by the webhook package for automatic sidecar injection.
func (*Installer) Start ¶
Start initializes resources and configurations after controller-manager has launched. It implements the controller-runtime Runnable interface.
func (*Installer) SyncMeshes ¶
SyncMeshes retrieves the list of existing meshes in the cluster, caches their sidecar templates and namespaces, and configures mesh clients. This essentially registers an existing mesh with the current (leader) pod.
type SpireManifests ¶
type SpireManifests struct { Namespace *corev1.Namespace `yaml:"namespace"` Secret *corev1.Secret `yaml:"secret"` Service *corev1.Service `yaml:"service"` StatefulSet *appsv1.StatefulSet `yaml:"statefulset"` DaemonSet *appsv1.DaemonSet `yaml:"daemonset"` Role *rbacv1.Role `yaml:"role"` RoleBinding *rbacv1.RoleBinding `yaml:"rolebinding"` ServiceAccounts []*corev1.ServiceAccount `yaml:"serviceaccounts"` ClusterRoles []*rbacv1.ClusterRole `yaml:"clusterroles"` ClusterRoleBindings []*rbacv1.ClusterRoleBinding `yaml:"clusterrolebindings"` ConfigMaps []*corev1.ConfigMap `yaml:"configmaps"` }