Skip to content

Instantly share code, notes, and snippets.

@dghubble
Created October 19, 2022 21:18
Show Gist options
  • Save dghubble/7237dc47fc4db0de706b03b7ece6280c to your computer and use it in GitHub Desktop.
Save dghubble/7237dc47fc4db0de706b03b7ece6280c to your computer and use it in GitHub Desktop.
resource "kubernetes_deployment" "github-runner-arm64" {
wait_for_rollout = false
metadata {
name = "github-runner-arm64"
}
spec {
replicas = 2
strategy {
type = "RollingUpdate"
rolling_update {
max_unavailable = 1
}
}
selector {
match_labels = {
name = "github-runner-arm64"
}
}
template {
metadata {
labels = {
name = "github-runner-arm64"
}
}
spec {
node_selector = {
"kubernetes.io/arch" : "arm64"
}
toleration {
key = "arch"
value = "arm64"
operator = "Equal"
effect = "NoSchedule"
}
container {
name = "github-runner-arm64"
image = "quay.io/poseidon/github-runner:6cf5cf2"
env {
name = "GH_APP_ID"
value = "REDACTED"
}
env {
name = "GH_APP_KEY_PATH"
value = "/etc/github-runner/github-app-private-key.pem"
}
env {
name = "GH_INSTALL_ID"
value = "REDACTED"
}
env {
name = "GH_ORG"
value = "my-org"
}
env {
name = "LABELS"
value = "arm64"
}
resources {
requests = {
cpu = "30m"
memory = "30Mi"
}
limits = {
cpu = "1000m"
memory = "1000Mi"
}
}
volume_mount {
name = "secrets"
mount_path = "/etc/github-runner"
read_only = true
}
}
volume {
name = "secrets"
secret {
secret_name = "github-runner"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment