Skip to content

ingv-oe-dev/k8s-seiscomp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kubernetes Manifests for Seiscomp

This repository contains the Kubernetes manifests for deploying the Seiscomp software suite. The manifests are managed using Kustomize to support multiple environments (e.g., staging, production) in a clean and declarative way.

Prerequisites πŸ”§

Before you begin, ensure you have the following tools installed:

  • kubectl: For interacting with the Kubernetes cluster.
  • kustomize: For building the manifests. (Often included with kubectl v1.14+).
  • Access to a configured Kubernetes cluster.

Directory Structure πŸ“

The project is divided into logical components, each with its own base configuration and corresponding overlays.

.
β”œβ”€β”€ manifests
β”‚   β”œβ”€β”€ database      # Manifests for the database (StatefulSet, Service, etc.)
β”‚   β”‚   β”œβ”€β”€ base
β”‚   β”‚   └── overlays
β”‚   β”‚       β”œβ”€β”€ production
β”‚   β”‚       └── staging
β”‚   └── seiscomp      # Manifests for the Seiscomp application (Deployment, Service, etc.)
β”‚       β”œβ”€β”€ base
β”‚       └── overlays
β”‚           β”œβ”€β”€ production
β”‚           └── staging
└── README.md
  • base: Contains the common manifests and default configurations that do not change between environments.
  • overlays: Contains environment-specific customizations (staging, production). These include patches for modifying replicas, resources, hostnames, and other variables.

Configuration Management

Sensitive and environment-specific configuration (e.g., database credentials, API keys) is managed via .env and .env.secret files, which must not be committed to Git.

Kustomize uses configMapGenerator and secretGenerator to create ConfigMap and Secret resources from these files.

Action Required: Before deploying, you must create the necessary files in the base directory of each component.

Example .gitignore: Make sure to add these files to your .gitignore to avoid exposing sensitive data.

# Ignore environment-specific configuration files
manifests/**/dot_env
manifests/**/dot_env.secret

How to Deploy πŸš€

To apply the manifests to a cluster, use kubectl apply -k and point to the desired overlay directory.

Deploying to Staging

# 1. Apply the database
kubectl apply -k manifests/database/overlays/staging

# 2. Apply the Seiscomp application
kubectl apply -k manifests/seiscomp/overlays/staging

Deploying to Production

# 1. Apply the database
kubectl apply -k manifests/database/overlays/production

# 2. Apply the Seiscomp application
kubectl apply -k manifests/seiscomp/overlays/production

Validating the Configuration (Dry-Run)

To view the final YAML output without applying it to the cluster, use kustomize build. This is very useful for debugging.

# Example: view the production configuration for Seiscomp
kustomize build manifests/seiscomp/overlays/production

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •