Hello, just migrated from docker to kube and the drone agent doesn’t seem to be working. Using terraform to deploy the helm charts.
The logs indicate it connects
Runner:
time="2021-10-04T22:18:49Z" level=info msg="starting the server" addr=":3000"
time="2021-10-04T22:18:49Z" level=info msg="successfully pinged the remote server"
time="2021-10-04T22:18:49Z" level=info msg="polling the remote server" capacity=100 endpoint="http://drone-server-svc.tools.svc.cluster.local" kind=pipeline type=kubernetes
time="2021-10-04T22:18:49Z" level=debug msg="poller: request stage from remote server" thread=63
...
time="2021-10-04T22:25:19Z" level=trace msg="http: no content returned: re-connect and re-try"
...
locals {
drone_svc_name = "drone-server-svc" // DO NOT NAME drone-server - conflicts with kube
drone_server_uri = "drone.${var.domain}"
}
// https://github.com/drone/charts/tree/master/charts/drone-runner-kube
resource "helm_release" "drone-server" {
name = "drone-server"
repository = "https://charts.drone.io"
chart = "drone"
namespace = var.namespace
// TODO: version lock
dynamic "set" {
for_each = {
"fullnameOverride" = local.drone_svc_name
"image.tag" = "2.4.0"
"env.DRONE_SERVER_HOST" = local.drone_server_uri
"env.DRONE_SERVER_PROTO" = "https"
"env.DRONE_RPC_SECRET" = var.drone_rpc_secret
"env.DRONE_DATABASE_SECRET" = var.drone_database_secret
"env.DRONE_GITHUB_CLIENT_ID" = var.drone_github_client_id
"env.DRONE_GITHUB_CLIENT_SECRET" = var.drone_github_client_secret
"env.DRONE_DATABASE_DRIVER" = "postgres"
"env.DRONE_DATABASE_DATASOURCE" = var.rds_conn_string_drone
"env.DRONE_S3_BUCKET" = aws_s3_bucket.drone.id
"env.DRONE_USER_FILTER" = "myorg"
"env.DRONE_GIT_ALWAYS_AUTH" = true
"env.DRONE_TRACE" = true
"env.DRONE_DEBUG" = true
"AWS_ACCESS_KEY_ID" = aws_iam_access_key.drone_server.id
"AWS_SECRET_ACCESS_KEY" = aws_iam_access_key.drone_server.secret
"AWS_DEFAULT_REGION" = data.aws_region.current.name
}
content {
name = set.key
value = set.value
}
}
}
resource "helm_release" "drone-runner" {
name = "drone-runner"
repository = "https://charts.drone.io"
chart = "drone-runner-kube"
namespace = var.namespace
dynamic "set" {
for_each = {
"image.tag" = "1.0.0-rc.1"
"env.DRONE_RPC_HOST" = "${local.drone_svc_name}.${var.namespace}.svc.cluster.local"
"env.DRONE_RPC_PROTO" = "http"
"env.DRONE_RPC_SECRET" = var.drone_rpc_secret
"env.DRONE_NAMESPACE_DEFAULT" = "tools"
"env.DRONE_TRACE" = true
"env.DRONE_DEBUG" = true
}
content {
name = set.key
value = set.value
}
}
values = [
yamlencode({
"rbac.buildNamespaces" = ["tools"]
})
]
}