No description or website provided.
Clone or download
b-m-f Merge pull request #192 from b-m-f/master
Remove volume mounted secret for data
Latest commit cd3018c Jan 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ingresses
services
templates
README.md
config.global.yaml
config.production.yaml
config.qa.yaml
config.staging.yaml
create-project
namespaces.yaml Move proxy configuration into it's own file Jan 4, 2018
qa-deploy

README.md

Kubernetes configs for canonical websites

This repository contains the configuration files the Kubernetes deployments for some of our websites.

Structure

We deploy our services into one of two namespaces:

  • staging: Services for our staging servers (there's usually one per production website)
  • production: Services for our production servers

services

Both the service and deployment config for a specific service are stored together in a single file at:

services/{primary-domain}.yaml

E.g. the service and deployment settings for https://snapcraft.io are in services/snapcraft.io.yaml.

This config is then used to configure snapcraft.io services in both the staging and production namespace.

ingresses

The ingress resources are split into two folders, ingresses/staging and ingresses/production. These folders correspond to the namespaces in which those ingress resources will be applied, and there is one file per domain.

Deploying

Using create-project

When creating a new project you can either copy an existing projects service and ingress files. Then replace the config strings with the new project configs.

Or, use ./create-project. To auto generate the files for a new project. Run ./create-project project.name and the tool will create the config files for you.

For example: ./create-project www.ubuntu.com

Will create:

To deploy a new service

E.g. to deploy the snapcraft.io service to staging from scratch:

# E.g. To deploy the snapcraft.io services to staging
export TAG_TO_DEPLOY=a264efb326485
envsubst < services/snapcraft.io.yaml | kubectl apply --namespace staging --filename -

To update an existing service

Or to update an existing snapcraft.io service without changing the deployed image:

# E.g. for snapcraft.io
export TAG_TO_DEPLOY=$(kubectl get deployment snapcraft-io -o jsonpath="{.spec.template.spec.containers[*].image}" | grep -P -o '(?<=:)[^:]*$')
envsubst < services/snapcraft.io.yaml | kubectl apply --namespace staging --filename -