Skip to content

Commit

Permalink
Merge pull request #44 from pagopa/NOD-574_cronjobs
Browse files Browse the repository at this point in the history
Nod 574 cronjobs
  • Loading branch information
aomegax authored Feb 27, 2024
2 parents 9272008 + f9962d5 commit 39cd071
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 25 deletions.
60 changes: 48 additions & 12 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,25 @@ refresh-p:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=http://cache-postgresql.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.dev.platform.pagopa.it/api-config-cache/p/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand All @@ -181,16 +190,25 @@ refresh-o:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=http://cache-oracle.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.dev.platform.pagopa.it/api-config-cache/o/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand All @@ -213,16 +231,25 @@ refresh-odev:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=http://cache-oracledev.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.dev.platform.pagopa.it/api-config-cache/odev/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand All @@ -245,16 +272,25 @@ refresh-oprod:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=http://cache-oracleprod.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.dev.platform.pagopa.it/api-config-cache/oprod/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand Down
32 changes: 25 additions & 7 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ refresh-oprod:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
DB_CONFIG_PASSWORD: "oracle-db-cfg-password"
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
refresh-p:
namespace: "apiconfig"
schedule: "*/10 * * * *"
Expand All @@ -144,16 +144,25 @@ refresh-p:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=https://cache-psotgresql.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.platform.pagopa.it/api-config-cache/p/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand Down Expand Up @@ -185,16 +194,25 @@ refresh-o:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=https://cache-oracle.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.platform.pagopa.it/api-config-cache/o/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand Down
30 changes: 24 additions & 6 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,25 @@ refresh-p:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=https://cache-postgresql.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.uat.platform.pagopa.it/api-config-cache/p/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand All @@ -147,16 +156,25 @@ refresh-o:
tag: "latest"
pullPolicy: "Always"
command:
- "/bin/sh"
- "-c"
- "echo \"Starting...\"; export URL=https://cache-oracle.apiconfig.svc.cluster.local:8080/cache/refresh; echo \"Call '$URL'\"; curl -k -m 300 $URL; echo \"\"; echo \"Done\";"
- "curl"
- "-k"
- "-m"
- "\"300\""
- "--header"
- "\"Ocp-Apim-Subscription-Key: $(API_CONFIG_CACHE_SUBSCRIPTION_KEY)\""
- "https://api.uat.platform.pagopa.it/api-config-cache/o/v1/cache/refresh"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "150m"
secretProvider:
!!merge <<: *azureSecretProvider
envSecrets:
!!merge <<: *envSecret
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
tolerations:
- key: dedicated
operator: Equal
Expand Down

0 comments on commit 39cd071

Please sign in to comment.