Documentation ¶
Index ¶
- Constants
- func CreateCertificates(certDir string) (*bytes.Buffer, error)
- func CreateConfigmaps(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
- func CreateDeployments(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, ...) (dirty bool, err error)
- func CreateIngresses(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
- func CreateOrUpdateAuthSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, ...) error
- func CreateOrUpdateTLSSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
- func CreatePersistentVolumeClaims(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (map[string]string, error)
- func CreateRoleBindings(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
- func CreateServices(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
- func CreateStatefulSets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (bool, error)
- func GetAuthSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (string, string, error)
- func GetClusterNameFromSecret(controller *Controller, namespace string) (string, error)
- func InitializeVMOSpec(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance)
- func NewRoleBindings(vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, controller *Controller) ([]*rbacv1.RoleBinding, error)
- func StartHTTPServer(controller *Controller, certdir string, port string)
- type AdPvcCounter
- type ClusterInfo
- type Controller
- type HashedPasswords
- type StorageClassInfo
Constants ¶
const ( // OperatorName is the resource name for the Verrazzano monitoring operator OperatorName = "verrazzano-monitoring-operator" // OperatorNamespace is the resource namespace for the Verrazzano monitoring operator OperatorNamespace = "verrazzano-system" )
const ( // PasswordSeparator separates passwords from hashes PasswordSeparator = ":" // LineSeparator separates password records LineSeparator = "\n" )
Variables ¶
This section is empty.
Functions ¶
func CreateCertificates ¶ added in v0.0.26
CreateCertificates creates the needed certificates for the validating webhook
func CreateConfigmaps ¶
func CreateConfigmaps(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
CreateConfigmaps to create all required configmaps for VMI
func CreateDeployments ¶
func CreateDeployments(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, pvcToAdMap map[string]string, existingCluster bool) (dirty bool, err error)
CreateDeployments create/update VMO deployment k8s resources
func CreateIngresses ¶
func CreateIngresses(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
CreateIngresses create/update VMO ingress k8s resources
func CreateOrUpdateAuthSecrets ¶
func CreateOrUpdateAuthSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, credsMap map[string]string) error
CreateOrUpdateAuthSecrets create/updates auth secrets
func CreateOrUpdateTLSSecrets ¶
func CreateOrUpdateTLSSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
CreateOrUpdateTLSSecrets create/updates TLS secrets
func CreatePersistentVolumeClaims ¶ added in v0.0.29
func CreatePersistentVolumeClaims(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (map[string]string, error)
CreatePersistentVolumeClaims Creates PVCs for the given VMO instance. Returns a pvc->AD map, which is populated *only if* AD information can be specified for new PVCs or determined from existing PVCs. A pvc-AD map with empty AD values instructs the subsequent deployment processing logic to do the job of choosing ADs.
func CreateRoleBindings ¶
func CreateRoleBindings(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
CreateRoleBindings creates/updates VMO RoleBindings k8s resources
func CreateServices ¶
func CreateServices(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) error
CreateServices creates/updates/deletes VMO service k8s resources
func CreateStatefulSets ¶
func CreateStatefulSets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (bool, error)
CreateStatefulSets creates/updates/deletes VMO statefulset k8s resources
func GetAuthSecrets ¶
func GetAuthSecrets(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance) (string, string, error)
GetAuthSecrets returns username and password
func GetClusterNameFromSecret ¶ added in v0.0.27
func GetClusterNameFromSecret(controller *Controller, namespace string) (string, error)
func InitializeVMOSpec ¶
func InitializeVMOSpec(controller *Controller, vmo *vmcontrollerv1.VerrazzanoMonitoringInstance)
InitializeVMOSpec initializes any uninitialized elements of the VMO spec.
func NewRoleBindings ¶
func NewRoleBindings(vmo *vmcontrollerv1.VerrazzanoMonitoringInstance, controller *Controller) ([]*rbacv1.RoleBinding, error)
NewRoleBindings constructs the necessary RoleBindings for a VMO instance's Sub-Operator.
func StartHTTPServer ¶
func StartHTTPServer(controller *Controller, certdir string, port string)
StartHTTPServer runs an embedded HTTP server for any VMO handlers as a "resilient" goroutine meaning it runs in the background and will be restarted if it dies.
Types ¶
type AdPvcCounter ¶
type AdPvcCounter struct {
// contains filtered or unexported fields
}
AdPvcCounter type for AD PVC counts
func NewAdPvcCounter ¶
func NewAdPvcCounter(ads []string) *AdPvcCounter
NewAdPvcCounter return new counter. The provided ADs are the only ones schedulable; create entries in the map
func (*AdPvcCounter) GetLeastUsedAd ¶
func (p *AdPvcCounter) GetLeastUsedAd() string
GetLeastUsedAd returns least used AD
func (*AdPvcCounter) Inc ¶
func (p *AdPvcCounter) Inc(ad string)
Inc increments counter. Any AD not already in map is not schedulable, so ignore
type ClusterInfo ¶ added in v0.0.26
type ClusterInfo struct { KeycloakURL string KeycloakCABundle []byte // contains filtered or unexported fields }
ClusterInfo has info like ContainerRuntime and managed cluster name
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller implementation for VMO resources
func NewController ¶
func NewController(namespace string, configmapName string, buildVersion string, kubeconfig string, masterURL string, watchNamespace string, watchVmi string) (*Controller, error)
NewController returns a new vmo controller
func (*Controller) IsHealthy ¶
func (c *Controller) IsHealthy() bool
IsHealthy returns true if this controller is healthy, false otherwise. It's health is determined based on: (1) its workqueue is 0 or decreasing in a timely manner, (2) it can communicate with API server, and (3) the CRD exists.
func (*Controller) Run ¶
func (c *Controller) Run(threadiness int) error
Run 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.
type HashedPasswords ¶
HashedPasswords name => hash
func (HashedPasswords) Bytes ¶
func (hp HashedPasswords) Bytes() (passwordBytes []byte)
Bytes bytes representation
func (HashedPasswords) SetPassword ¶
func (hp HashedPasswords) SetPassword(name, password string) (err error)
SetPassword set a password for a user with a hashing algo
type StorageClassInfo ¶
StorageClassInfo contains storage class info for PVC