Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init k8s (2.0) #1493

Merged
merged 2 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/dashboard/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,14 @@ GEM
ood_core (~> 0.1)
rails (> 4.0.7, < 6.0)
redcarpet (~> 3.2)
ood_core (0.17.6)
activesupport (>= 5.2, < 6.0)
ood_core (0.18.1)
ffi (~> 1.9, >= 1.9.6)
ood_support (~> 0.0.2)
ood_support (0.0.3)
pbs (2.2.1)
ffi (~> 1.9, >= 1.9.6)
public_suffix (4.0.6)
racc (1.5.2)
racc (1.6.0)
rack (2.2.3)
rack-protection (2.1.0)
rack
Expand Down
11 changes: 11 additions & 0 deletions apps/dashboard/config/initializers/k8s.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

# bootstrap all the kuberenetes clusters if there are any
OodAppkit.clusters.select(&:kubernetes?).each do |cluster|
require 'ood_core/job/adapters/kubernetes'
require 'ood_core/job/adapters/kubernetes/batch'

OodCore::Job::Adapters::Kubernetes::Batch.configure_kube!(cluster.job_config)
rescue StandardError, LoadError => e
Rails.logger.error("could not initialize k8s cluster #{cluster.id} because of error '#{e.message}'")
end