Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
lidiamokevnina committed Mar 2, 2024
2 parents 8e8794e + 7ad9a13 commit c02d618
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ In order to add a new migration do the following steps:
2. Run the command inside the `web` container

```bash
rake app:uffizzi_core:install
rake uffizzi_core:install:migrations
```

This command copies the new migration to the `db/migrate` folder
19 changes: 11 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: core
specs:
uffizzi_core (2.4.5)
uffizzi_core (2.4.6)
aasm
actionpack (~> 6.1.0)
active_model_serializers
Expand Down Expand Up @@ -111,8 +111,8 @@ GEM
ast (2.4.2)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.885.0)
aws-sdk-core (3.191.0)
aws-partitions (1.895.0)
aws-sdk-core (3.191.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand All @@ -132,6 +132,7 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.2.0)
bcrypt (3.1.16)
bootsnap (1.10.3)
msgpack (~> 1.2)
Expand Down Expand Up @@ -231,7 +232,8 @@ GEM
ice_nine (0.11.2)
jmespath (1.6.2)
jsonapi-renderer (0.2.2)
jwt (2.7.1)
jwt (2.8.1)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand All @@ -255,12 +257,13 @@ GEM
mini_portile2 (2.8.0)
minitest (5.15.0)
msgpack (1.4.5)
multipart-post (2.3.0)
multipart-post (2.4.0)
nio4r (2.5.8)
nokogiri (1.13.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (8.0.0)
octokit (8.1.0)
base64
faraday (>= 1, < 3)
sawyer (~> 0.9)
parallel (1.21.0)
Expand Down Expand Up @@ -348,7 +351,7 @@ GEM
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
sidekiq-unique-jobs (7.1.31)
sidekiq-unique-jobs (7.1.33)
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
concurrent-ruby (~> 1.0, >= 1.0.5)
redis (< 5.0)
Expand Down Expand Up @@ -376,7 +379,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yard (0.9.34)
yard (0.9.36)
zeitwerk (2.5.4)

PLATFORMS
Expand Down
33 changes: 18 additions & 15 deletions core/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
uffizzi_core (2.4.5)
uffizzi_core (2.4.6)
aasm
actionpack (~> 6.1.0)
active_model_serializers
Expand Down Expand Up @@ -110,8 +110,8 @@ GEM
activerecord (>= 5.2.6)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.885.0)
aws-sdk-core (3.191.0)
aws-partitions (1.895.0)
aws-sdk-core (3.191.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand All @@ -131,6 +131,7 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.2.0)
bcrypt (3.1.16)
brpoplpush-redis_script (0.1.3)
concurrent-ruby (~> 1.0, >= 1.0.5)
Expand Down Expand Up @@ -159,7 +160,7 @@ GEM
digest (3.1.1)
docker_distribution (0.1.2)
digest (~> 3)
dotenv (2.8.1)
dotenv (3.1.0)
dry-configurable (0.14.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.6)
Expand Down Expand Up @@ -239,7 +240,8 @@ GEM
iri (0.5.1)
jmespath (1.6.2)
jsonapi-renderer (0.2.2)
jwt (2.7.1)
jwt (2.8.1)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand All @@ -260,7 +262,7 @@ GEM
net-imap
net-pop
net-smtp
marcel (1.0.2)
marcel (1.0.4)
method_source (1.0.0)
mini_mime (1.1.5)
minitest (5.15.0)
Expand All @@ -270,8 +272,8 @@ GEM
minitest
power_assert (>= 1.1)
mocha (1.13.0)
multipart-post (2.3.0)
net-imap (0.4.9.1)
multipart-post (2.4.0)
net-imap (0.4.10)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -281,15 +283,16 @@ GEM
net-smtp (0.4.0.1)
net-protocol
nio4r (2.5.8)
nokogiri (1.16.0-aarch64-linux)
nokogiri (1.16.2-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-linux)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
octokit (8.0.0)
octokit (8.1.0)
base64
faraday (>= 1, < 3)
sawyer (~> 0.9)
parslet (2.0.0)
pg (1.5.4)
pg (1.5.6)
power_assert (2.0.1)
pry (0.13.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -364,7 +367,7 @@ GEM
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
sidekiq-unique-jobs (7.1.31)
sidekiq-unique-jobs (7.1.33)
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
concurrent-ruby (~> 1.0, >= 1.0.5)
redis (< 5.0)
Expand All @@ -380,7 +383,7 @@ GEM
swagger_yard (1.1.1)
parslet
yard
thor (1.3.0)
thor (1.3.1)
thread_safe (0.3.6)
timeout (0.4.1)
tzinfo (2.0.4)
Expand All @@ -397,7 +400,7 @@ GEM
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yard (0.9.34)
yard (0.9.36)
zeitwerk (2.5.4)

PLATFORMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class UffizziCore::Api::Cli::V1::Cluster::CreateForm < UffizziCore::Cluster
include UffizziCore::ApplicationForm

permit :name, :manifest, :creation_source
permit :name, :manifest, :creation_source, :node_selector

validate :check_manifest, if: -> { manifest.present? }

Expand Down
1 change: 1 addition & 0 deletions core/app/lib/uffizzi_core/concerns/models/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module UffizziCore::Concerns::Models::Cluster
validates :name, presence: true, format: { with: /\A[a-zA-Z0-9-]*\z/ }

enumerize :creation_source, in: UffizziCore.cluster_creation_sources, scope: true, predicates: true
enumerize :node_selector, in: [:gvisor, :vanilla]
attribute :creation_source, :string, default: :manual
validates :creation_source, presence: true
belongs_to :kubernetes_distribution, optional: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class UffizziCore::Controller::CreateCluster::ClusterSerializer < UffizziCore::B
include UffizziCore::DependencyInjectionConcern
include_module_if_exists('UffizziCore::Controller::CreateCluster::ClusterSerializerModule')

attributes :name, :manifest, :base_ingress_host, :distro, :image
attributes :name, :manifest, :base_ingress_host, :distro, :image, :node_selector

def base_ingress_host
managed_dns_zone = controller_settings_service.vcluster_settings_by_vcluster(object).managed_dns_zone
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class AddNodeSelectorToCluster < ActiveRecord::Migration[6.1]
def change
add_column(:uffizzi_core_clusters, :node_selector, :string)
end
end
2 changes: 1 addition & 1 deletion core/lib/uffizzi_core/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module UffizziCore
VERSION = '2.4.5'
VERSION = '2.4.6'
end
3 changes: 2 additions & 1 deletion core/test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2023_10_09_182412) do
ActiveRecord::Schema.define(version: 2024_03_01_200235) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -85,6 +85,7 @@
t.string "host"
t.string "creation_source"
t.integer "kubernetes_distribution_id"
t.string "node_selector"
t.index ["project_id"], name: "index_cluster_on_project_id"
end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

# This migration comes from uffizzi_core (originally 20240301200235)
class AddNodeSelectorToCluster < ActiveRecord::Migration[6.1]
def change
add_column(:uffizzi_core_clusters, :node_selector, :string)
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2023_10_09_163516) do
ActiveRecord::Schema.define(version: 2024_03_01_200916) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -84,6 +84,8 @@
t.datetime "updated_at", precision: 6, null: false
t.string "host"
t.string "creation_source"
t.integer "kubernetes_distribution_id"
t.string "node_selector"
t.index ["project_id"], name: "index_cluster_on_project_id"
end

Expand Down

0 comments on commit c02d618

Please sign in to comment.