Skip to content

Commit

Permalink
feat: definiting cronjob-related deployment in Helm
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-deri committed Jan 13, 2025
1 parent bee617d commit c96b8a7
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 26 deletions.
4 changes: 4 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ dependencies:
- name: microservice-chart
version: 3.0.0
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
- name: microservice-chart
version: 3.0.0
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
alias: cron
64 changes: 52 additions & 12 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
microservice-chart:
microservice-chart: &microservice-chart
namespace: "nodo"
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -27,29 +27,29 @@ microservice-chart:
type: ClusterIP
ports:
- 8080
ingress:
ingress: &ingress
create: true
host: "weudev.nodo.internal.dev.platform.pagopa.it"
path: /pagopa-wisp-converter-technical-support(/|$)(.*)
servicePort: 8080
serviceAccount:
create: false
annotations: {}
annotations: { }
name: ""
podAnnotations: {}
podAnnotations: { }
podSecurityContext:
seccompProfile:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
resources:
resources: &resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "768Mi"
cpu: "0.50"
autoscaling:
autoscaling: &autoscaling
enable: true
minReplica: 1
maxReplica: 1
Expand All @@ -61,7 +61,7 @@ microservice-chart:
# Required
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
envConfig: &envConfig
WEBSITE_SITE_NAME: 'pagopawispconverterts' # required to show cloud role name in application insights
ENV: 'aks-dev'
APP_LOGGING_LEVEL: 'DEBUG'
Expand All @@ -73,7 +73,7 @@ microservice-chart:
DATAEXPLORER_URL: "https://pagopaddataexplorer.westeurope.kusto.windows.net"
secretProvider:
create: true
envSecrets:
envSecrets: &envSecret
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
COSMOS_KEY: 'cosmosdb-wisp-converter-account-key'
Expand All @@ -82,8 +82,8 @@ microservice-chart:
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
tmpVolumeMount:
create: true
nodeSelector: {}
tolerations: []
nodeSelector: { }
tolerations: [ ]
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -110,5 +110,45 @@ microservice-chart:
repository: ghcr.io/pagopa/pagopa-wisp-converter-technical-support
tag: "0.0.0"
pullPolicy: Always
envConfig: {}
envSecret: {}
envConfig: { }
envSecret: { }

# - Standard service application
app:
!!merge <<: *microservice-chart
ingress:
!!merge <<: *ingress
resources:
!!merge <<: *resources
envConfig:
!!merge <<: *envConfig
envSecret:
!!merge <<: *envSecret

# - Only-cronjob application
cronjob:
!!merge <<: *microservice-chart
ingress:
!!merge <<: *ingress
path: /pagopa-wisp-converter-technical-support-jobs/(.*)
resources:
!!merge <<: *resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "768Mi"
cpu: "0.50"
autoscaling:
!!merge <<: *autoscaling
enable: false
minReplica: 1
maxReplica: 1
envConfig:
!!merge <<: *envConfig
CRONJOB_REPORTGENERATION_ENABLED: false
CRONJOB_REPORTGENERATION_DAILY_SCHEDULE: '00 01 * * *'
CRONJOB_REPORTGENERATION_WEEKLY_SCHEDULE: '00 06 * * 1'
CRONJOB_REPORTGENERATION_MONTHLY_SCHEDULE: '30 06 1 * *'
envSecret:
!!merge <<: *envSecret
41 changes: 35 additions & 6 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
microservice-chart:
microservice-chart: &microservice-chart
namespace: "nodo"
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -27,7 +27,7 @@ microservice-chart:
type: ClusterIP
ports:
- 8080
ingress:
ingress: &ingress
create: true
host: "weuprod.nodo.internal.platform.pagopa.it"
path: /pagopa-wisp-converter-technical-support(/|$)(.*)
Expand All @@ -42,14 +42,14 @@ microservice-chart:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
resources:
resources: &resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "768Mi"
cpu: "0.50"
autoscaling:
autoscaling: &autoscaling
enable: true
minReplica: 1
maxReplica: 2
Expand All @@ -61,7 +61,7 @@ microservice-chart:
# Required
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
envConfig: &envConfig
WEBSITE_SITE_NAME: 'pagopawispconverterts' # required to show cloud role name in application insights
ENV: 'aks-prod'
APP_LOGGING_LEVEL: 'INFO'
Expand All @@ -75,7 +75,7 @@ microservice-chart:
CRONJOB_REPORTGENERATION_DAILY_SCHEDULE: '00 01 * * *'
secretProvider:
create: true
envSecrets:
envSecrets: &envSecret
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
COSMOS_KEY: 'cosmosdb-wisp-converter-account-key'
Expand Down Expand Up @@ -114,3 +114,32 @@ microservice-chart:
pullPolicy: Always
envConfig: { }
envSecret: { }


# - Only-cronjob application
cronjob:
!!merge <<: *microservice-chart
ingress:
!!merge <<: *ingress
path: /pagopa-wisp-converter-technical-support-jobs/(.*)
resources:
!!merge <<: *resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "1024Mi"
cpu: "0.50"
autoscaling:
!!merge <<: *autoscaling
enable: false
minReplica: 1
maxReplica: 1
envConfig:
!!merge <<: *envConfig
CRONJOB_REPORTGENERATION_ENABLED: true
CRONJOB_REPORTGENERATION_DAILY_SCHEDULE: '00 01 * * *'
CRONJOB_REPORTGENERATION_WEEKLY_SCHEDULE: '00 06 * * 1'
CRONJOB_REPORTGENERATION_MONTHLY_SCHEDULE: '30 06 1 * *'
envSecret:
!!merge <<: *envSecret
55 changes: 47 additions & 8 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
microservice-chart:
microservice-chart: &microservice-chart
namespace: "nodo"
nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -27,7 +27,7 @@ microservice-chart:
type: ClusterIP
ports:
- 8080
ingress:
ingress: &ingress
create: true
host: "weuuat.nodo.internal.uat.platform.pagopa.it"
path: /pagopa-wisp-converter-technical-support(/|$)(.*)
Expand All @@ -42,14 +42,14 @@ microservice-chart:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
resources:
resources: &resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "768Mi"
cpu: "0.50"
autoscaling:
autoscaling: &autoscaling
enable: true
minReplica: 1
maxReplica: 2
Expand All @@ -61,7 +61,7 @@ microservice-chart:
# Required
type: Utilization # Allowed types are 'Utilization' or 'AverageValue'
value: "75"
envConfig:
envConfig: &envConfig
WEBSITE_SITE_NAME: 'pagopawispconverterts' # required to show cloud role name in application insights
ENV: 'aks-uat'
APP_LOGGING_LEVEL: 'INFO'
Expand All @@ -71,11 +71,9 @@ microservice-chart:
COSMOS_URI: "https://pagopa-u-weu-nodo-wispconv-cosmos-account.documents.azure.com:443/"
COSMOS_READ_REGION: "West Europe"
DATAEXPLORER_URL: "https://pagopaudataexplorer.westeurope.kusto.windows.net"
CRONJOB_REPORTGENERATION_ENABLED: true
CRONJOB_REPORTGENERATION_DAILY_SCHEDULE: '00 01 * * *'
secretProvider:
create: true
envSecrets:
envSecrets: &envSecret
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
COSMOS_KEY: 'cosmosdb-wisp-converter-account-key'
Expand Down Expand Up @@ -114,3 +112,44 @@ microservice-chart:
pullPolicy: Always
envConfig: { }
envSecret: { }


# - Standard service application
app:
!!merge <<: *microservice-chart
ingress:
!!merge <<: *ingress
resources:
!!merge <<: *resources
envConfig:
!!merge <<: *envConfig
envSecret:
!!merge <<: *envSecret

# - Only-cronjob application
cronjob:
!!merge <<: *microservice-chart
ingress:
!!merge <<: *ingress
path: /pagopa-wisp-converter-technical-support-jobs/(.*)
resources:
!!merge <<: *resources
requests:
memory: "512Mi"
cpu: "0.25"
limits:
memory: "1024Mi"
cpu: "0.50"
autoscaling:
!!merge <<: *autoscaling
enable: false
minReplica: 1
maxReplica: 1
envConfig:
!!merge <<: *envConfig
CRONJOB_REPORTGENERATION_ENABLED: true
CRONJOB_REPORTGENERATION_DAILY_SCHEDULE: '00 01 * * *'
CRONJOB_REPORTGENERATION_WEEKLY_SCHEDULE: '00 06 * * 1'
CRONJOB_REPORTGENERATION_MONTHLY_SCHEDULE: '30 06 1 * *'
envSecret:
!!merge <<: *envSecret

0 comments on commit c96b8a7

Please sign in to comment.