Configure Spinnaker's Usage of Redis

Several Spinnaker services use Redis. Consider tuning them to meet your usage requirements.

Spinnaker relies on its cache for a few key purposes:

  • Session data for logins
  • Bake logs and history
  • Recording which triggers have already been acted upon when using docker/jenkins triggers
  • ETC.

Most of these can be configured to your needs, whether it is to make Spinnaker more responsive, or reduce the load on a downstream dependency. Some of these settings apply only to SQL or REDIS depending upon configuration. The below are some examples of adjusting these configurations.

Configure infrastructure caching

By default, Spinnaker’s Clouddriver service spawns “caching agents” every 30 seconds. These agents are scheduled and coordinated across all instances of Clouddriver, allowing you to reduce the load on any single instance of Clouddriver by creating more replicas of the service.

To adjust how this caching happens, Clouddriver exposes a few properties that can be set in ~/spinnaker-kustomize/overlays/config/files/clouddriver-local.yml:

# How many seconds (default 30s) between runs of agent. Lowering this number
# means the resources in the Spinnaker UI will be updated more frequently,
# at the cost higher API/quota usage of your cloud provider.
sql.poll.intervalSeconds:


# How many seconds (default 300s, 5 minutes) Clouddriver will wait to reschedule
# an agent that never completes (never throws an error or returns cache data).
# If your agents are taking a long time to complete their cache cycles
# successfully and Clouddriver is prematurely rescheduling them, you can try to
# raise this number.
sql.poll.timeoutSeconds:

Configure pipeline cleanup

If you see that your Redis memory usage is growing unbounded, it’s probably because the orchestration engine stores all pipeline executions forever by default. This can be configured by setting the following properties in ~/spinnaker-kustomize/overlays/config/files/orca-local.yml:

pollers:
  oldPipelineCleanup:
    enabled: true                  # This enables old pipeline execution cleanup (default: false)
    intervalMs: 3600000            # How many milliseconds between pipeline cleanup runs (default: 1hr or 3600000)
    thresholdDays: 30              # How old a pipeline execution must be to be deleted (default: 30)
    minimumPipelineExecutions: 5   # How many executions to keep around (default: 5)

tasks:
  controller:
    daysOfExecutionHistory: 30      # How many days to keep old task executions around.

There are MANY more configuration options available as needed. See the Properties files in spinnaker for the various services for information and ask in slack for help.