Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

pagopa-archive/eks-microservice-chart-blueprint

Repository files navigation

K8s Microservice Template · GitHub Release GitHub Issues Open Source

The eks-microservice-chart-blueprint chart is the best way to release your microservice into PagoPA K8s environment. It contains all the required components to get started, and it has several architectural aspects already configured.

Some of the key benefits of this chart are:

  • Enable security group per pods feature;
  • Connect to your existing load balancer;
  • Improved scalability and reliability thanks to Keda;
  • Simpified way to setup secrets and configMaps.

Architecture

Changelog

see CHANGELOG to see the new features and the breking changes

Static analysis

Install:

Installation

This is the official and recommended method to adopt this chart.

Quick start

Create a helm folder inside your microservice project in which install the Helm chart:

mkdir helm && cd helm

Add Helm repo:

helm repo add pagopa-eks-microservice https://pagopa.github.io/eks-microservice-chart-blueprint

If you had already added this repo earlier, run helm repo update to retrieve the latest versions of the packages.

Add a very basic configuration in Chart.yaml:

cat <<EOF > Chart.yaml
apiVersion: v2
name: my-microservice
description: My microservice description
type: application
version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
  version: 1.0.0
  repository: "https://pagopa.github.io/eks-microservice-chart-blueprint"
EOF

Install the dependency:

helm dep build

Create a values-<env>.yaml for each environment:

touch values-dev.yaml values-uat.yaml values-prod.yaml

Override all values that you need, and form the root of your project install the chart:

helm upgrade -i -n <namespace name> -f <file with values> <name of the helm chart> <chart folder>

helm upgrade -i -n mynamespace -f helm/values-dev.yaml mymicroservice helm

Upgrading

Change version of the dependency and run the update:

cd helm && helm dep update .

Template mandatory resources and configuration

To work as expect this template requires:

  • Application has liveness and readiness endpoints;
  • Reloader or other tools that allow to restart pods when ConfigMap or Secret change;
  • Keda.

Development

Clone the repository and run the setup script:

git clone [email protected]:pagopa/eks-microservice-chart-blueprint.git
cd eks-microservice-chart-blueprint.git
sh /bin/setup

Warning

Setup script installs a version manager tool that may introduce compatibility issues in your environment. To prevent any potential problems, you can install these dependencies manually or with your favourite tool:

  • Helm 3.8.0

Publish

The branch gh-pages contains the GitHub page content and all released charts. To update the page content, use bin/publish.

Known issues and limitations

  • None.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •