Documentation
¶
Index ¶
- Constants
- Variables
- func IsInvalidConfig(err error) bool
- func IsInvalidSecret(err error) bool
- func IsTimeout(err error) bool
- func IsWrongType(err error) bool
- func K8sLabels(clusterID string, certificate Cert) map[string]string
- func K8sName(clusterID string, certificate Cert) string
- type AppOperator
- type Cert
- type Cluster
- type ClusterOperator
- type Config
- type Draining
- type File
- type Files
- type Interface
- type Monitoring
- type Searcher
- func (s *Searcher) SearchAppOperator(clusterID string) (AppOperator, error)
- func (s *Searcher) SearchCluster(clusterID string) (Cluster, error)
- func (s *Searcher) SearchClusterOperator(clusterID string) (ClusterOperator, error)
- func (s *Searcher) SearchDraining(clusterID string) (Draining, error)
- func (s *Searcher) SearchMonitoring(clusterID string) (Monitoring, error)
- func (s *Searcher) SearchTLS(clusterID string, cert Cert) (TLS, error)
- type TLS
Constants ¶
View Source
const ( // DefaultWatchTimeout is the time to wait on watches against the Kubernetes // API before giving up and throwing an error. DefaultWatchTimeout = 90 * time.Second )
View Source
const (
SecretNamespace = "default"
)
These constants are used when filtering the secrets, to only retrieve the ones we are interested in.
Variables ¶
View Source
var AllCerts = []Cert{ APICert, AppOperatorAPICert, AWSOperatorAPICert, CalicoEtcdClientCert, ClusterOperatorAPICert, EtcdCert, FlanneldEtcdClientCert, InternalAPICert, NodeOperatorCert, PrometheusCert, ServiceAccountCert, WorkerCert, }
AllCerts lists all certificates that can be created by cert-operator.
Functions ¶
func IsInvalidConfig ¶
func IsInvalidSecret ¶
func IsWrongType ¶
Types ¶
type AppOperator ¶
type AppOperator struct {
APIServer TLS
}
type Cert ¶
type Cert string
Cert is a certificate name.
const ( APICert Cert = "api" AppOperatorAPICert Cert = "app-operator-api" AWSOperatorAPICert Cert = "aws-operator-api" CalicoEtcdClientCert Cert = "calico-etcd-client" ClusterOperatorAPICert Cert = "cluster-operator-api" EtcdCert Cert = "etcd" FlanneldEtcdClientCert Cert = "flanneld-etcd-client" InternalAPICert Cert = "internal-api" NodeOperatorCert Cert = "node-operator" PrometheusCert Cert = "prometheus" ServiceAccountCert Cert = "service-account" WorkerCert Cert = "worker" )
These constants used as Cert parsing a secret received from the API.
type ClusterOperator ¶
type ClusterOperator struct {
APIServer TLS
}
type Config ¶
type Config struct {
K8sClient kubernetes.Interface
Logger micrologger.Logger
WatchTimeout time.Duration
}
type Files ¶
type Files []File
func NewFilesCluster ¶
func NewFilesClusterMaster ¶
func NewFilesClusterWorker ¶
type Interface ¶
type Interface interface {
// SearchAppOperator searches for secrets containing TLS certs
// for managed catalogue service.
SearchAppOperator(clusterID string) (AppOperator, error)
// SearchCluster searches for secrets containing TLS certs for guest
// clusters components.
SearchCluster(clusterID string) (Cluster, error)
// SearchClusterOperator searches for secrets containing TLS certs for
// connecting to guest clusters.
SearchClusterOperator(clusterID string) (ClusterOperator, error)
// SearchDraining searches for secrets containing TLS certs for
// draining nodes in guest clusters.
SearchDraining(clusterID string) (Draining, error)
// SearchMonitoring searches for secrets containing TLS certs for
// monitoring guest clusters.
SearchMonitoring(clusterID string) (Monitoring, error)
// SearchTLS provides a dedicated way to lookup a single TLS asset for one
// specific purpose. This might be used for e.g. granting guest cluster
// access within operators.
SearchTLS(clusterID string, cert Cert) (TLS, error)
}
type Monitoring ¶
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
func NewSearcher ¶
func (*Searcher) SearchAppOperator ¶
func (s *Searcher) SearchAppOperator(clusterID string) (AppOperator, error)
func (*Searcher) SearchCluster ¶
func (*Searcher) SearchClusterOperator ¶
func (s *Searcher) SearchClusterOperator(clusterID string) (ClusterOperator, error)
func (*Searcher) SearchDraining ¶
func (*Searcher) SearchMonitoring ¶
func (s *Searcher) SearchMonitoring(clusterID string) (Monitoring, error)
Click to show internal directories.
Click to hide internal directories.