Skip to content

Commit

Permalink
Remove copilot
Browse files Browse the repository at this point in the history
- copilot is archived and not used no more
  • Loading branch information
moleske committed Aug 21, 2023
1 parent 129ca32 commit bb21fe7
Show file tree
Hide file tree
Showing 25 changed files with 3 additions and 1,057 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ source 'https://rubygems.org'

gem 'addressable'
gem 'allowy', '>= 2.1.0'
gem 'cf-copilot', '0.0.14'
gem 'clockwork', require: false
gem 'cloudfront-signer'
gem 'em-http-request', '~> 1.1'
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ GEM
bit-struct (0.17)
builder (3.2.4)
byebug (11.1.3)
cf-copilot (0.0.14)
grpc (~> 1.0)
cf-uaa-lib (4.0.2)
addressable (~> 2.8, >= 2.8.0)
httpclient (~> 2.8, >= 2.8.2.4)
Expand Down Expand Up @@ -552,7 +550,6 @@ DEPENDENCIES
allowy (>= 2.1.0)
azure-storage-blob!
byebug
cf-copilot (= 0.0.14)
cf-uaa-lib (~> 4.0.2)
clockwork
cloudfront-signer
Expand Down
2 changes: 0 additions & 2 deletions app/actions/update_route_destinations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def update(route, to_add, to_delete, user_audit_info, manifest_triggered)
route_mapping = RouteMappingModel[rm]
route_mapping.destroy

Copilot::Adapter.unmap_route(route_mapping)
route_mapping.processes.each do |process|
processes_to_ports_map[process] ||= { to_add: [], to_delete: [] }
processes_to_ports_map[process][:to_delete] << route_mapping.app_port unless process.route_mappings_dataset.any? do |process_route_mapping|
Expand All @@ -84,7 +83,6 @@ def update(route, to_add, to_delete, user_audit_info, manifest_triggered)
route_mapping = RouteMappingModel.new(rm)
route_mapping.save

Copilot::Adapter.map_route(route_mapping)
route_mapping.processes.each do |process|
processes_to_ports_map[process] ||= { to_add: [], to_delete: [] }
processes_to_ports_map[process][:to_add] << route_mapping.app_port
Expand Down
1 change: 0 additions & 1 deletion app/jobs/diego/sync.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'cloud_controller/diego/processes_sync'
require 'cloud_controller/diego/tasks_sync'
require 'statsd'
require 'cloud_controller/copilot/sync'

module VCAP::CloudController
module Jobs
Expand Down
6 changes: 0 additions & 6 deletions app/models/runtime/route_mapping_model.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'cloud_controller/copilot/adapter'

module VCAP::CloudController
class RouteMappingModel < Sequel::Model(:route_mappings)
DEFAULT_PROTOCOL_MAPPING = { 'tcp' => 'tcp', 'http' => 'http1' }.freeze
Expand Down Expand Up @@ -47,10 +45,6 @@ def self.user_visibility_filter(user)

def after_destroy
super

db.after_commit do
Copilot::Adapter.unmap_route(self)
end
end

def adapted_weight
Expand Down
11 changes: 0 additions & 11 deletions config/cloud_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ default_health_check_timeout: 60
maximum_health_check_timeout: 180

disable_custom_buildpacks: false
copilot:
enabled: false
broker_client_timeout_seconds: 60

uaa_client_name: 'cc-service-dashboards'
Expand Down Expand Up @@ -373,15 +371,6 @@ credhub_api:
credential_references:
interpolate_service_bindings: true

copilot:
enabled: false
host: copilot.service.cf.internal
port: 9080
client_ca_file: 'spec/fixtures/certs/copilot_ca.crt'
client_key_file: 'spec/fixtures/certs/copilot.key'
client_chain_file: 'spec/fixtures/certs/copilot.crt'
sync_frequency_in_seconds: 30

internal_route_vip_range: '127.128.0.0/9'

locket:
Expand Down
1 change: 0 additions & 1 deletion lib/cloud_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ module VCAP::CloudController; end

require 'cloud_controller/route_binding_message'
require 'cloud_controller/process_route_handler'
require 'cloud_controller/copilot/adapter'

require 'cloud_controller/isolation_segment_selector'
require 'cloud_controller/user_audit_info'
Expand Down
26 changes: 0 additions & 26 deletions lib/cloud_controller/backends/copilot_runner_delegator.rb

This file was deleted.

5 changes: 1 addition & 4 deletions lib/cloud_controller/backends/runners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'cloud_controller/diego/buildpack/lifecycle_protocol'
require 'cloud_controller/diego/docker/lifecycle_protocol'
require 'cloud_controller/diego/egress_rules'
require 'cloud_controller/backends/copilot_runner_delegator'

module VCAP::CloudController
class Runners
Expand All @@ -13,9 +12,7 @@ def initialize(config)
end

def runner_for_process(process)
# TODO: stop using this Copilot wrapper since no more Copilot
# see: https://github.com/cloudfoundry/istio-release#deprecated
CopilotRunnerDelegator.new(diego_runner(process), process)
diego_runner(process)
end

def diego_processes(batch_size, last_id)
Expand Down
10 changes: 0 additions & 10 deletions lib/cloud_controller/config_schemas/base/api_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,16 +341,6 @@ class ApiSchema < VCAP::Config
optional(:query_raise_on_mismatch) => bool,
},

optional(:copilot) => {
enabled: bool,
optional(:host) => String,
optional(:port) => Integer,
optional(:client_ca_file) => String,
optional(:client_key_file) => String,
optional(:client_chain_file) => String,
optional(:temporary_istio_domains) => Array,
},

max_labels_per_resource: Integer,
max_annotations_per_resource: Integer,

Expand Down
10 changes: 0 additions & 10 deletions lib/cloud_controller/config_schemas/vms/route_syncer_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ class RouteSyncerSchema < VCAP::Config

internal_route_vip_range: String,

copilot: {
sync_frequency_in_seconds: Integer,
enabled: bool,
host: String,
port: Integer,
client_ca_file: String,
client_key_file: String,
client_chain_file: String,
optional(:temporary_istio_domains) => Array,
}
}
end

Expand Down
102 changes: 0 additions & 102 deletions lib/cloud_controller/copilot/adapter.rb

This file was deleted.

14 changes: 0 additions & 14 deletions lib/cloud_controller/copilot/scheduler.rb

This file was deleted.

93 changes: 0 additions & 93 deletions lib/cloud_controller/copilot/sync.rb

This file was deleted.

0 comments on commit bb21fe7

Please sign in to comment.