Documentation ¶
Overview ¶
The install package contains strategies for installing controllers and admission webhooks into Kubernetes clusters.
Index ¶
- func NewInstaller(config *rest.Config) *installer
- func NewUninstaller(config *rest.Config) *uninstaller
- type APIMeta
- type ApiserverInstallStrategy
- func (s *ApiserverInstallStrategy) AfterInstall() error
- func (s *ApiserverInstallStrategy) BeforeInstall() error
- func (s *ApiserverInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
- func (s *ApiserverInstallStrategy) GetCRDs() []extensionsv1beta1.CustomResourceDefinition
- func (s *ApiserverInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
- func (s *ApiserverInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
- func (s *ApiserverInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
- func (s *ApiserverInstallStrategy) GetDeployments() []*appsv1.Deployment
- func (s *ApiserverInstallStrategy) GetNamespace() *corev1.Namespace
- func (s *ApiserverInstallStrategy) GetSecrets() []*corev1.Secret
- func (s *ApiserverInstallStrategy) GetServiceAccount() string
- func (s *ApiserverInstallStrategy) GetServices() []*corev1.Service
- func (s *ApiserverInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
- type CRDInstallStrategy
- func (s *CRDInstallStrategy) AfterInstall() error
- func (s *CRDInstallStrategy) BeforeInstall() error
- func (s *CRDInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
- func (s *CRDInstallStrategy) GetCRDs() []*extensionsv1beta1.CustomResourceDefinition
- func (s *CRDInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
- func (s *CRDInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
- func (s *CRDInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
- func (s *CRDInstallStrategy) GetDeployments() []*appsv1.Deployment
- func (s *CRDInstallStrategy) GetNamespace() *corev1.Namespace
- func (s *CRDInstallStrategy) GetSecrets() []*corev1.Secret
- func (s *CRDInstallStrategy) GetServiceAccount() string
- func (s *CRDInstallStrategy) GetServices() []*corev1.Service
- func (s *CRDInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
- type Certs
- type DefaultInstallStrategy
- type EmptyInstallStrategy
- func (s EmptyInstallStrategy) AfterInstall() error
- func (s EmptyInstallStrategy) BeforeInstall() error
- func (s EmptyInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
- func (s EmptyInstallStrategy) GetCRDs() []*extensionsv1beta1.CustomResourceDefinition
- func (s EmptyInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
- func (s EmptyInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
- func (s EmptyInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
- func (s EmptyInstallStrategy) GetDeployments() []*appsv1.Deployment
- func (s EmptyInstallStrategy) GetNamespace() *corev1.Namespace
- func (s EmptyInstallStrategy) GetSecrets() []*corev1.Secret
- func (s EmptyInstallStrategy) GetServiceAccount() string
- func (s EmptyInstallStrategy) GetServices() []*corev1.Service
- func (s EmptyInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
- type InstallStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstaller ¶
NewInstaller returns a new installer
func NewUninstaller ¶
NewUninstaller returns a new uninstaller
Types ¶
type APIMeta ¶
type APIMeta interface { // GetCRDs returns the CRDs GetCRDs() []*extensionsv1beta1.CustomResourceDefinition // GetPolicyRules returns the PolicyRules to apply to the ServiceAccount running the controller GetPolicyRules() []rbacv1.PolicyRule // GetGroupVersions returns the GroupVersions of the CRDs or aggregated APIs GetGroupVersions() []schema.GroupVersion }
APIMeta returns metadata about the APIs
type ApiserverInstallStrategy ¶
type ApiserverInstallStrategy struct { // Name is the name of the installation Name string // ApiserverImage is the container image for the aggregated apiserver ApiserverImage string // ControllerManagerImage is the container image to use for the controller ControllerManagerImage string // DocsImage is the container image to use for hosting reference documentation DocsImage string // APIMeta contains the generated API metadata from the pkg/apis APIMeta APIMeta // Certs are the certs for installing the aggregated apiserver Certs *Certs // contains filtered or unexported fields }
ApiserverInstallStrategy installs APIs using apiserver aggregation. Creates a StatefulSet for etcd storage.
func (*ApiserverInstallStrategy) AfterInstall ¶
func (s *ApiserverInstallStrategy) AfterInstall() error
func (*ApiserverInstallStrategy) BeforeInstall ¶
func (s *ApiserverInstallStrategy) BeforeInstall() error
func (*ApiserverInstallStrategy) GetAPIServices ¶
func (s *ApiserverInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
func (*ApiserverInstallStrategy) GetCRDs ¶
func (s *ApiserverInstallStrategy) GetCRDs() []extensionsv1beta1.CustomResourceDefinition
GetCRDs returns the generated CRDs from APIMeta.GetCRDs()
func (*ApiserverInstallStrategy) GetClusterRole ¶
func (s *ApiserverInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
GetClusterRole returns a ClusterRule with the generated rules by APIMeta.GetPolicyRules
func (*ApiserverInstallStrategy) GetClusterRoleBinding ¶
func (s *ApiserverInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
GetClusterRoleBinding returns a binding for the ServiceAccount and ClusterRole
func (*ApiserverInstallStrategy) GetConfigMaps ¶
func (s *ApiserverInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
func (*ApiserverInstallStrategy) GetDeployments ¶
func (s *ApiserverInstallStrategy) GetDeployments() []*appsv1.Deployment
GetDeployments returns a Deployment to run the Image
func (*ApiserverInstallStrategy) GetNamespace ¶
func (s *ApiserverInstallStrategy) GetNamespace() *corev1.Namespace
GetNamespace returns the strategy name suffixed "with -system"
func (*ApiserverInstallStrategy) GetSecrets ¶
func (s *ApiserverInstallStrategy) GetSecrets() []*corev1.Secret
func (*ApiserverInstallStrategy) GetServiceAccount ¶
func (s *ApiserverInstallStrategy) GetServiceAccount() string
GetServiceAccount returns the default ServiceAccount
func (*ApiserverInstallStrategy) GetServices ¶
func (s *ApiserverInstallStrategy) GetServices() []*corev1.Service
func (*ApiserverInstallStrategy) GetStatefulSets ¶
func (s *ApiserverInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
GetStatefulSets returns and StatefulSet resource for an etcd instance
type CRDInstallStrategy ¶
type CRDInstallStrategy struct { // Name is the installation Name string // ControllerManagerImage is the container image to use for the controller ControllerManagerImage string // DocsImage is the container image to use for hosting reference documentation DocsImage string // APIMeta contains the generated API metadata from the pkg/apis APIMeta APIMeta }
CRDInstallStrategy installs APIs into a cluster using CRDs
func (*CRDInstallStrategy) AfterInstall ¶
func (s *CRDInstallStrategy) AfterInstall() error
func (*CRDInstallStrategy) BeforeInstall ¶
func (s *CRDInstallStrategy) BeforeInstall() error
func (*CRDInstallStrategy) GetAPIServices ¶
func (s *CRDInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
func (*CRDInstallStrategy) GetCRDs ¶
func (s *CRDInstallStrategy) GetCRDs() []*extensionsv1beta1.CustomResourceDefinition
GetCRDs returns the generated CRDs from APIMeta.GetCRDs()
func (*CRDInstallStrategy) GetClusterRole ¶
func (s *CRDInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
GetClusterRole returns a ClusterRule with the generated rules by APIMeta.GetPolicyRules
func (*CRDInstallStrategy) GetClusterRoleBinding ¶
func (s *CRDInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
GetClusterRoleBinding returns a binding for the ServiceAccount and ClusterRole
func (*CRDInstallStrategy) GetConfigMaps ¶
func (s *CRDInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
func (*CRDInstallStrategy) GetDeployments ¶
func (s *CRDInstallStrategy) GetDeployments() []*appsv1.Deployment
GetDeployments returns a Deployment to run the Image
func (*CRDInstallStrategy) GetNamespace ¶
func (s *CRDInstallStrategy) GetNamespace() *corev1.Namespace
GetNamespace returns the strategy name suffixed "with -system"
func (*CRDInstallStrategy) GetSecrets ¶
func (s *CRDInstallStrategy) GetSecrets() []*corev1.Secret
func (*CRDInstallStrategy) GetServiceAccount ¶
func (s *CRDInstallStrategy) GetServiceAccount() string
GetServiceAccount returns the default ServiceAccount
func (*CRDInstallStrategy) GetServices ¶
func (s *CRDInstallStrategy) GetServices() []*corev1.Service
func (*CRDInstallStrategy) GetStatefulSets ¶
func (s *CRDInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
type Certs ¶
type Certs struct { // ClientKey is the client private key ClientKey []byte // CACrt is the public CA certificate CACrt []byte // ClientCrt is the public client certificate ClientCrt []byte }
Certs contains the certificate information for installing APIs
func CreateCerts ¶
CreateCerts creates Certs to be used for registering webhooks and extension apis in a Kubernetes apiserver
type DefaultInstallStrategy ¶
type DefaultInstallStrategy = CRDInstallStrategy
DefaultInstallStrategy is the default install strategy to use
type EmptyInstallStrategy ¶
type EmptyInstallStrategy struct{}
EmptyInstallStrategy is a Strategy that doesn't create anything but can be embedded in another InstallStrategy.
func (EmptyInstallStrategy) AfterInstall ¶
func (s EmptyInstallStrategy) AfterInstall() error
func (EmptyInstallStrategy) BeforeInstall ¶
func (s EmptyInstallStrategy) BeforeInstall() error
func (EmptyInstallStrategy) GetAPIServices ¶
func (s EmptyInstallStrategy) GetAPIServices() []*apiregistrationv1beta1.APIService
func (EmptyInstallStrategy) GetCRDs ¶
func (s EmptyInstallStrategy) GetCRDs() []*extensionsv1beta1.CustomResourceDefinition
func (EmptyInstallStrategy) GetClusterRole ¶
func (s EmptyInstallStrategy) GetClusterRole() *rbacv1.ClusterRole
func (EmptyInstallStrategy) GetClusterRoleBinding ¶
func (s EmptyInstallStrategy) GetClusterRoleBinding() *rbacv1.ClusterRoleBinding
func (EmptyInstallStrategy) GetConfigMaps ¶
func (s EmptyInstallStrategy) GetConfigMaps() []*corev1.ConfigMap
func (EmptyInstallStrategy) GetDeployments ¶
func (s EmptyInstallStrategy) GetDeployments() []*appsv1.Deployment
func (EmptyInstallStrategy) GetNamespace ¶
func (s EmptyInstallStrategy) GetNamespace() *corev1.Namespace
func (EmptyInstallStrategy) GetSecrets ¶
func (s EmptyInstallStrategy) GetSecrets() []*corev1.Secret
func (EmptyInstallStrategy) GetServiceAccount ¶
func (s EmptyInstallStrategy) GetServiceAccount() string
func (EmptyInstallStrategy) GetServices ¶
func (s EmptyInstallStrategy) GetServices() []*corev1.Service
func (EmptyInstallStrategy) GetStatefulSets ¶
func (s EmptyInstallStrategy) GetStatefulSets() []*appsv1.StatefulSet
type InstallStrategy ¶
type InstallStrategy interface { // GetCRDs returns a list of CRDs to create GetCRDs() []*extensionsv1beta1.CustomResourceDefinition // GetNamespace returns the namespace to install the controller-manager into. GetNamespace() *corev1.Namespace // GetServiceAccount returns the name of the ServiceAccount to use GetServiceAccount() string // GetClusterRole returns a ClusterRole to create GetClusterRole() *rbacv1.ClusterRole // GetClusterRoleBinding returns a GetClusterRoleBinding to create GetClusterRoleBinding() *rbacv1.ClusterRoleBinding // GetDeployments returns the Deployments to create GetDeployments() []*appsv1.Deployment // GetStatefulSets the StatefulSets to create GetStatefulSets() []*appsv1.StatefulSet // GetSecrets returns the Secrets to create GetSecrets() []*corev1.Secret // GetConfigMaps returns the ConfigMaps to create GetConfigMaps() []*corev1.ConfigMap // GetServices returns the Services to create GetServices() []*corev1.Service // GetAPIServices returns the APIServices to create GetAPIServices() []*apiregistrationv1beta1.APIService // BeforeInstall is run before installing other components BeforeInstall() error // AfterInstall is run after installing other components AfterInstall() error }
InstallStrategy defines what resources should be created as part of installing an API extension.