1.9.0-alpha.2 • Published 4 years ago

@socialgouv/k8s v1.9.0-alpha.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
4 years ago

.k8s

A dynamic .k8s folder containing the configuration required by Kosko to generate Kubernetes manifests.

Config

in .socialgouv/config.json

Only name and type are mandatory.

KeyTypeDescription
namestringApplication name
type"app""static"Deployment type: either app (Dockerfile) or static
hasuraboolean"exposed"Add hasura container (if value is exposed, a dedicated hasura ingress will be created)
azurepgbooleanAdd an azurepg connection
probesPathobjectThe base url for kubernetes probes
probesobjectCustom probes configuration
resourcesobjectCustom resources
subdomainstringForce the default production subdomain.
ingress.annotationsobjectAdd custom ingress annotations
registry"harbor""ghcr"Indicates which registry to use. Default is harbor

Example :

{
  "name": "myapp",
  "type": "app",
  "subdomain": "myapp-beta",
  "hasura": true,
  "probesPath": "/index.html",
  "ingress": {
    "annotations": {
      "nginx.ingress.kubernetes.io/configuration-snippet": "more_set_headers \"X-Answer: 42\";"
    }
  },
  "resources": {
    "requests": {
      "memory": "128Mi",
      "cpu": "200m"
    },
    "limits": {
      "memory": "256Mi",
      "cpu": "500m"
    }
  }
}

Kubernetes

in .socialgouv/environments, add your config maps and sealed-secrets :

  • dev : feature-branches
  • preprod : deployed on new releases
  • prod : deployed on new releases or manually
environments
 |-dev
    |-[name].configmap.yaml
    |-[name].sealed-secret.yaml
    |-pg.sealed-secret.yaml        # Postgres connection
    |-yaml
      |-another-ingress.yml
      |-some-netpol.yml
  ...

You can also provide additionnal kube manifests in each environment yaml subfolder.

Dev

You can execute locally like this :

cd .k8s
yarn
export SOCIALGOUV_CONFIG_PATH=/path/to/config.json;
export $(grep -v '^#' .env.sample | xargs);
yarn -s generate
1.9.0-alpha.20

4 years ago

1.9.0-alpha.19

4 years ago

1.9.0-alpha.18

4 years ago

1.9.0-alpha.17

4 years ago

1.9.0-alpha.16

4 years ago

1.9.0-alpha.15

4 years ago

1.9.0-alpha.14

4 years ago

1.9.0-alpha.13

4 years ago

1.9.0-alpha.12

4 years ago

1.9.0-alpha.11

4 years ago

1.9.0-alpha.10

4 years ago

1.9.0-alpha.9

4 years ago

1.9.0-alpha.6

4 years ago

1.9.0-alpha.8

4 years ago

1.9.0-alpha.7

4 years ago

1.9.0-alpha.5

4 years ago

1.9.0-alpha.4

4 years ago

1.9.0-alpha.3

4 years ago

1.9.0-alpha.2

4 years ago