installer

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer struct {
	*sync.RWMutex
	*cli.CLI
	// contains filtered or unexported fields
}

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

func (i *Installer) ApplyMesh(prev, mesh *v1alpha1.Mesh)

ApplyMesh installs and updates Grey Matter core components and dependencies for a single mesh.

func (*Installer) RemoveMesh

func (i *Installer) RemoveMesh(mesh *v1alpha1.Mesh)

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

func (i *Installer) Sidecar(namespace, xdsCluster string) (version.Sidecar, bool)

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

func (i *Installer) Start(ctx context.Context) error

Start initializes resources and configurations after controller-manager has launched. It implements the controller-runtime Runnable interface.

func (*Installer) SyncMeshes

func (i *Installer) SyncMeshes() error

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.

func (*Installer) WatchedBy

func (i *Installer) WatchedBy(namespace string) string

WatchedBy returns the name of the mesh a namespace is a member of, or an empty string.

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL