Skip to content

Commit

Permalink
chore: Upd chart podAffinity (#28)
Browse files Browse the repository at this point in the history
* upd chart and pod-affinity

* fix
  • Loading branch information
pasqualespica authored Dec 2, 2023
1 parent 4d1c1c3 commit e3b87e6
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
18 changes: 10 additions & 8 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ microservice-chart:
periodSeconds: 10
deployment:
create: true
service:
serviceMonitor:
create: true
ports:
- 8080
service:
type: ClusterIP
ports:
- 8080 #http
- 8080
ingress:
create: true
host: "weudev.bizevents.internal.dev.platform.pagopa.it"
Expand All @@ -44,15 +47,15 @@ microservice-chart:
allowPrivilegeEscalation: false
resources:
requests:
memory: "1Gi"
cpu: "0.4"
memory: "384Mi"
cpu: "300m"
limits:
memory: "1Gi"
cpu: "0.5"
memory: "512Mi"
cpu: "400m"
autoscaling:
enable: true
minReplica: 1
maxReplica: 2
maxReplica: 1
pollingInterval: 10 # seconds
cooldownPeriod: 50 # seconds
triggers:
Expand All @@ -78,7 +81,6 @@ microservice-chart:
APP_NAME: "metadata.labels['app.kubernetes.io/instance']"
APP_VERSION: "metadata.labels['app.kubernetes.io/version']"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string'
COSMOS_DB_PRIMARY_KEY: 'cosmos-d-biz-key'
OTEL_EXPORTER_OTLP_HEADERS: 'elastic-apm-secret-token'
Expand Down
22 changes: 19 additions & 3 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ microservice-chart:
memory: "512Mi"
cpu: "300m"
limits:
memory: "512Mi"
cpu: "300m"
memory: "640Mi"
cpu: "500m"
autoscaling:
enable: true
minReplica: 2
Expand All @@ -65,6 +65,13 @@ microservice-chart:
COSMOS_DB_NAME: 'db'
COSMOS_DB_CONTAINER_NAME: 'biz-events'
COSMOS_QUERY_METRICS: 'false'
OTEL_SERVICE_NAME: "pagopabizeventsservice"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=azure-dev"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-p-connection-string'
Expand All @@ -83,7 +90,16 @@ microservice-chart:
- key: node_type
operator: In
values:
- "user"
- user
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/instance: pagopabizeventsservice
namespaces: [ "bizevents" ]
topologyKey: topology.kubernetes.io/zone
canaryDelivery:
deployment:
image:
Expand Down
19 changes: 13 additions & 6 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ microservice-chart:
periodSeconds: 10
deployment:
create: true
service:
serviceMonitor:
create: true
ports:
- 8080
service:
type: ClusterIP
port: 8080
ports:
- 8080
ingress:
create: true
host: "weuuat.bizevents.internal.uat.platform.pagopa.it"
path: /pagopa-biz-events-service/(.*)
servicePort: 8080
serviceAccount:
create: false
annotations: {}
Expand All @@ -42,15 +47,15 @@ microservice-chart:
allowPrivilegeEscalation: false
resources:
requests:
memory: "512Mi"
memory: "384Mi"
cpu: "300m"
limits:
memory: "512Mi"
cpu: "300m"
cpu: "400m"
autoscaling:
enable: true
minReplica: 1
maxReplica: 5
maxReplica: 1
pollingInterval: 10 # seconds
cooldownPeriod: 50 # seconds
triggers:
Expand All @@ -72,8 +77,10 @@ microservice-chart:
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
envFieldRef:
APP_NAME: "metadata.labels['app.kubernetes.io/instance']"
APP_VERSION: "metadata.labels['app.kubernetes.io/version']"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-u-connection-string'
COSMOS_DB_PRIMARY_KEY: 'cosmos-u-biz-key'
OTEL_EXPORTER_OTLP_HEADERS: 'elastic-apm-secret-token'
Expand Down

0 comments on commit e3b87e6

Please sign in to comment.