Kubernetes deployment configurations for all EVA (European Variation Archive) Java Spring webservices. This repository is used by GitLab CI/CD to automate deployments to the EBI Kubernetes cluster.
All manifests live under k8s-manifests/. Each service has its own directory following a consistent Kustomize base+overlays pattern:
eva-k8s/
└── k8s-manifests/
└── <service-name>/
├── kustomization.yaml # root entry point (references base)
├── base/ # shared configuration across all environments
│ ├── kustomization.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── configmap.yaml
│ ├── ingress.yaml
│ └── secret.yaml.example # template only — never commit real secrets
└── overlays/
├── dev/ # development environment (wwwint.ebi.ac.uk)
│ ├── kustomization.yaml
│ ├── namespace.yaml
│ ├── deployment-patch.yaml
│ ├── ingress-patch.yaml
│ ├── config.env.example
│ ├── secrets-db.env.example
│ └── secrets-admin.env.example
└── local/ # local development (minikube / kind)
├── kustomization.yaml
├── namespace.yaml
├── deployment-patch.yaml
├── service-patch.yaml
└── postgres.yaml # embedded PostgreSQL for local testing
Current services:
| Directory | Description |
|---|---|
k8s-manifests/eva-seqcol |
Sequence Collections REST API |
The GitLab CI pipeline deploys a service whenever changes are merged to main or a tag is created in a service's directory. The pipeline:
- Detects which service directories changed.
- Resolves the target environment (e.g.
devfor themainbranch). - Populates the secret env files from GitLab CI/CD variables (never stored in this repo).
- Runs
kubectl apply -k <service>/overlays/<env>against the EBI cluster.
The image tag to deploy is set via the images[].newTag field in the overlay's kustomization.yaml. CI updates this value before applying.
| Overlay | Cluster host | Namespace pattern | Replicas |
|---|---|---|---|
dev |
wwwint.ebi.ac.uk | <service>-dev |
1 |
local |
localhost (minikube) | <service>-local |
1 + local DB |
Production overlays will be added when services are ready for production.
kubectlconfigured with access to the target clusterkustomizev4+ (orkubectlv1.21+ which bundles it)
cd k8s-manifests/eva-seqcol/overlays/dev
# Copy and fill in the secret/config env files (one-time setup)
cp config.env.example config.env
cp secrets-db.env.example secrets-db.env
cp secrets-admin.env.example secrets-admin.env
# Edit the .env files with real values
# Preview rendered manifests
kubectl kustomize .
# Apply to cluster
kubectl apply -k .# Start a local cluster if needed
minikube start
kubectl apply -k k8s-manifests/eva-seqcol/overlays/local
# Access the service
kubectl port-forward -n eva-seqcol-local svc/eva-seqcol 8081:8081All manifests are validated on every push and pull request to main via a GitHub Actions.
The workflow:
- Kustomize build — ensures all overlays build without syntax errors
- Kubeval — validates manifests against the Kubernetes API schema
- Kubesec — security scanning (resource limits, securityContext, etc.)
- Kube-score — best practices linting (readiness probes, labels, etc.)
Each overlay under k8s-manifests/*/overlays/* is discovered and validated automatically.
To validate locally before pushing:
kustomize build k8s-manifests/eva-seqcol/overlays/dev- Actual
.envfiles (config.env,secrets-db.env,secrets-admin.env) are never committed — they should be listed in.gitignore. - In CI, secrets are injected from GitLab CI/CD masked variables before
kubectl applyruns. - For manual deployments, create the
.envfiles locally and keep them out of version control.
- Create
k8s-manifests/<service-name>/base/withdeployment.yaml,service.yaml,configmap.yaml,ingress.yaml,kustomization.yaml, andsecret.yaml.example. Use an existing service as a reference. - Create
k8s-manifests/<service-name>/overlays/dev/with the environment-specific patches and.env.exampletemplates. - Create
k8s-manifests/<service-name>/overlays/local/for local development. - Add the service to the table in this README.
- Configure the corresponding GitLab CI/CD variables for secrets.
Each overlay's kustomization.yaml contains an images block:
images:
- name: ebivariation/<service-name>
newTag: v1.2.3Update newTag to the Docker image tag you want to deploy. In CI this is set automatically from the triggering pipeline's image build step.