Skip to content

Commit

Permalink
fix: Label now support image version with sha256 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolagospagopa authored May 24, 2024
1 parent 33c0fc6 commit 999430d
Show file tree
Hide file tree
Showing 30 changed files with 95 additions and 93 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## v5.9.1

- fix label: now support image version with `@sha256`

## v5.9.0

- canary completed and running

## v5.8.0

- for probe added this new properties: timeoutSeconds, successThreshold, terminateGracePeriodSeconds
Expand Down
4 changes: 2 additions & 2 deletions charts/microservice-chart/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# microservice-chart

![Version: 5.8.0](https://img.shields.io/badge/Version-5.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
![Version: 5.9.0](https://img.shields.io/badge/Version-5.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)

A Helm chart for PagoPA microservice

Expand Down Expand Up @@ -149,4 +149,4 @@ A Helm chart for PagoPA microservice
| tolerations | list | `[]` | Pod taints toleration |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.0](https://github.com/norwoodj/helm-docs/releases/v1.13.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 2 additions & 2 deletions charts/microservice-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If release name contains chart name it will be used as a full name.
Create chart name and version as used by the chart label.
*/}}
{{- define "microservice-chart.chart" -}}
{{- printf "%s-%s" .Chart.Name (.Values.image.tag | default .Chart.Version) | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" .Chart.Name (.Values.image.tag | default .Chart.Version) | replace "@sha256:" "_" | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -46,7 +46,7 @@ Extra labels
*/}}
{{- define "microservice-chart.extraLabels" -}}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ (.Values.image.tag | default .Chart.AppVersion) | quote }}
app.kubernetes.io/version: {{ (.Values.image.tag | default .Chart.AppVersion) | replace "@sha256:" "_" | trunc 63 | quote }}
{{- end }}
{{- end }}

Expand Down
6 changes: 0 additions & 6 deletions tests/v2-migration-java-helm-complete-test/helm/Chart.lock

This file was deleted.

2 changes: 1 addition & 1 deletion tests/v2-migration-java-helm-complete-test/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencies:
# repository: file://../../../charts/microservice-chart
- name: microservice-chart
version: 2.3.1
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
repository: "https://pagopa.github.io/aks-microservice-chart-testit"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

../../../scripts/run.sh v5-values-devopslab-dev.yaml blueprint v2-migration-java-helm-complete-test
../../../scripts/run.sh v5-values-devopslab-dev.yaml testit v2-migration-java-helm-complete-test
2 changes: 1 addition & 1 deletion tests/v2-migration-java-helm-complete-test/helm/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

../../../scripts/run.sh values-devopslab-dev.yaml blueprint v2-migration-java-helm-complete-test
../../../scripts/run.sh values-devopslab-dev.yaml testit v2-migration-java-helm-complete-test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: v2-migration-configmap-games
namespace: blueprint
namespace: testit
data:
# property-like keys; each key maps to a simple value
player-initial-lives: "3"
Expand All @@ -23,7 +23,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: v2-migration-configmap-mongodb
namespace: blueprint
namespace: testit
data:
# Configuration values can be set as key-value properties
database: mongodb
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
microservice-chart:
namespace: "blueprint"
namespace: "testit"

canaryDelivery:
create: false
Expand All @@ -24,7 +24,7 @@ microservice-chart:
MY_APP_COLOR: "blue"
progressive-delivery: "ok"
envSecret:
aks-api-url: dvopla-d-neu-dev01-aks-apiserver-url
aks-api-url: dvopla-d-itn-dev-aks-apiserver-url

deployment:
create: true
Expand All @@ -35,7 +35,7 @@ microservice-chart:
MY_APP_COLOR: "green"

envSecret:
aks-api-url: dvopla-d-neu-dev01-aks-apiserver-url
aks-api-url: dvopla-d-itn-dev-aks-apiserver-url

# fileConfigExternals:
# create: false
Expand Down Expand Up @@ -116,8 +116,8 @@ microservice-chart:

ingress:
create: true
host: dev01.blueprint.internal.devopslab.pagopa.it
path: /blueprint/v2-migration-java-helm-complete-test(/|$)(.*)
host: testit.itn.internal.devopslab.pagopa.it
path: /testit/v2-migration-java-helm-complete-test(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

Expand Down Expand Up @@ -153,7 +153,7 @@ microservice-chart:
value: "60"

keyvault:
name: "dvopla-d-blueprint-kv"
name: "dvopla-d-itn-testit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"

podDisruptionBudget:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
microservice-chart:
namespace: "blueprint"
namespace: "testit"

canaryDelivery:
create: false
Expand All @@ -24,7 +24,7 @@ microservice-chart:
MY_APP_COLOR: "blue"
progressive-delivery: "ok"
envSecret:
aks-api-url: dvopla-d-neu-dev01-aks-apiserver-url
aks-api-url: dvopla-d-itn-dev-aks-apiserver-url

deployment:
create: true
Expand All @@ -35,7 +35,7 @@ microservice-chart:
MY_APP_COLOR: "green"

envSecret:
aks-api-url: dvopla-d-neu-dev01-aks-apiserver-url
aks-api-url: dvopla-d-itn-dev-aks-apiserver-url

fileConfigExternals:
create: false
Expand Down Expand Up @@ -93,8 +93,8 @@ microservice-chart:

ingress:
create: true
host: dev01.blueprint.internal.devopslab.pagopa.it
path: /blueprint/v2-migration-java-helm-complete-test(/|$)(.*)
host: testit.itn.internal.devopslab.pagopa.it
path: /testit/v2-migration-java-helm-complete-test(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

Expand Down Expand Up @@ -130,7 +130,7 @@ microservice-chart:
value: "60"

keyvault:
name: "dvopla-d-blueprint-kv"
name: "dvopla-d-itn-testit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"

podDisruptionBudget:
Expand Down
6 changes: 3 additions & 3 deletions tests/v5-java-helm-basic-test/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 5.8.0
digest: sha256:46c7d2f553b97fc0468723c8b315743f5d6869ed941d534ba31e065642933a0c
generated: "2024-03-22T16:08:58.699277+01:00"
version: 5.9.0
digest: sha256:8890aa322d3ea0ce725bcbff2f9b243037b2fec73a6eea690ff7d5673ecf8275
generated: "2024-05-22T15:49:53.40939+02:00"
6 changes: 3 additions & 3 deletions tests/v5-java-helm-basic-test/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v2
name: v5-java-helm-basic-test
description: An example application with Java spring boot
type: application
version: 1.0.0
appVersion: 1.0.0
version: 1.2.3
appVersion: 1.2.2
dependencies:
- name: microservice-chart
version: 5.8.0
version: 5.9.0
repository: file://../../../charts/microservice-chart
2 changes: 1 addition & 1 deletion tests/v5-java-helm-basic-test/helm/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

../../../scripts/run.sh values-devopslab-dev.yaml blueprint v5-java-helm-basic-test
../../../scripts/run.sh values-devopslab-dev.yaml testit v5-java-helm-basic-test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: v5-basic-external-configmap
namespace: "blueprint"
namespace: "testit"
data:
# property-like keys; each key maps to a simple value
player_initial_lives: "3"
Expand All @@ -24,7 +24,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: v5-basic-external-configmap-values
namespace: "blueprint"
namespace: "testit"
data:
# Configuration values can be set as key-value properties
database: mongodb
Expand Down
16 changes: 8 additions & 8 deletions tests/v5-java-helm-basic-test/helm/values-devopslab-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
microservice-chart:
namespace: "blueprint"
namespace: "testit"

deployment:
create: true
Expand All @@ -10,11 +10,11 @@ microservice-chart:
MY_APP_COLOR: "green"

envSecret:
MY_KV_SECRET: dvopla-d-neu-dev01-aks-apiserver-url
MY_KV_SECRET: dvopla-d-itn-dev-aks-apiserver-url

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

tmpVolumeMount:
Expand Down Expand Up @@ -49,8 +49,8 @@ microservice-chart:

ingress:
create: true
host: dev01.blueprint.internal.devopslab.pagopa.it
path: /blueprint/v5-java-helm-basic-test(/|$)(.*)
host: testit.itn.internal.devopslab.pagopa.it
path: /testit/v5-java-helm-basic-test(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

Expand All @@ -63,7 +63,7 @@ microservice-chart:
cpu: "150m"

keyvault:
name: "dvopla-d-blueprint-kv"
name: "dvopla-d-itn-testit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"

podDisruptionBudget:
Expand All @@ -85,6 +85,6 @@ microservice-chart:
podAffinityTerm:
labelSelector:
matchLabels:
aadpodidbinding: blueprint-pod-identity
namespaces: ["blueprint"]
aadpodidbinding: testit-pod-identity
namespaces: ["testit"]
topologyKey: topology.kubernetes.io/zone
6 changes: 3 additions & 3 deletions tests/v5-java-helm-complete-test-bar/helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: microservice-chart
repository: file://../../../charts/microservice-chart
version: 5.7.0
digest: sha256:c25c1edc61a39eba3fa29a49cc571c207e6ad9b1b2db08fc046d26c9a6692a1b
generated: "2024-03-21T16:15:26.237927+01:00"
version: 5.9.0
digest: sha256:8890aa322d3ea0ce725bcbff2f9b243037b2fec73a6eea690ff7d5673ecf8275
generated: "2024-05-22T15:46:19.905526+02:00"
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-bar/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 5.7.0
version: 5.9.0
repository: file://../../../charts/microservice-chart
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-bar/helm/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

../../../scripts/run.sh values-devopslab-dev.yaml blueprint v5-java-helm-complete-test-bar
../../../scripts/run.sh values-devopslab-dev.yaml testit v5-java-helm-complete-test-bar
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: v5-complete-bar-configmap-files
namespace: "blueprint"
namespace: "testit"
data:
# file-like keys
game.properties: |
Expand All @@ -20,7 +20,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: v5-complete-bar-external-configmap-values-1
namespace: "blueprint"
namespace: "testit"
data:
# Configuration values can be set as key-value properties
database-db-name: mongodb
Expand All @@ -31,7 +31,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: v5-complete-bar-external-configmap-values-2
namespace: "blueprint"
namespace: "testit"
data:
# property-like keys; each key maps to a simple value
player-initial-lives: "3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
microservice-chart:
namespace: "blueprint"
namespace: "testit"

deployment:
create: true
Expand All @@ -10,7 +10,7 @@ microservice-chart:
MY_APP_COLOR: "green"

envSecret:
MY_KV_SECRET: dvopla-d-neu-dev01-aks-apiserver-url
MY_KV_SECRET: dvopla-d-itn-dev-aks-apiserver-url

externalConfigMapFiles:
create: true
Expand Down Expand Up @@ -55,7 +55,7 @@ microservice-chart:
mounts:
- name: csv
mountPath: /csv
pvcName: blueprint-file-share-zrs
pvcName: testit-file-share-zrs

# container:
# command: ["printenv"]
Expand Down Expand Up @@ -105,8 +105,8 @@ microservice-chart:

ingress:
create: true
host: dev01.blueprint.internal.devopslab.pagopa.it
path: /blueprint/v5-java-helm-complete-test-bar(/|$)(.*)
host: testit.itn.internal.devopslab.pagopa.it
path: /testit/v5-java-helm-complete-test-bar(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

Expand Down Expand Up @@ -149,7 +149,7 @@ microservice-chart:
minAvailable: 1

keyvault:
name: "dvopla-d-blueprint-kv"
name: "dvopla-d-itn-testit-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"

# nodeSelector: {}
Expand All @@ -176,6 +176,6 @@ microservice-chart:
podAffinityTerm:
labelSelector:
matchLabels:
aadpodidbinding: blueprint-pod-identity
namespaces: ["blueprint"]
aadpodidbinding: testit-pod-identity
namespaces: ["testit"]
topologyKey: topology.kubernetes.io/zone
6 changes: 0 additions & 6 deletions tests/v5-java-helm-complete-test-canary/helm/Chart.lock

This file was deleted.

2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-canary/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 1.0.0
appVersion: 1.0.0
dependencies:
- name: microservice-chart
version: 5.8.0
version: 5.9.0
repository: file://../../../charts/microservice-chart
2 changes: 1 addition & 1 deletion tests/v5-java-helm-complete-test-canary/helm/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

../../../scripts/run.sh values-devopslab-dev.yaml blueprint v5-java-helm-complete-test-canary
../../../scripts/run.sh values-devopslab-dev.yaml testit v5-java-helm-complete-test-canary
Loading

0 comments on commit 999430d

Please sign in to comment.