drupal

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelAppName for discovery.
	LabelAppName = "app_name"
	// LabelAppType for discovery.
	LabelAppType = "app_type"
	// LabelAppLayer for discovery.
	LabelAppLayer = "app_layer"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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
)
View Source
const (
	// Application identifier.
	Application = "drupal"
)
View Source
const (
	// ConfigMapDataConfigJSON declares the key to the application config file.
	ConfigMapDataConfigJSON = "config.json"
)
View Source
const (
	// ControllerName used for identifying which controller is performing an operation.
	ControllerName = "drupal-controller"
)
View Source
const (
	// SecretPrometheusToken identifier for applications.
	SecretPrometheusToken = "prometheus.token"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, metrics Metrics) error

Add creates a new Drupal Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func BuildConslidatedConfig added in v0.4.2

func BuildConslidatedConfig(defaultConfig, overrideConfig *corev1.ConfigMap, defaultSecret, overrideSecret *corev1.Secret) ([]byte, error)

BuildConslidatedConfig from Secrets and ConfigMaps which can be consumed by an application.

Types

type Metrics added in v0.4.0

type Metrics struct {
	FPM MetricsFPM
}

Metrics used for autoscaling.

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

type ReconcileDrupal struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileDrupal reconciles a Drupal object

func (*ReconcileDrupal) Reconcile

func (r *ReconcileDrupal) Reconcile(request reconcile.Request) (reconcile.Result, error)

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL