JetBrains / teamcity-docker-agent

TeamCity agent docker image sources
https://hub.docker.com/r/jetbrains/teamcity-agent/
Apache License 2.0
77 stars 64 forks source link

Kubernetes no longer supports Dockershim and it breaks TeamCity agent on EKS 1.24 #76

Open AGirin opened 1 year ago

AGirin commented 1 year ago

TeamCity agent does not work anymore on EKS 1.24... Most likely because of this:

https://docs.aws.amazon.com/eks/latest/userguide/dockershim-deprecation.html

This is the config tat works on 1.23:

apiVersion: v1
kind: Pod
metadata:
  name: teamcity-build-agent
spec:
  containers:
  - name: teamcity-build-agent
    image: jetbrains/teamcity-agent:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: teamcity-agent-conf
      mountPath: /data/teamcity_agent/conf
    - name: teamcity-agent-logs
      mountPath: /opt/buildagent/logs
    - name: teamcity-agent-plugins
      mountPath: /opt/buildagent/plugins
    - name: teamcity-agent-tools
      mountPath: /opt/buildagent/tools
    - name: teamcity-agent-temp
      mountPath: /opt/buildagent/temp
    - name: var-run-docker-sock
      mountPath: /var/run/docker.sock
    env:
    - name: DOCKER_IN_DOCKER
      value: start
    securityContext:
      privileged: true
      runAsUser: 0     
  volumes:
    - name: var-run-docker-sock
      hostPath:
        path: /var/run/docker.sock
        type: Socket
    - name: teamcity-agent-conf
    - name: teamcity-agent-logs
    - name: teamcity-agent-plugins
    - name: teamcity-agent-tools
    - name: teamcity-agent-temp

Same config produces this error on 1.24: MountVolume.SetUp failed for volume "var-run-docker-sock" : hostPath type check failed: /var/run/docker.sock is not a socket file

Any ideas are appreciated.

Thanks.

AGirin commented 1 year ago

Workaround is to use jetbrains/teamcity-agent:2022.10.1-linux-sudo... That seems to work on EKS 1.24...