Skip to content

Commit

Permalink
fix: Revert "fix(3055): remove k8s-vm dependence" (#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
VonnyJap authored Oct 1, 2024
1 parent 94f4240 commit 4f4f224
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
46 changes: 46 additions & 0 deletions config/custom-environment-variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,52 @@ executor:
launchVersion: LAUNCH_VERSION
# Prefix to the container
prefix: EXECUTOR_PREFIX
k8s-vm:
enabled: EXECUTOR_K8SVM_ENABLED
options:
# Configuration of Docker
kubernetes:
# The host or IP of the kubernetes cluster
host: K8S_HOST
# The jwt token used for authenticating kubernetes requests
token: K8S_TOKEN
jobsNamespace: K8S_JOBS_NAMESPACE
baseImage: K8S_BASE_IMAGE
# Resources for build pod
resources:
# Number of cpu cores
cpu:
micro: K8S_CPU_MICRO
low: K8S_CPU_LOW
high: K8S_CPU_HIGH
# Memory in GB
memory:
micro: K8S_MEMORY_MICRO
low: K8S_MEMORY_LOW
high: K8S_MEMORY_HIGH
# Default build timeout for all builds in this cluster
buildTimeout: K8S_VM_BUILD_TIMEOUT
# Default max build timeout
maxBuildTimeout: K8S_VM_MAX_BUILD_TIMEOUT
# k8s node selectors for build pod scheduling.
# Value is Object of format { label: 'value' } See
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#step-one-attach-label-to-the-node
# Eg: { dedicated: 'screwdriver' } to schedule pods on nodes having
# label-value of dedicated=screwdriver
nodeSelectors:
__name: K8S_VM_NODE_SELECTORS
__format: json
# k8s preferred node selectors for build pod scheduling
# See https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
preferredNodeSelectors:
__name: K8S_VM_PREFERRED_NODE_SELECTORS
__format: json
# Launcher image to use
launchImage: LAUNCH_IMAGE
# Launcher container tag to use
launchVersion: LAUNCH_VERSION
# Prefix to the container
prefix: EXECUTOR_PREFIX
jenkins:
enabled: EXECUTOR_JENKINS_ENABLED
options:
Expand Down
32 changes: 32 additions & 0 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,38 @@ executor:
docker: {}
# Container tags to use
launchVersion: stable
k8s-vm:
enabled: true
options:
# Configuration of Docker
kubernetes:
# The host or IP of the kubernetes cluster
host: kubernetes.default
# The jwt token used for authenticating kubernetes requests
# Loaded from /var/run/secrets/kubernetes.io/serviceaccount/token by default
# Resources for build pod
resources:
# Number of cpu cores
cpu:
micro: 1
low: 2
high: 6
# Memory in GB
memory:
micro: 1
low: 2
high: 12
# Default build timeout for all builds in this cluster (in minutes)
buildTimeout: 90
# Default max build timeout (in minutes)
maxBuildTimeout: 120
# k8s node selectors for appropriate pod scheduling
nodeSelectors: {}
preferredNodeSelectors: {}
# Launcher image to use
launchImage: screwdrivercd/launcher
# Launcher container tag to use
launchVersion: stable
# jenkins:
# options:
# # Configuration of Jenkins
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"screwdriver-datastore-sequelize",
"screwdriver-executor-docker",
"screwdriver-executor-k8s",
"screwdriver-executor-k8s-vm",
"screwdriver-executor-queue",
"screwdriver-executor-router",
"screwdriver-models",
Expand Down Expand Up @@ -113,6 +114,7 @@
"screwdriver-executor-base": "^10.0.0",
"screwdriver-executor-docker": "^7.0.0",
"screwdriver-executor-k8s": "^16.0.0",
"screwdriver-executor-k8s-vm": "^5.0.0",
"screwdriver-executor-queue": "^5.0.0",
"screwdriver-executor-router": "^4.0.0",
"screwdriver-logger": "^2.0.0",
Expand Down

0 comments on commit 4f4f224

Please sign in to comment.