when I try to deploy a new build of my k8s deployment using this command:
helmfile -f <path to helmfile> -e <environment> apply
I get this error:
FAILED RELEASES:
NAME
xxx-api
in ../../helmfiles/xxx.yaml: failed processing release xxx: command "/bin/helm" exited with non-zero status:
PATH:
/bin/helm
ARGS:
0: helm (4 bytes)
1: upgrade (7 bytes)
2: --install (9 bytes)
3: --reset-values (14 bytes)
4: xxx (12 bytes)
5: xxx/xxx (25 bytes)
6: --wait (6 bytes)
7: --atomic (8 bytes)
8: --create-namespace (18 bytes)
9: --namespace (11 bytes)
10: default (7 bytes)
11: --values (8 bytes)
12: /tmp/helmfile829925546/default-xxx-values-8657f7b77f (61 bytes)
13: --values (8 bytes)
14: /tmp/helmfile2093074169/default-xxx-values-7948f8657d (62 bytes)
15: --history-max (13 bytes)
16: 10 (2 bytes)
ERROR:
exit status 1
EXIT STATUS
1
STDERR:
Error: UPGRADE FAILED: release xxx failed, and has been rolled back due to atomic being set: context deadline exceeded
COMBINED OUTPUT:
Error: UPGRADE FAILED: release xxx failed, and has been rolled back due to atomic being set: context deadline exceeded
Here is the code for that service in the vaules.yaml:
xxx:
_apptype: "xxx"
_version: v1.1.0
_enabled: true
_namespace: default
replicaCount: 2
image:
repository: <repo url>
container: xxx
tag: 1.3.1-005
pullPolicy: IfNotPresent
imagePullSecrets:
- name: artifactory-registry
probeConfigs:
livenessProbe:
enabled: true
livenessProbeContent:
httpGet:
path: /v1/check
readinessProbe:
enabled: true
readinessProbeContent:
httpGet:
path: /v1/check
services:
service:
annotations:
alb.ingress.kubernetes.io/healthcheck-path: "/v1/check"
resources:
requests:
cpu: 0.25
memory: 256Mi
limits:
memory: 512Mi
env:
com.ids.config.key: BDD6C76E42C76947094218B001B70EB8
ds.environment: QA
ds.jurisdiction: US
ds.url: '"url.com"'
ds.product: xxx
environment: qa
JAVA_OPTS: '"-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2 -Xmx256M"'
configMap:
enabled: true
applicationConfigurations:
application.properties:
server.port: 8080
redis.config.location: classpath:redis-dev.yaml
pgw.task.queue: xxx-trans-queue
logging.level.com.paramount: debug
registration.authorize.url: ds://{authurl}/authorize
registration.authorize.timeout_ms: 5000
applicationSecrets:
enabled: true
logOverride:
enabled: true
springLog: |-
<configuration scan="true" scanPeriod="30 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS z, UTC} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
<logger name="url" level="TRACE"/>
</configuration>
hpa:
enabled: false
maxReplicas: 10
cpu:
memory:
requests:
and this is the output of the helmfile diff command:
default, xxx-configmap, ConfigMap (v1) has changed:
# Source: xxx/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: xxx
namespace: "default"
labels:
helm.sh/chart: xxx-0.1.2
app.kubernetes.io/name: xxx-api
app.kubernetes.io/version: "0.1.2"
app.kubernetes.io/managed-by: Helm
data:
application.properties: |
info.app.name = xxx
- management.endpoint.health.show-details = always
management.endpoints.web.base-path = /xxx
- management.endpoints.web.exposure.include = info,health
- management.endpoints.web.path-mapping.health = /status
+ management.endpoints.web.exposure.include = info,health,status,ready
management.endpoints.web.path-mapping.info = /check
management.health.diskspace.enabled = false
management.health.mail.enabled = false
pgw.cloud-watch.name-space = xx
xxx.task.group = xxx-trans-group
xxx.task.queue = xxx-trans-queue
xxx.work-load.check.interval = 30
xxx.worker.life-check.interval = 2
xxx.worker.ttl = 5
redis.config.location = classpath:redis-dev.yaml
xxx.task.group = xxx-group-process,xxx-group-pull,xxx-group-push
xxx.task.queue = xxx-QueueProcessRequest,xxx-QueueRuleData,rmg-QueuePushRequest
server.port = 8080
server.servlet.context-path = /
+ spring.application.name = Transaction Engine
spring.datasource.hikari.maximum-pool-size = 1
spring.datasource.url = ds://{dburl?label=monitor}
+ spring.sleuth.sampler.probability = 1
logback-spring.xml: |-
<configuration scan="true" scanPeriod="30 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS z, UTC} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
<logger name="xxx" level="TRACE"/>
</configuration>
Upgrading release=xxx, chart=xxx/xxx
default, xxx, Deployment (apps) has changed:
# Source: xxx/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: xxx
namespace: "default"
labels:
helm.sh/chart: xxx-0.1.2
app.kubernetes.io/name: xxx
app.kubernetes.io/version: "0.1.2"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
revisionHistoryLimit: 10
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app.kubernetes.io/name: xxx
template:
metadata:
labels:
app.kubernetes.io/name: xxx
spec:
imagePullSecrets:
- name: artifactory-registry
securityContext:
fsGroup: 2000
runAsGroup: 3000
runAsNonRoot: true
runAsUser: 1000
terminationGracePeriodSeconds: 10
containers:
- name: xxx
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
- image: "xxx-docker-snapshot-xxx.jfrog.io/xxx:1.3.1-005"
+ image: "xxx-docker-snapshot-xxx.jfrog.io/xxx:1.4.1"
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: xxx
ports:
- name: liveness-port
containerPort: 8080
livenessProbe:
httpGet:
path: /xxx/check
port: liveness-port
initialDelaySeconds: 120
periodSeconds: 60
readinessProbe:
failureThreshold: 3
httpGet:
path: /xxx/status
port: liveness-port
periodSeconds: 5
env:
- name: TMPDIR
value: "/tmp"
- name: logging.config
value: "/opt/usr/conf/xx/logback-xxx.xml"
- name: spring.config.location
value: "/opt/usr/conf/xxx/application.properties"
- name: JAVA_OPTS
value: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2 -Xmx128M"
- name: com.ids.config.key
value: BDD6C76E42C76947094218B001B70EB8
- name: ds.environment
value: QA
- name: ds.jurisdiction
value: US
- name: ds.product
value: xxx
- name: ds.url
value: "http://example.com"
- name: environment
value: qa
- name: xxx.ClusterName
value: <clustername>
- name: xxx.metric.dimension.Namespace
value: default
- name: xxx.metric.dimension.PodName
value: xxx
memory: 512Mi
requests:
cpu: 0.25
memory: 256Mi
volumeMounts:
- name: tmp
mountPath: /tmp
- name: application-config
mountPath: /opt/usr/conf/xxx
readOnly: true
volumes:
- name: tmp
emptyDir: {}
- name: application-config
configMap:
name: xxx-configmap
items:
- key: application.properties
path: application.properties
- key: logback-spring.xml
path: logback-spring.xml
please how can I trouble shoot this? I have several other services in the values.yaml and when I tried to update them, it was successful. but this particular service is returning errors.