Skip to content

Commit

Permalink
init printit
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolagospagopa committed Mar 19, 2024
1 parent c4b25b2 commit 0a49e8e
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 0 deletions.
23 changes: 23 additions & 0 deletions helm/pagopa/printit/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
10 changes: 10 additions & 0 deletions helm/pagopa/printit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: v5-java-helm-complete-test-bar
description: An example application with Java spring boot
type: application
version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 5.5.0
repository: file://../../../charts/microservice-chart
3 changes: 3 additions & 0 deletions helm/pagopa/printit/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

../../../scripts/run.sh values-devopslab-dev.yaml blueprint v5-java-helm-complete-test-bar
87 changes: 87 additions & 0 deletions helm/pagopa/printit/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
microservice-chart:
namespace: "blueprint"

deployment:
create: true
replicas: 3

envConfig:
APP: foo
MY_APP_COLOR: "green"

# envSecret:
# MY_KV_SECRET: dvopla-d-neu-dev01-aks-apiserver-url

image:
repository: ghcr.io/pagopa/devops-java-springboot-color
tag: 0.10.0
pullPolicy: Always

tmpVolumeMount:
create: true
mounts:
- name: tmp
mountPath: /tmp
- name: logs
mountPath: /app/logs

livenessProbe:
httpGet:
path: /status/live
port: 8080
initialDelaySeconds: 30
failureThreshold: 6
periodSeconds: 10

readinessProbe:
httpGet:
path: /status/ready
port: 8080
initialDelaySeconds: 30
failureThreshold: 6
periodSeconds: 10

service:
create: true
type: ClusterIP
ports:
- 8080

ingress:
create: true
host: printit.itn.internal.dev.platform.pagopa.it
path: /devops-app-status/status(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

resources:
requests:
memory: "256Mi"
cpu: "40m"
limits:
memory: "256Mi"
cpu: "150m"

keyvault:
name: "pagopa-d-itn-printit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"


# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.azure.com/mode
# operator: In
# values:
# - user
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchLabels:
# aadpodidbinding: blueprint-pod-identity
# namespaces: ["blueprint"]
# topologyKey: topology.kubernetes.io/zone
20 changes: 20 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

VALUES_FILE_NAME=$1
NAMESPACE=$2
APP_NAME=$3

echo "✂️ Delete charts folder"
rm -rf charts || true

echo "🚀 start helm installation"

helm dep build && helm template . -f "$VALUES_FILE_NAME" --debug

echo "✅ Tempalte helm chart"

helm dep build && helm upgrade --namespace "$NAMESPACE" \
--install --values "$VALUES_FILE_NAME" \
--wait --timeout 3m0s "$APP_NAME" .

echo "✅ Completed helm installation"

0 comments on commit 0a49e8e

Please sign in to comment.