Skip to content

Instantly share code, notes, and snippets.

@audunstrand
Created April 26, 2017 10:16
Show Gist options
  • Save audunstrand/149065e4f3dc98a27b7eaffaca0174c0 to your computer and use it in GitHub Desktop.
Save audunstrand/149065e4f3dc98a27b7eaffaca0174c0 to your computer and use it in GitHub Desktop.
---
version: 2
namespace: default # the namespace to use
admin_access: false # What access the pod has to the k8s api server
has_secrets: false # if true, the application will get secrets as defined in hiearadata on ops1
replicas: 2 # The number of instances to run. Ceiling if autoscaler is enabled
autoscaler: # Autoscaler scales from min_replicas to fiaas.replicas (#replicas must be >1). Need fiaas.resources.requests.cpu. Scales up on mean cpu utilisation of >cpu_threshold_percentage. See https://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/
enabled: false
min_replicas: 2
cpu_threshold_percentage: 50
host: # Optional. External hostname to be exposed on. If defined, Ingresses for {host}/{ports.path} is created. See http://kubernetes.io/docs/user-guide/ingress/
prometheus:
enabled: true # if false the pod will not be scraped for metrics by prometheus
port: http # Name of HTTP port prometheus is served on
path: /internal-backstage/prometheus # Path to prometheus-metrics
resources: # Optional. See: http://kubernetes.io/docs/user-guide/compute-resources/
limits:
memory: # app will be killed if exceeding these limits
cpu: # app will have its cpu usage throttled if exceeding this limit
requests: # app will be scheduled on nodes with at least this amount resources available
memory: # for java apps set this to -xmx * 1.1
cpu: #
ports: # A list of ports the application listens on
- protocol: http # [http|tcp]
name: http # A logical name for port discovery. Must be <= 63 characters and match [a-z0-9]([-a-z0-9]*[a-z0-9])? (DNS_LABEL)
port: 80 # port number that will be exposed. For protocol=tcp, the available port range is (1024-32767).
target_port: 80 # the port number which is exposed by the container and should receive traffic routed to `port`
path: / # Only for http. Used together with <host> (see above)
healthchecks:
liveness:
# Valid configuration requires exactly one of execute|http|tcp
execute:
command: # Command to execute inside the container.
http:
path: / # Path to GET
port: http # port to connect to on the container. Must either be port number or name
http_headers: {} # optional http headers (free form map)
tcp:
port: # tcp port number we will connect to on the container. Will receive a SYN and must complete the TCP handshake. Must either be port number or name
initial_delay_seconds: 10 # Number of seconds after the container has started before liveness probes are initiated.
period_seconds: 10 # How often (in seconds) to perform the probe.
success_threshold: 1 # Minimum consecutive successes for the probe to be considered successful after having failed.
timeout_seconds: 1 # Number of seconds after which the probe times out.
readiness: # If readiness is left out, the readiness settings are copied from liveness
# Valid configuration requires exactly one of execute|http|tcp
execute:
command: # Command to execute inside the container.
http:
path: / # Path to GET
port: http # port to connect to on the container. Must either be port number or name
http_headers: {} # optional http headers
tcp:
port: # tcp port number we will connect to on the container. Will receive a SYN and must complete the TCP handshake. Must either be port number or name
initial_delay_seconds: 10 # Number of seconds after the container has started before readiness probes are initiated.
period_seconds: 10 # How often (in seconds) to perform the probe.
success_threshold: 1 # Minimum consecutive successes for the probe to be considered successful after having failed.
timeout_seconds: 1 # Number of seconds after which the probe times out.
config: # A ConfigMap of the same name must exist, and is made available to the application
volume: false # If true, the ConfigMap is mounted at /var/run/config/fiaas/
envs: [] # A list of environment variables to set from the ConfigMap. The entry must be named the same in the ConfigMap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment