Documentation ¶
Index ¶
- Constants
- Variables
- func WrapRetryError(err error) error
- type Certificate
- type CreateSecret
- type EtcdCluster
- func (c *EtcdCluster) AllExistMembers() []*corev1.Pod
- func (c *EtcdCluster) AllMembers() []*corev1.Pod
- func (c *EtcdCluster) CA(s *corev1.Secret) (*corev1.Secret, error)
- func (c *EtcdCluster) CASecretName() string
- func (c *EtcdCluster) Client(endpoints []string) (*clientv3.Client, error)
- func (c *EtcdCluster) ClientCertSecret(ca *corev1.Secret) (*corev1.Secret, error)
- func (c *EtcdCluster) ClientCertSecretName() string
- func (c *EtcdCluster) ClientService() *corev1.Service
- func (c *EtcdCluster) ClientServiceName() string
- func (c *EtcdCluster) CurrentInternalState() InternalState
- func (c *EtcdCluster) CurrentPhase() etcdv1alpha1.EtcdClusterPhase
- func (c *EtcdCluster) DNSNames() []string
- func (c *EtcdCluster) DefragmentCronJob() *batchv1beta1.CronJob
- func (c *EtcdCluster) DefragmentCronJobName() string
- func (c *EtcdCluster) DiscoveryService() *corev1.Service
- func (c *EtcdCluster) GetMetrics(addr string) ([]*dto.MetricFamily, error)
- func (c *EtcdCluster) IsPodReady(pod *corev1.Pod) bool
- func (c *EtcdCluster) NeedRepair(pod *corev1.Pod) bool
- func (c *EtcdCluster) PermanentMembers() []*corev1.Pod
- func (c *EtcdCluster) ServerCert(ca *corev1.Secret) (Certificate, error)
- func (c *EtcdCluster) ServerCertSecret(ca *corev1.Secret) (*corev1.Secret, error)
- func (c *EtcdCluster) ServerCertSecretName() string
- func (c *EtcdCluster) ServerDiscoveryServiceName() string
- func (c *EtcdCluster) SetAnnotationForPod(pod *corev1.Pod)
- func (c *EtcdCluster) SetCASecret(ca *corev1.Secret)
- func (c *EtcdCluster) SetOwnedPods(pods []*corev1.Pod)
- func (c *EtcdCluster) SetServerCertSecret(cert *corev1.Secret)
- func (c *EtcdCluster) ShouldUpdate(pod *corev1.Pod) bool
- func (c *EtcdCluster) ShouldUpdateServerCertificate(certPem []byte) bool
- func (c *EtcdCluster) TemporaryMember() *corev1.Pod
- type EtcdController
- type GitHubController
- type HeimdallrProxy
- func (r *HeimdallrProxy) Backends() []proxyv1.Backend
- func (r *HeimdallrProxy) CASecretName() string
- func (r *HeimdallrProxy) Certificate() *certmanager.Certificate
- func (r *HeimdallrProxy) CertificateSecretName() string
- func (r *HeimdallrProxy) ConfigForDashboard() (*corev1.ConfigMap, error)
- func (r *HeimdallrProxy) ConfigForMain() (*corev1.ConfigMap, error)
- func (r *HeimdallrProxy) ConfigForRPCServer() (*corev1.ConfigMap, error)
- func (r *HeimdallrProxy) ConfigNameForDashboard() string
- func (r *HeimdallrProxy) ConfigNameForMain() string
- func (r *HeimdallrProxy) ConfigNameForRPCServer() string
- func (r *HeimdallrProxy) ControlObject(obj metav1.Object)
- func (r *HeimdallrProxy) CookieSecretName() string
- func (r *HeimdallrProxy) DeploymentNameForDashboard() string
- func (r *HeimdallrProxy) DeploymentNameForMain() string
- func (r *HeimdallrProxy) DeploymentNameForRPCServer() string
- func (r *HeimdallrProxy) EtcdCluster() (*etcdv1alpha1.EtcdCluster, *monitoringv1.PodMonitor)
- func (r *HeimdallrProxy) EtcdClusterName() string
- func (r *HeimdallrProxy) EtcdHost() string
- func (r *HeimdallrProxy) GithubSecretName() string
- func (r *HeimdallrProxy) IdealDashboard() (*process, error)
- func (r *HeimdallrProxy) IdealProxyProcess() (*process, error)
- func (r *HeimdallrProxy) IdealRPCServer() (*process, error)
- func (r *HeimdallrProxy) InternalTokenSecretName() string
- func (r *HeimdallrProxy) LabelsForDashboard() map[string]string
- func (r *HeimdallrProxy) LabelsForDefragmentJob() map[string]string
- func (r *HeimdallrProxy) LabelsForMain() map[string]string
- func (r *HeimdallrProxy) LabelsForRPCServer() map[string]string
- func (r *HeimdallrProxy) NewCA() (*corev1.Secret, error)
- func (r *HeimdallrProxy) NewCookieSecret() (*corev1.Secret, error)
- func (r *HeimdallrProxy) NewGithubSecret() (*corev1.Secret, error)
- func (r *HeimdallrProxy) NewInternalTokenSecret() (*corev1.Secret, error)
- func (r *HeimdallrProxy) NewSigningPrivateKey() (*corev1.Secret, error)
- func (r *HeimdallrProxy) PodDisruptionBudgetNameForDashboard() string
- func (r *HeimdallrProxy) PodDisruptionBudgetNameForMain() string
- func (r *HeimdallrProxy) PodDisruptionBudgetNameForRPCServer() string
- func (r *HeimdallrProxy) PrivateKeySecretName() string
- func (r *HeimdallrProxy) ReverseProxyConfig() (*corev1.ConfigMap, error)
- func (r *HeimdallrProxy) ReverseProxyConfigName() string
- func (r *HeimdallrProxy) Roles() []proxyv1.Role
- func (r *HeimdallrProxy) RpcPermissions() []proxyv1.RpcPermission
- func (r *HeimdallrProxy) Secrets() []CreateSecret
- func (r *HeimdallrProxy) ServiceNameForDashboard() string
- func (r *HeimdallrProxy) ServiceNameForInternalApi() string
- func (r *HeimdallrProxy) ServiceNameForMain() string
- func (r *HeimdallrProxy) ServiceNameForRPCServer() string
- func (r *HeimdallrProxy) Version() string
- type InternalState
- type MockOption
- type ProxyController
- type RetryError
Constants ¶
View Source
const (
EtcdVersion = "v3.4.7"
)
Variables ¶
View Source
var ( ErrEtcdClusterIsNotReady = errors.New("EtcdCluster is not ready yet") ErrRPCServerIsNotReady = errors.New("rpc server is not ready") )
Functions ¶
func WrapRetryError ¶
Types ¶
type Certificate ¶
type Certificate struct { tls.Certificate // contains filtered or unexported fields }
func NewCertificate ¶
func NewCertificate(source tls.Certificate) (Certificate, error)
func (*Certificate) MarshalCertificate ¶
func (c *Certificate) MarshalCertificate() []byte
func (*Certificate) ToSecret ¶
func (c *Certificate) ToSecret() *corev1.Secret
type CreateSecret ¶
type EtcdCluster ¶
type EtcdCluster struct { *etcdv1alpha1.EtcdCluster ClusterDomain string // contains filtered or unexported fields }
func NewEtcdCluster ¶
func NewEtcdCluster(c *etcdv1alpha1.EtcdCluster, clusterDomain string, mockOpt *MockOption) *EtcdCluster
func (*EtcdCluster) AllExistMembers ¶
func (c *EtcdCluster) AllExistMembers() []*corev1.Pod
func (*EtcdCluster) AllMembers ¶
func (c *EtcdCluster) AllMembers() []*corev1.Pod
AllMembers returns all members of etcd, regardless of status
func (*EtcdCluster) CASecretName ¶
func (c *EtcdCluster) CASecretName() string
func (*EtcdCluster) Client ¶
func (c *EtcdCluster) Client(endpoints []string) (*clientv3.Client, error)
func (*EtcdCluster) ClientCertSecret ¶
func (*EtcdCluster) ClientCertSecretName ¶
func (c *EtcdCluster) ClientCertSecretName() string
func (*EtcdCluster) ClientService ¶
func (c *EtcdCluster) ClientService() *corev1.Service
func (*EtcdCluster) ClientServiceName ¶
func (c *EtcdCluster) ClientServiceName() string
func (*EtcdCluster) CurrentInternalState ¶
func (c *EtcdCluster) CurrentInternalState() InternalState
func (*EtcdCluster) CurrentPhase ¶
func (c *EtcdCluster) CurrentPhase() etcdv1alpha1.EtcdClusterPhase
func (*EtcdCluster) DNSNames ¶
func (c *EtcdCluster) DNSNames() []string
func (*EtcdCluster) DefragmentCronJob ¶
func (c *EtcdCluster) DefragmentCronJob() *batchv1beta1.CronJob
func (*EtcdCluster) DefragmentCronJobName ¶
func (c *EtcdCluster) DefragmentCronJobName() string
func (*EtcdCluster) DiscoveryService ¶
func (c *EtcdCluster) DiscoveryService() *corev1.Service
func (*EtcdCluster) GetMetrics ¶
func (c *EtcdCluster) GetMetrics(addr string) ([]*dto.MetricFamily, error)
func (*EtcdCluster) IsPodReady ¶
func (c *EtcdCluster) IsPodReady(pod *corev1.Pod) bool
func (*EtcdCluster) NeedRepair ¶
func (c *EtcdCluster) NeedRepair(pod *corev1.Pod) bool
func (*EtcdCluster) PermanentMembers ¶
func (c *EtcdCluster) PermanentMembers() []*corev1.Pod
func (*EtcdCluster) ServerCert ¶
func (c *EtcdCluster) ServerCert(ca *corev1.Secret) (Certificate, error)
func (*EtcdCluster) ServerCertSecret ¶
func (*EtcdCluster) ServerCertSecretName ¶
func (c *EtcdCluster) ServerCertSecretName() string
func (*EtcdCluster) ServerDiscoveryServiceName ¶
func (c *EtcdCluster) ServerDiscoveryServiceName() string
func (*EtcdCluster) SetAnnotationForPod ¶
func (c *EtcdCluster) SetAnnotationForPod(pod *corev1.Pod)
func (*EtcdCluster) SetCASecret ¶
func (c *EtcdCluster) SetCASecret(ca *corev1.Secret)
func (*EtcdCluster) SetOwnedPods ¶
func (c *EtcdCluster) SetOwnedPods(pods []*corev1.Pod)
func (*EtcdCluster) SetServerCertSecret ¶
func (c *EtcdCluster) SetServerCertSecret(cert *corev1.Secret)
func (*EtcdCluster) ShouldUpdate ¶
func (c *EtcdCluster) ShouldUpdate(pod *corev1.Pod) bool
func (*EtcdCluster) ShouldUpdateServerCertificate ¶
func (c *EtcdCluster) ShouldUpdateServerCertificate(certPem []byte) bool
func (*EtcdCluster) TemporaryMember ¶
func (c *EtcdCluster) TemporaryMember() *corev1.Pod
type EtcdController ¶
type EtcdController struct { schema.GroupVersionKind // contains filtered or unexported fields }
func NewEtcdController ¶
func NewEtcdController( sharedInformerFactory informers.SharedInformerFactory, coreSharedInformerFactory kubeinformers.SharedInformerFactory, coreClient kubernetes.Interface, client clientset.Interface, cfg *rest.Config, clusterDomain string, runOutsideCluster bool, transport http.RoundTripper, mockOpt *MockOption, ) (*EtcdController, error)
type GitHubController ¶
type GitHubController struct { schema.GroupVersionKind // contains filtered or unexported fields }
func NewGitHubController ¶
func NewGitHubController( sharedInformerFactory informers.SharedInformerFactory, coreSharedInformerFactory kubeinformers.SharedInformerFactory, coreClient kubernetes.Interface, client clientset.Interface, transport http.RoundTripper, ) (*GitHubController, error)
type HeimdallrProxy ¶
type HeimdallrProxy struct { Name string Namespace string Object *proxyv1.Proxy Spec proxyv1.ProxySpec Datastore *etcdv1alpha1.EtcdCluster CASecret *corev1.Secret SigningPrivateKey *corev1.Secret GithubWebhookSecret *corev1.Secret CookieSecret *corev1.Secret InternalTokenSecret *corev1.Secret RPCServer *process ProxyServer *process DashboardServer *process // contains filtered or unexported fields }
func NewHeimdallrProxy ¶
func NewHeimdallrProxy( spec *proxyv1.Proxy, cmClient cmClientset.Interface, serviceLister listers.ServiceLister, backends []proxyv1.Backend, roles []proxyv1.Role, rpcPermissions []proxyv1.RpcPermission) *HeimdallrProxy
func (*HeimdallrProxy) Backends ¶
func (r *HeimdallrProxy) Backends() []proxyv1.Backend
func (*HeimdallrProxy) CASecretName ¶
func (r *HeimdallrProxy) CASecretName() string
func (*HeimdallrProxy) Certificate ¶
func (r *HeimdallrProxy) Certificate() *certmanager.Certificate
func (*HeimdallrProxy) CertificateSecretName ¶
func (r *HeimdallrProxy) CertificateSecretName() string
func (*HeimdallrProxy) ConfigForDashboard ¶
func (r *HeimdallrProxy) ConfigForDashboard() (*corev1.ConfigMap, error)
func (*HeimdallrProxy) ConfigForMain ¶
func (r *HeimdallrProxy) ConfigForMain() (*corev1.ConfigMap, error)
func (*HeimdallrProxy) ConfigForRPCServer ¶
func (r *HeimdallrProxy) ConfigForRPCServer() (*corev1.ConfigMap, error)
func (*HeimdallrProxy) ConfigNameForDashboard ¶
func (r *HeimdallrProxy) ConfigNameForDashboard() string
func (*HeimdallrProxy) ConfigNameForMain ¶
func (r *HeimdallrProxy) ConfigNameForMain() string
func (*HeimdallrProxy) ConfigNameForRPCServer ¶
func (r *HeimdallrProxy) ConfigNameForRPCServer() string
func (*HeimdallrProxy) ControlObject ¶
func (r *HeimdallrProxy) ControlObject(obj metav1.Object)
func (*HeimdallrProxy) CookieSecretName ¶
func (r *HeimdallrProxy) CookieSecretName() string
func (*HeimdallrProxy) DeploymentNameForDashboard ¶
func (r *HeimdallrProxy) DeploymentNameForDashboard() string
func (*HeimdallrProxy) DeploymentNameForMain ¶
func (r *HeimdallrProxy) DeploymentNameForMain() string
func (*HeimdallrProxy) DeploymentNameForRPCServer ¶
func (r *HeimdallrProxy) DeploymentNameForRPCServer() string
func (*HeimdallrProxy) EtcdCluster ¶
func (r *HeimdallrProxy) EtcdCluster() (*etcdv1alpha1.EtcdCluster, *monitoringv1.PodMonitor)
func (*HeimdallrProxy) EtcdClusterName ¶
func (r *HeimdallrProxy) EtcdClusterName() string
func (*HeimdallrProxy) EtcdHost ¶
func (r *HeimdallrProxy) EtcdHost() string
func (*HeimdallrProxy) GithubSecretName ¶
func (r *HeimdallrProxy) GithubSecretName() string
func (*HeimdallrProxy) IdealDashboard ¶
func (r *HeimdallrProxy) IdealDashboard() (*process, error)
func (*HeimdallrProxy) IdealProxyProcess ¶
func (r *HeimdallrProxy) IdealProxyProcess() (*process, error)
func (*HeimdallrProxy) IdealRPCServer ¶
func (r *HeimdallrProxy) IdealRPCServer() (*process, error)
func (*HeimdallrProxy) InternalTokenSecretName ¶
func (r *HeimdallrProxy) InternalTokenSecretName() string
func (*HeimdallrProxy) LabelsForDashboard ¶
func (r *HeimdallrProxy) LabelsForDashboard() map[string]string
func (*HeimdallrProxy) LabelsForDefragmentJob ¶
func (r *HeimdallrProxy) LabelsForDefragmentJob() map[string]string
func (*HeimdallrProxy) LabelsForMain ¶
func (r *HeimdallrProxy) LabelsForMain() map[string]string
func (*HeimdallrProxy) LabelsForRPCServer ¶
func (r *HeimdallrProxy) LabelsForRPCServer() map[string]string
func (*HeimdallrProxy) NewCookieSecret ¶
func (r *HeimdallrProxy) NewCookieSecret() (*corev1.Secret, error)
func (*HeimdallrProxy) NewGithubSecret ¶
func (r *HeimdallrProxy) NewGithubSecret() (*corev1.Secret, error)
func (*HeimdallrProxy) NewInternalTokenSecret ¶
func (r *HeimdallrProxy) NewInternalTokenSecret() (*corev1.Secret, error)
func (*HeimdallrProxy) NewSigningPrivateKey ¶
func (r *HeimdallrProxy) NewSigningPrivateKey() (*corev1.Secret, error)
func (*HeimdallrProxy) PodDisruptionBudgetNameForDashboard ¶
func (r *HeimdallrProxy) PodDisruptionBudgetNameForDashboard() string
func (*HeimdallrProxy) PodDisruptionBudgetNameForMain ¶
func (r *HeimdallrProxy) PodDisruptionBudgetNameForMain() string
func (*HeimdallrProxy) PodDisruptionBudgetNameForRPCServer ¶
func (r *HeimdallrProxy) PodDisruptionBudgetNameForRPCServer() string
func (*HeimdallrProxy) PrivateKeySecretName ¶
func (r *HeimdallrProxy) PrivateKeySecretName() string
func (*HeimdallrProxy) ReverseProxyConfig ¶
func (r *HeimdallrProxy) ReverseProxyConfig() (*corev1.ConfigMap, error)
func (*HeimdallrProxy) ReverseProxyConfigName ¶
func (r *HeimdallrProxy) ReverseProxyConfigName() string
func (*HeimdallrProxy) Roles ¶
func (r *HeimdallrProxy) Roles() []proxyv1.Role
func (*HeimdallrProxy) RpcPermissions ¶
func (r *HeimdallrProxy) RpcPermissions() []proxyv1.RpcPermission
func (*HeimdallrProxy) Secrets ¶
func (r *HeimdallrProxy) Secrets() []CreateSecret
func (*HeimdallrProxy) ServiceNameForDashboard ¶
func (r *HeimdallrProxy) ServiceNameForDashboard() string
func (*HeimdallrProxy) ServiceNameForInternalApi ¶
func (r *HeimdallrProxy) ServiceNameForInternalApi() string
func (*HeimdallrProxy) ServiceNameForMain ¶
func (r *HeimdallrProxy) ServiceNameForMain() string
func (*HeimdallrProxy) ServiceNameForRPCServer ¶
func (r *HeimdallrProxy) ServiceNameForRPCServer() string
func (*HeimdallrProxy) Version ¶
func (r *HeimdallrProxy) Version() string
type InternalState ¶
type InternalState string
const ( InternalStateCreatingFirstMember InternalState = "creatingFirstNode" InternalStateCreatingMembers InternalState = "creatingMembers" InternalStateRepair InternalState = "repair" InternalStateRestore InternalState = "restore" InternalStatePreparingUpdate InternalState = "preparingUpdate" InternalStateUpdatingMember InternalState = "updatingMember" InternalStateTeardownUpdating InternalState = "teardownUpdating" InternalStateRunning InternalState = "running" )
type MockOption ¶
type MockOption struct { Cluster clientv3.Cluster Maintenance clientv3.Maintenance }
type ProxyController ¶
type ProxyController struct { schema.GroupVersionKind // contains filtered or unexported fields }
func NewProxyController ¶
func NewProxyController( ctx context.Context, sharedInformerFactory informers.SharedInformerFactory, coreSharedInformerFactory kubeinformers.SharedInformerFactory, client kubernetes.Interface, proxyClient clientset.Interface, cmClient cmClientset.Interface, mClient mClientset.Interface, ) (*ProxyController, error)
type RetryError ¶
type RetryError struct {
// contains filtered or unexported fields
}
func (*RetryError) Error ¶
func (e *RetryError) Error() string
func (*RetryError) Is ¶
func (e *RetryError) Is(err error) bool
func (*RetryError) Unwrap ¶
func (e *RetryError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.