Documentation ¶
Index ¶
Constants ¶
const ( // SuccessSynced is used as part of the Event 'reason' when a Tenant is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a Tenant fails // to sync due to a StatefulSet of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a Tenant // fails to sync due to a StatefulSet already existing MessageResourceExists = "Resource %q already exists and is not managed by MinIO Operator" // MessageResourceSynced is the message used for an Event fired when a Tenant // is synced successfully MessageResourceSynced = "Tenant synced successfully" )
const ( StatusInitialized = "Initialized" StatusProvisioningCIService = "Provisioning MinIO Cluster IP Service" StatusProvisioningHLService = "Provisioning MinIO Headless Service" StatusProvisioningStatefulSet = "Provisioning MinIO Statefulset" StatusProvisioningConsoleDeployment = "Provisioning Console Deployment" StatusProvisioningKESStatefulSet = "Provisioning KES StatefulSet" StatusProvisioningLogPGStatefulSet = "Provisioning Postgres server for Log Search feature" StatusProvisioningLogSearchAPIDeployment = "Provisioning Log Search API server for Log Search feature" StatusProvisioningPrometheusStatefulSet = "Provisioning Prometheus server for Prometheus metrics feature" StatusWaitingForReadyState = "Waiting for Pods to be ready" StatusWaitingForLogSearchReadyState = "Waiting for Log Search Pods to be ready" StatusWaitingMinIOCert = "Waiting for MinIO TLS Certificate" StatusWaitingMinIOClientCert = "Waiting for MinIO TLS Client Certificate" StatusWaitingKESCert = "Waiting for KES TLS Certificate" StatusWaitingConsoleCert = "Waiting for Console TLS Certificate" StatusUpdatingMinIOVersion = "Updating MinIO Version" StatusUpdatingConsole = "Updating Console" StatusUpdatingLogPGStatefulSet = "Updating Postgres server for Log Search feature" StatusUpdatingLogSearchAPIServer = "Updating Log Search API server" StatusUpdatingResourceRequirements = "Updating Resource Requirements" StatusUpdatingAffinity = "Updating Pod Affinity" StatusNotOwned = "Statefulset not controlled by operator" StatusFailedAlreadyExists = "Another MinIO Tenant already exists in the namespace" StatusInconsistentMinIOVersions = "Different versions across MinIO Pools" )
Standard Status messages for Tenant
Variables ¶
var ErrLogSearchNotReady = fmt.Errorf("Log Search is not ready")
ErrLogSearchNotReady is the error returned when Log Search is not Ready
var ErrMinIONotReady = fmt.Errorf("MinIO is not ready")
ErrMinIONotReady is the error returned when MinIO is not Ready
Functions ¶
func MinIOControllerRateLimiter ¶ added in v0.4.0
func MinIOControllerRateLimiter() queue.RateLimiter
MinIOControllerRateLimiter is a no-arg constructor for a default rate limiter for a workqueue for our controller. both overall and per-item rate limiting. The overall is a token bucket and the per-item is exponential
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller struct watches the Kubernetes API for changes to Tenant resources
func NewController ¶
func NewController( kubeClientSet kubernetes.Interface, minioClientSet clientset.Interface, certClient certapi.CertificatesV1beta1Client, statefulSetInformer appsinformers.StatefulSetInformer, deploymentInformer appsinformers.DeploymentInformer, jobInformer batchinformers.JobInformer, tenantInformer informers.TenantInformer, serviceInformer coreinformers.ServiceInformer, hostsTemplate, operatorVersion string) *Controller
NewController returns a new sample controller
func (*Controller) BucketSrvHandler ¶
func (c *Controller) BucketSrvHandler(w http.ResponseWriter, r *http.Request)
BucketSrvHandler - POST /webhook/v1/bucketsrv/{namespace}/{name}?bucket={bucket}
func (*Controller) GetenvHandler ¶
func (c *Controller) GetenvHandler(w http.ResponseWriter, r *http.Request)
GetenvHandler - GET /webhook/v1/getenv/{namespace}/{name}?key={env}
func (*Controller) Start ¶
func (c *Controller) Start(threadiness int, stopCh <-chan struct{}) error
Start will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.