Documentation
¶
Index ¶
Constants ¶
const ( // LabelAppName for discovery. LabelAppName = "app_name" // LabelAppType for discovery. LabelAppType = "app_type" // LabelAppLayer for discovery. LabelAppLayer = "app_layer" )
const ( // LayerNginx for identifying Nginx objects. LayerNginx = "nginx" // LayerFPM for identifying FPM objects. LayerFPM = "fpm" // LayerBatch for identifying Batch objects. LayerBatch = "batch" // LayerVolume for identifying Volume objects. LayerVolume = "volume" )
const ( // PodEnvSkipperEnv identifies which environment an application is running. PodEnvSkipperEnv = "SKPR_ENV" // PodEnvNewRelicApp is a required environment variable for New Relic monitoring. PodEnvNewRelicApp = "NEW_RELIC_APP_NAME" // PodEnvNewRelicLicense is a required environment variable for New Relic monitoring. PodEnvNewRelicLicense = "NEW_RELIC_LICENSE_KEY" // PodEnvNewRelicEnabled is a required environment variable for New Relic monitoring. PodEnvNewRelicEnabled = "NEW_RELIC_ENABLED" )
const ( // PodContainerNginx for identifying the Nginx container in a pod. PodContainerNginx = "nginx" // PodContainerFPM for identifying the FPM container in a pod. PodContainerFPM = "fpm" // PodContainerCLI for identifying the CLI container in a pod. PodContainerCLI = "cli" // PodContainerMetrics for identifying the Metrics container in a pod. PodContainerMetrics = "metrics" )
const ( // VolumePublic identifier. VolumePublic = "public" // VolumePrivate identifier. VolumePrivate = "private" // VolumeTemporary identifier. VolumeTemporary = "temporary" // VolumeConfigDefault identifier. VolumeConfigDefault = "config-default" // VolumeConfigOverride identifier. VolumeConfigOverride = "config-override" // VolumeConfigData identifier. VolumeConfigData = "config-data" // VolumeSecretDefault identifier. VolumeSecretDefault = "secret-default" // VolumeSecretOverride identifier. VolumeSecretOverride = "secret-override" // VolumeSecretCertificate identifier. VolumeSecretCertificate = "secret-certificate" )
const ( // ConfigMapMountPublic declares which config Drupal can use to store public files. ConfigMapMountPublic = "mount.public" // ConfigMapMountPrivate declares which config Drupal can use to store private files. ConfigMapMountPrivate = "mount.private" // ConfigMapMountTemporary declares which config Drupal can use to store temporary files. ConfigMapMountTemporary = "mount.temporary" )
const ( // PHPMemoryLimit configures PHPs memory limit. PHPMemoryLimit = "PHP_MEMORY_LIMIT" // FPMMaxChildren configures PHP FPM max children. FPMMaxChildren = "PHP_FPM_MAX_CHILDREN" // FPMMinSpareServers configures PHP FPM min spare servers. FPMMinSpareServers = "PHP_FPM_MIN_SPARE_SERVERS" // FPMMaxSpareServers configures PHP FPM max spare servers. FPMMaxSpareServers = "PHP_FPM_MAX_SPARE_SERVERS" // FPMStartServers configures PHP FPM start servers. FPMStartServers = "PHP_FPM_START_SERVERS" // FPMMaxRequests configures PHP FPM max requests. FPMMaxRequests = "PHP_FPM_MAX_REQUESTS" )
const ( // VolumePermissionsContainer identifier for the permissions CronJob container. VolumePermissionsContainer = "permissions" // VolumePermissionsDefaultDeadline sets deadline if not specified. VolumePermissionsDefaultDeadline = 600 // VolumePermissionsDefaultKeepSuccess sets KeepSuccess if not specified. VolumePermissionsDefaultKeepSuccess = 1 // VolumePermissionsDefaultKeepFailed sets KeepFailed if not specified. VolumePermissionsDefaultKeepFailed = 1 // VolumePermissionsDefaultRetries sets Retries if not specified. VolumePermissionsDefaultRetries = 2 )
const (
// Application identifier.
Application = "drupal"
)
const (
// ConfigMapDataConfigJSON declares the key to the application config file.
ConfigMapDataConfigJSON = "config.json"
)
const (
// ControllerName used for identifying which controller is performing an operation.
ControllerName = "drupal-controller"
)
const (
// SecretPrometheusToken identifier for applications.
SecretPrometheusToken = "prometheus.token"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricsFPM ¶ added in v0.4.0
type MetricsFPM struct { Name string Image string CPU resource.Quantity Memory resource.Quantity Protocol string Port string Path string }
MetricsFPM used for autoscaling PHP FPM.
type ReconcileDrupal ¶
ReconcileDrupal reconciles a Drupal object
func (*ReconcileDrupal) Reconcile ¶
Reconcile reads that state of the cluster for a Drupal object and makes changes based on the state read and what is in the Drupal.Spec Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=app.skpr.io,resources=drupals,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=app.skpr.io,resources=drupals/status,verbs=get;update;patch
func (*ReconcileDrupal) Sync ¶
func (r *ReconcileDrupal) Sync(log log.Logger, drupal *appv1beta1.Drupal) (appv1beta1.DrupalStatus, error)
Sync all Kubernetes objects and return the status of the Drupal deployment.
func (*ReconcileDrupal) SyncStatus ¶
func (r *ReconcileDrupal) SyncStatus(drupal *appv1beta1.Drupal, status appv1beta1.DrupalStatus) error
SyncStatus with the Drupal object.