Kubernetes

Repository or bucket

Top-level module contains information about the repository or bucket that is being used to configure the pipelines and deploy the platform.

Required parameters:

  • source_type - "package" or "repository"

Depending on the source type parameters are:

Repository

  • repo_url - URL to the cb-k8s-deployment repository
  • repo_version - Repository branch
  • repo_private_key_var_name - name of the credhub key which contains git private key that can be used to access the repository.

Bucket

  • package_bucket - Bucket name
  • package_target_cloud - Cloud type ("openstack", "aws")
  • package_version - Version ("latest" or specific like "1.0.0")

Pipelines

Avialable pipelines:

  • deploy_k8s - pipeline to deploy the platform
  • backup_k8s - backup pipeline
  • restore_k8s - restore from backup pipeline
  • k8s_smoke_tests - smoke tests pipeline

Required parameters

  • kubectl_version - kubectl version that will be installed on jumpbox, default: "1.12.4"
  • k8s_masters - number of master nodes, default: "1"
  • k8s_workers - number of worker nodes, default: "2"
  • k8s_network_name - name of network created by terraform, default: "k8s"
  • k8s_network_sg - name of security group created by terraform, default: "k8s-sg"

Optional parameters

Traefik certificates

  • traefik_certificate_bucket - Bucket name with traefik certificates (configuration for bucket is taken from storage_config.yml)
  • traefik_certificate_files - Array of traefik certificate files (it should contain crt and key files, eg. "traefik.crt traefik.key")

Insecure registries

  • insecure_registries - List of insecure registries that should be configured on docker inside k8s (e.g "myregistrydomain.com:5000")

Extension ops files

  • extensions_bucket_name - Bucket name for extension ops files
  • extensions_k8s_directory - Directory name for kubernetes deployment extension ops files in extensions bucket
  • extensions_k8s_properties - Properties filename for extension ops
  • extensions_provider_directory - Directory name for cloud provider specific extension ops files in extensions bucket
  • extensions_provider_properties - Properties filename for extension ops

Example

{
    "repo_url": "git@ssh.dev.azure.com:v3/grape-up/cloudboostr/cb-k8s-deployment",
    "repo_version": "openstack",
    "repo_private_key_var_name": "git_private_key",

    "pipelines": [
        {
            "name": "deploy_k8s",
            "file": "ci/pipelines/openstack/k8s_pipeline.yml",
            "vars": [
                {"name": "trigger_on_repo_change", "value": "false"}
            ]
        },
        {
            "name": "backup_k8s",
            "file": "ci/pipelines/openstack/backup_k8s_pipeline.yml",
            "vars": [
                {"name": "trigger_on_repo_change", "value": "false"}
            ]
        },
        {
            "name": "restore_k8s",
            "file": "ci/pipelines/openstack/restore_k8s_pipeline.yml",
            "vars": [
                {"name": "trigger_on_repo_change", "value": "false"}
            ]
        },
        {
            "name": "k8s_smoke_tests",
            "file": "ci/pipelines/openstack/k8s_smoke_tests_pipeline.yml",
            "vars": []
        }
    ],

    "vars": [
        {"name": "kubectl_version",   "value": "1.12.4"},
        {"name": "k8s_masters",       "value": "1"},
        {"name": "k8s_workers",       "value": "2"},
        {"name": "k8s_network_name",  "value": "k8s"},
        {"name": "k8s_network_sg",    "value": "k8s-sg"},
        {"name": "traefik_certificate_bucket", "value": ""},
        {"name": "traefik_certificate_files", "value": ""},
        {"name": "insecure_registries", "value": ""},
        {"name": "extensions_bucket_name", "value": ""},
        {"name": "extensions_k8s_directory", "value": "openstack/env/cb-k8s-deployment"},
        {"name": "extensions_k8s_properties", "value": "k8s.properties"},
        {"name": "extensions_provider_directory", "value": "openstack/env/cb-k8s-provider-deployment"},
        {"name": "extensions_provider_properties", "value": "k8s-provider.properties"}
    ]
}