Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 19:05:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 19:05:49 +0300
commit43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch)
treedceebdc68925362117480a5d672bcff122fb625b /vendor
parent20c84b99005abd1c82101dfeff264ac50d2df211 (diff)
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'vendor')
-rw-r--r--vendor/assets/javascripts/snowplow/sp.js162
-rw-r--r--vendor/assets/javascripts/u2f.js750
-rw-r--r--vendor/assets/javascripts/vue-virtual-scroller/src/components/RecycleScroller.vue4
-rw-r--r--vendor/gems/bundler-checksum/.gitlab-ci.yml14
-rw-r--r--vendor/gems/bundler-checksum/README.md2
-rw-r--r--vendor/gems/bundler-checksum/test/project_with_checksum_lock/Gemfile2
-rw-r--r--vendor/gems/cloud_profiler_agent/.gitlab-ci.yml (renamed from vendor/gems/omniauth-cas3/.gitlab-ci.yml)18
-rw-r--r--vendor/gems/cloud_profiler_agent/Gemfile4
-rw-r--r--vendor/gems/cloud_profiler_agent/Gemfile.lock126
-rw-r--r--vendor/gems/cloud_profiler_agent/LICENSE23
-rw-r--r--vendor/gems/cloud_profiler_agent/README.md30
-rw-r--r--vendor/gems/cloud_profiler_agent/cloud_profiler_agent.gemspec29
-rw-r--r--vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent.rb12
-rw-r--r--vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/agent.rb152
-rw-r--r--vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/looper.rb114
-rw-r--r--vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/pprof_builder.rb191
-rw-r--r--vendor/gems/cloud_profiler_agent/lib/profile_pb.rb85
-rwxr-xr-xvendor/gems/cloud_profiler_agent/script/generate_profile.rb17
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/cpu.stackprofbin0 -> 1733 bytes
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/looper_spec.rb176
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/object.stackprofbin0 -> 11714 bytes
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/pprof_builder_spec.rb103
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/wall.stackprofbin0 -> 110819 bytes
-rw-r--r--vendor/gems/cloud_profiler_agent/spec/spec_helper.rb21
-rw-r--r--vendor/gems/kubeclient/.gitignore16
-rw-r--r--vendor/gems/kubeclient/CHANGELOG.md247
-rw-r--r--vendor/gems/kubeclient/Gemfile7
-rw-r--r--vendor/gems/kubeclient/LICENSE.txt22
-rw-r--r--vendor/gems/kubeclient/README.md889
-rw-r--r--vendor/gems/kubeclient/RELEASING.md69
-rw-r--r--vendor/gems/kubeclient/Rakefile9
-rw-r--r--vendor/gems/kubeclient/kubeclient.gemspec39
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient.rb35
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/aws_eks_credentials.rb46
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/common.rb661
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/config.rb202
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/entity_list.rb21
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/exec_credentials.rb89
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/gcp_auth_provider.rb19
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/gcp_command_credentials.rb31
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/google_application_default_credentials.rb31
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/http_error.rb25
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/missing_kind_compatibility.rb68
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/oidc_auth_provider.rb52
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/resource.rb11
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/resource_not_found_error.rb4
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/version.rb4
-rw-r--r--vendor/gems/kubeclient/lib/kubeclient/watch_stream.rb97
-rw-r--r--vendor/gems/kubeclient/test/cassettes/kubernetes_guestbook.yml879
-rw-r--r--vendor/gems/kubeclient/test/config/allinone.kubeconfig21
-rw-r--r--vendor/gems/kubeclient/test/config/another-ca1.pem19
-rw-r--r--vendor/gems/kubeclient/test/config/another-ca2.pem19
-rw-r--r--vendor/gems/kubeclient/test/config/concatenated-ca.kubeconfig20
-rw-r--r--vendor/gems/kubeclient/test/config/concatenated-ca.pem57
-rw-r--r--vendor/gems/kubeclient/test/config/execauth.kubeconfig61
-rw-r--r--vendor/gems/kubeclient/test/config/external-ca.pem19
-rw-r--r--vendor/gems/kubeclient/test/config/external-cert.pem20
-rw-r--r--vendor/gems/kubeclient/test/config/external-key.rsa27
-rw-r--r--vendor/gems/kubeclient/test/config/external-without-ca.kubeconfig21
-rw-r--r--vendor/gems/kubeclient/test/config/external.kubeconfig20
-rw-r--r--vendor/gems/kubeclient/test/config/gcpauth.kubeconfig21
-rw-r--r--vendor/gems/kubeclient/test/config/gcpcmdauth.kubeconfig25
-rw-r--r--vendor/gems/kubeclient/test/config/insecure-custom-ca.kubeconfig22
-rw-r--r--vendor/gems/kubeclient/test/config/insecure.kubeconfig25
-rw-r--r--vendor/gems/kubeclient/test/config/nouser.kubeconfig15
-rw-r--r--vendor/gems/kubeclient/test/config/oidcauth.kubeconfig24
-rw-r--r--vendor/gems/kubeclient/test/config/secure-without-ca.kubeconfig22
-rw-r--r--vendor/gems/kubeclient/test/config/secure.kubeconfig21
-rw-r--r--vendor/gems/kubeclient/test/config/timestamps.kubeconfig25
-rwxr-xr-xvendor/gems/kubeclient/test/config/update_certs_k0s.rb53
-rw-r--r--vendor/gems/kubeclient/test/config/userauth.kubeconfig27
-rw-r--r--vendor/gems/kubeclient/test/json/bindings_list.json10
-rw-r--r--vendor/gems/kubeclient/test/json/component_status.json17
-rw-r--r--vendor/gems/kubeclient/test/json/component_status_list.json52
-rw-r--r--vendor/gems/kubeclient/test/json/config.istio.io_api_resource_list.json679
-rw-r--r--vendor/gems/kubeclient/test/json/config_map_list.json9
-rw-r--r--vendor/gems/kubeclient/test/json/core_api_resource_list.json181
-rw-r--r--vendor/gems/kubeclient/test/json/core_api_resource_list_without_kind.json129
-rw-r--r--vendor/gems/kubeclient/test/json/core_oapi_resource_list_without_kind.json197
-rw-r--r--vendor/gems/kubeclient/test/json/created_endpoint.json28
-rw-r--r--vendor/gems/kubeclient/test/json/created_namespace.json20
-rw-r--r--vendor/gems/kubeclient/test/json/created_secret.json16
-rw-r--r--vendor/gems/kubeclient/test/json/created_security_context_constraint.json65
-rw-r--r--vendor/gems/kubeclient/test/json/created_service.json31
-rw-r--r--vendor/gems/kubeclient/test/json/empty_pod_list.json9
-rw-r--r--vendor/gems/kubeclient/test/json/endpoint_list.json48
-rw-r--r--vendor/gems/kubeclient/test/json/entity_list.json56
-rw-r--r--vendor/gems/kubeclient/test/json/event_list.json35
-rw-r--r--vendor/gems/kubeclient/test/json/extensions_v1beta1_api_resource_list.json217
-rw-r--r--vendor/gems/kubeclient/test/json/limit_range.json23
-rw-r--r--vendor/gems/kubeclient/test/json/limit_range_list.json31
-rw-r--r--vendor/gems/kubeclient/test/json/namespace.json13
-rw-r--r--vendor/gems/kubeclient/test/json/namespace_exception.json8
-rw-r--r--vendor/gems/kubeclient/test/json/namespace_list.json32
-rw-r--r--vendor/gems/kubeclient/test/json/node.json29
-rw-r--r--vendor/gems/kubeclient/test/json/node_list.json37
-rw-r--r--vendor/gems/kubeclient/test/json/node_notice.json160
-rw-r--r--vendor/gems/kubeclient/test/json/persistent_volume.json37
-rw-r--r--vendor/gems/kubeclient/test/json/persistent_volume_claim.json32
-rw-r--r--vendor/gems/kubeclient/test/json/persistent_volume_claim_list.json40
-rw-r--r--vendor/gems/kubeclient/test/json/persistent_volume_claims_nil_items.json8
-rw-r--r--vendor/gems/kubeclient/test/json/persistent_volume_list.json45
-rw-r--r--vendor/gems/kubeclient/test/json/pod.json92
-rw-r--r--vendor/gems/kubeclient/test/json/pod_list.json79
-rw-r--r--vendor/gems/kubeclient/test/json/pod_template_list.json9
-rw-r--r--vendor/gems/kubeclient/test/json/pods_1.json265
-rw-r--r--vendor/gems/kubeclient/test/json/pods_2.json102
-rw-r--r--vendor/gems/kubeclient/test/json/pods_410.json9
-rw-r--r--vendor/gems/kubeclient/test/json/processed_template.json27
-rw-r--r--vendor/gems/kubeclient/test/json/replication_controller.json57
-rw-r--r--vendor/gems/kubeclient/test/json/replication_controller_list.json66
-rw-r--r--vendor/gems/kubeclient/test/json/resource_quota.json46
-rw-r--r--vendor/gems/kubeclient/test/json/resource_quota_list.json54
-rw-r--r--vendor/gems/kubeclient/test/json/secret_list.json44
-rw-r--r--vendor/gems/kubeclient/test/json/security.openshift.io_api_resource_list.json69
-rw-r--r--vendor/gems/kubeclient/test/json/security_context_constraint_list.json375
-rw-r--r--vendor/gems/kubeclient/test/json/service.json33
-rw-r--r--vendor/gems/kubeclient/test/json/service_account.json25
-rw-r--r--vendor/gems/kubeclient/test/json/service_account_list.json82
-rw-r--r--vendor/gems/kubeclient/test/json/service_illegal_json_404.json1
-rw-r--r--vendor/gems/kubeclient/test/json/service_json_patch.json26
-rw-r--r--vendor/gems/kubeclient/test/json/service_list.json97
-rw-r--r--vendor/gems/kubeclient/test/json/service_merge_patch.json26
-rw-r--r--vendor/gems/kubeclient/test/json/service_patch.json25
-rw-r--r--vendor/gems/kubeclient/test/json/service_update.json22
-rw-r--r--vendor/gems/kubeclient/test/json/template.json27
-rw-r--r--vendor/gems/kubeclient/test/json/template.openshift.io_api_resource_list.json75
-rw-r--r--vendor/gems/kubeclient/test/json/template_list.json35
-rw-r--r--vendor/gems/kubeclient/test/json/versions_list.json6
-rw-r--r--vendor/gems/kubeclient/test/json/watch_stream.json3
-rw-r--r--vendor/gems/kubeclient/test/test_common.rb95
-rw-r--r--vendor/gems/kubeclient/test/test_common_url_handling.rb160
-rw-r--r--vendor/gems/kubeclient/test/test_component_status.rb29
-rw-r--r--vendor/gems/kubeclient/test/test_config.rb271
-rw-r--r--vendor/gems/kubeclient/test/test_endpoint.rb54
-rw-r--r--vendor/gems/kubeclient/test/test_exec_credentials.rb225
-rw-r--r--vendor/gems/kubeclient/test/test_gcp_command_credentials.rb27
-rw-r--r--vendor/gems/kubeclient/test/test_google_application_default_credentials.rb15
-rw-r--r--vendor/gems/kubeclient/test/test_guestbook_go.rb237
-rw-r--r--vendor/gems/kubeclient/test/test_helper.rb28
-rw-r--r--vendor/gems/kubeclient/test/test_kubeclient.rb881
-rw-r--r--vendor/gems/kubeclient/test/test_limit_range.rb25
-rw-r--r--vendor/gems/kubeclient/test/test_missing_methods.rb80
-rw-r--r--vendor/gems/kubeclient/test/test_namespace.rb59
-rw-r--r--vendor/gems/kubeclient/test/test_node.rb70
-rw-r--r--vendor/gems/kubeclient/test/test_oidc_auth_provider.rb103
-rw-r--r--vendor/gems/kubeclient/test/test_persistent_volume.rb29
-rw-r--r--vendor/gems/kubeclient/test/test_persistent_volume_claim.rb28
-rw-r--r--vendor/gems/kubeclient/test/test_pod.rb81
-rw-r--r--vendor/gems/kubeclient/test/test_pod_log.rb157
-rw-r--r--vendor/gems/kubeclient/test/test_process_template.rb80
-rw-r--r--vendor/gems/kubeclient/test/test_real_cluster.rb162
-rw-r--r--vendor/gems/kubeclient/test/test_replication_controller.rb47
-rw-r--r--vendor/gems/kubeclient/test/test_resource_list_without_kind.rb78
-rw-r--r--vendor/gems/kubeclient/test/test_resource_quota.rb23
-rw-r--r--vendor/gems/kubeclient/test/test_secret.rb62
-rw-r--r--vendor/gems/kubeclient/test/test_security_context_constraint.rb62
-rw-r--r--vendor/gems/kubeclient/test/test_service.rb357
-rw-r--r--vendor/gems/kubeclient/test/test_service_account.rb26
-rw-r--r--vendor/gems/kubeclient/test/test_watch.rb195
-rw-r--r--vendor/gems/kubeclient/test/txt/pod_log.txt6
-rw-r--r--vendor/gems/kubeclient/test/valid_token_file1
-rw-r--r--vendor/gems/omniauth-cas3/Gemfile4
-rw-r--r--vendor/gems/omniauth-cas3/Gemfile.lock65
-rw-r--r--vendor/gems/omniauth-cas3/LICENSE23
-rw-r--r--vendor/gems/omniauth-cas3/README.md134
-rw-r--r--vendor/gems/omniauth-cas3/Rakefile15
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth-cas3.rb1
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth/cas3.rb2
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth/cas3/version.rb5
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3.rb227
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/logout_request.rb73
-rw-r--r--vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/service_ticket_validator.rb103
-rw-r--r--vendor/gems/omniauth-cas3/omniauth-cas3.gemspec27
-rw-r--r--vendor/gems/omniauth-cas3/spec/fixtures/cas_failure.xml4
-rw-r--r--vendor/gems/omniauth-cas3/spec/fixtures/cas_success.xml14
-rw-r--r--vendor/gems/omniauth-cas3/spec/fixtures/cas_success_jasig.xml16
-rw-r--r--vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/logout_request_spec.rb127
-rw-r--r--vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/service_ticket_validator_spec.rb55
-rw-r--r--vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3_spec.rb266
-rw-r--r--vendor/gems/omniauth-cas3/spec/spec_helper.rb13
-rwxr-xr-xvendor/gems/omniauth-salesforce/README.md8
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/.gitignore3
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/.gitlab-ci.yml77
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/.rspec1
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/CONTRIBUTING.md41
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/Gemfile14
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/Gemfile.lock58
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/LICENSE165
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/README.md57
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/gitlab-sidekiq-fetcher.gemspec15
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/lib/sidekiq-reliable-fetch.rb6
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/base_reliable_fetch.rb269
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/interrupted_set.rb51
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/reliable_fetch.rb38
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/semi_reliable_fetch.rb48
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/spec/base_reliable_fetch_spec.rb97
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/spec/fetch_shared_examples.rb195
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/spec/reliable_fetch_spec.rb8
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/spec/semi_reliable_fetch_spec.rb43
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/spec/spec_helper.rb116
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/README.md37
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/interruption/config.rb19
-rwxr-xr-xvendor/gems/sidekiq-reliable-fetch/tests/interruption/test_kill_signal.rb25
-rwxr-xr-xvendor/gems/sidekiq-reliable-fetch/tests/interruption/test_term_signal.rb25
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/interruption/worker.rb15
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/reliability/config.rb29
-rwxr-xr-xvendor/gems/sidekiq-reliable-fetch/tests/reliability/reliability_test.rb115
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/reliability/worker.rb14
-rw-r--r--vendor/gems/sidekiq-reliable-fetch/tests/support/utils.rb26
-rw-r--r--vendor/project_templates/android.tar.gzbin133429 -> 131955 bytes
-rw-r--r--vendor/project_templates/cluster_management.tar.gzbin13552 -> 12083 bytes
-rw-r--r--vendor/project_templates/express.tar.gzbin17923 -> 28962 bytes
-rw-r--r--vendor/project_templates/gitbook.tar.gzbin13068 -> 0 bytes
-rw-r--r--vendor/project_templates/gomicro.tar.gzbin5388 -> 4495 bytes
-rw-r--r--vendor/project_templates/hexo.tar.gzbin547436 -> 546434 bytes
-rw-r--r--vendor/project_templates/hipaa_audit_protocol.tar.gzbin114488 -> 1523 bytes
-rw-r--r--vendor/project_templates/iosswift.tar.gzbin2422200 -> 2421857 bytes
-rw-r--r--vendor/project_templates/jekyll.tar.gzbin60465 -> 59551 bytes
-rw-r--r--vendor/project_templates/laravel.tar.gzbin0 -> 74342 bytes
-rw-r--r--vendor/project_templates/learn_gitlab_ultimate.tar.gzbin115431 -> 0 bytes
-rw-r--r--vendor/project_templates/nfgitbook.tar.gzbin122562 -> 121618 bytes
-rw-r--r--vendor/project_templates/nfhexo.tar.gzbin655028 -> 654150 bytes
-rw-r--r--vendor/project_templates/nfhugo.tar.gzbin1159251 -> 1158440 bytes
-rw-r--r--vendor/project_templates/nfjekyll.tar.gzbin132262 -> 131307 bytes
-rw-r--r--vendor/project_templates/nfplainhtml.tar.gzbin122392 -> 121444 bytes
-rw-r--r--vendor/project_templates/pelican.tar.gzbin43159 -> 42448 bytes
-rw-r--r--vendor/project_templates/plainhtml.tar.gzbin11389 -> 10445 bytes
-rw-r--r--vendor/project_templates/salesforcedx.tar.gzbin432083 -> 431023 bytes
-rw-r--r--vendor/project_templates/serverless_framework.tar.gzbin92193 -> 91058 bytes
-rw-r--r--vendor/project_templates/spring.tar.gzbin49518 -> 48912 bytes
231 files changed, 2713 insertions, 14092 deletions
diff --git a/vendor/assets/javascripts/snowplow/sp.js b/vendor/assets/javascripts/snowplow/sp.js
deleted file mode 100644
index 88e7304c8ac..00000000000
--- a/vendor/assets/javascripts/snowplow/sp.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * @description JavaScript tracker for Snowplow
- * @version 2.17.3
- * @copyright Anthon Pang, Snowplow Analytics Ltd
- * @license Simplified BSD
- *
- * Documentation: http://bit.ly/sp-js
- */
-
-'use strict';(function(){function D(a){"@babel/helpers - typeof";D="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};return D(a)}function Sb(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);b&&(e=e.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable}));c.push.apply(c,e)}return c}
-function nd(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Sb(Object(c),!0).forEach(function(b){var d=c[b];b in a?Object.defineProperty(a,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[b]=d}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Sb(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}function qa(a){var b=Array.isArray(a)?jb(a):void 0;b||(b=
-"undefined"!==typeof Symbol&&Symbol.iterator in Object(a)?Array.from(a):void 0);if(!(a=b||fc(a)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return a}function fc(a,b){if(a){if("string"===typeof a)return jb(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);"Object"===c&&a.constructor&&(c=a.constructor.name);if("Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return jb(a,
-b)}}function jb(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,e=Array(b);c<b;c++)e[c]=a[c];return e}function kb(a,b){var c;if("undefined"===typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(c=fc(a))||b&&a&&"number"===typeof a.length){c&&(a=c);var e=0;b=function(){};return{s:b,n:function(){return e>=a.length?{done:!0}:{done:!1,value:a[e++]}},e:function(a){throw a;},f:b}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}var d=!0,f=!1,h;return{s:function(){c=a[Symbol.iterator]()},n:function(){var a=c.next();d=a.done;return a},e:function(a){f=!0;h=a},f:function(){try{d||null==c.return||c.return()}finally{if(f)throw h;}}}}function ra(a){var b={exports:{}};return a(b,b.exports),b.exports}function sa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b<c;){var e=a[b];this.set(e[0],e[1])}}function ba(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b<c;){var e=a[b];this.set(e[0],e[1])}}function ta(a){var b=-1,c=null==
-a?0:a.length;for(this.clear();++b<c;){var e=a[b];this.set(e[0],e[1])}}function ua(a){this.size=(this.__data__=new lb(a)).size}function Ha(a){var b=-1,c=null==a?0:a.length;for(this.__data__=new va;++b<c;)this.add(a[b])}function Ia(a,b,c,e,d){if(a===b)b=!0;else if(null==a||null==b||!Q(a)&&!Q(b))b=a!==a&&b!==b;else a:{var f=u(a),h=u(b),g=f?"[object Array]":gc(a),k=h?"[object Array]":gc(b);g="[object Arguments]"==g?"[object Object]":g;k="[object Arguments]"==k?"[object Object]":k;var p="[object Object]"==
-g;h="[object Object]"==k;if((k=g==k)&&Ja(a)){if(!Ja(b)){b=!1;break a}f=!0;p=!1}if(k&&!p)d||(d=new Ka),b=f||hc(a)?ic(a,b,c,e,Ia,d):od(a,b,g,c,e,Ia,d);else{if(!(c&1)&&(f=p&&jc.call(a,"__wrapped__"),g=h&&jc.call(b,"__wrapped__"),f||g)){a=f?a.value():a;b=g?b.value():b;d||(d=new Ka);b=Ia(a,b,c,e,d);break a}if(k)b:if(d||(d=new Ka),f=c&1,g=kc(a,La,lc),h=g.length,k=kc(b,La,lc).length,h==k||f){for(k=h;k--;){var v=g[k];if(!(f?v in b:pd.call(b,v))){b=!1;break b}}p=d.get(a);v=d.get(b);if(p&&v)b=p==b&&v==a;else{p=
-!0;d.set(a,b);d.set(b,a);for(var M=f;++k<h;){v=g[k];var m=a[v],r=b[v];if(e)var N=f?e(r,m,v,b,a,d):e(m,r,v,a,b,d);if(void 0===N?m!==r&&!Ia(m,r,c,e,d):!N){p=!1;break}M||(M="constructor"==v)}p&&!M&&(c=a.constructor,e=b.constructor,c!=e&&"constructor"in a&&"constructor"in b&&!("function"==typeof c&&c instanceof c&&"function"==typeof e&&e instanceof e)&&(p=!1));d["delete"](a);d["delete"](b);b=p}}else b=!1;else b=!1}}return b}function Fb(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError("Expected a function");
-var c=function d(){var c=arguments,h=b?b.apply(this,c):c[0],g=d.cache;if(g.has(h))return g.get(h);c=a.apply(this,c);d.cache=g.set(h,c)||g;return c};c.cache=new (Fb.Cache||va);return c}function mc(a){if("string"==typeof a)return a;if(u(a))return nc(a,mc)+"";if(Ma(a))return oc?oc.call(a):"";var b=a+"";return"0"==b&&1/a==-qd?"-0":b}function pc(a){if(!qc(a)){a=a.text||"";var b=wa.getElementsByTagName("title");b&&void 0!==b[0]&&(a=b[0].text)}return a}function Tb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);
-return b?b[1]:a}function cc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1));return a}function dc(a){var b="",c=Gb("referrer",Z.location.href)||Gb("referer",Z.location.href);if(c)return c;if(a)return a;try{b=Z.top.document.referrer}catch(e){if(Z.parent)try{b=Z.parent.document.referrer}catch(d){b=""}}""===b&&(b=wa.referrer);return b}function q(a,b,c,e){if(a.addEventListener)return a.addEventListener(b,c,e),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);
-a["on"+b]=c}function Gb(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function mb(a){var b=Array.prototype.slice.call(arguments,1);return rd(ca(a,function(a){if("function"===typeof a)try{return a.apply(null,b)}catch(e){}else return a}))}function y(a){"undefined"!==typeof console&&console.warn("Snowplow: "+a)}function da(a){return a.className.match(/\S+/g)||[]}function Hb(a,b){if(Array.isArray(a)||!I(a))return function(){return!0};
-if(a.hasOwnProperty("filter"))return a.filter;var c=a.hasOwnProperty("whitelist");a=a.whitelist||a.blacklist;Array.isArray(a)||(a=[a]);for(var e={},d=0;d<a.length;d++)e[a[d]]=!0;return b?function(a){a:{a=da(a);var b;for(b=0;b<a.length;b++)if(e[a[b]]){a=!0;break a}a=!1}return a===c}:function(a){return a.name in e===c}}function sd(a){return I(a)?a.hasOwnProperty("transform")?a.transform:function(a){return a}:function(a){return a}}function Ub(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:
-63072E3;try{var e=Date.now()+1E3*c;xa.setItem("".concat(a,".expires"),e);xa.setItem(a,b);return!0}catch(d){return!1}}function rc(a){try{return xa.removeItem(a),xa.removeItem(a+".expires"),!0}catch(b){return!1}}function td(a,b){for(var c="_sp_root_domain_test_"+(new Date).getTime(),e="_test_value_"+(new Date).getTime(),d=Z.location.hostname.split("."),f=d.length-1;0<=f;){var h=d.slice(f,d.length).join(".");J(c,e,0,"/",h,a,b);if(J(c)===e){J(c,"",-1,"/",h,a,b);c=wa.cookie.split("; ");e=[];for(d=0;d<
-c.length;d++)"_sp_root_domain_test_"===c[d].substring(0,21)&&e.push(c[d]);c=e;for(e=0;e<c.length;e++)J(c[e],"",-1,"/",h,a,b);return h}--f}return Z.location.hostname}function sc(a,b){for(var c=0;c<b.length;c++)if(b[c]===a)return!0;return!1}function J(a,b,c,e,d,f,h){return 1<arguments.length?wa.cookie=a+"="+encodeURIComponent(b)+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(e?"; Path="+e:"")+(d?"; Domain="+d:"")+(f?"; SameSite="+f:"")+(h?"; Secure":""):decodeURIComponent((("; "+wa.cookie).split("; "+
-a+"=")[1]||"").split(";")[0])}function nb(a){a=parseInt(a);return isNaN(a)?void 0:a}function Ib(a){a=parseFloat(a);return isNaN(a)?void 0:a}function ob(a){return a&&"function"===typeof a?!0:!1}function ud(a,b,c,e,d){function f(e,f,h){h=h||{};g.hasOwnProperty(e)?y("Tracker namespace "+e+" already exists."):(g[e]=new a(d,e,b,c,h),g[e].setCollectorUrl(f))}function h(){var a;for(a=0;a<arguments.length;a+=1){var b=arguments[a];var c=Array.prototype.shift.call(b);if(ob(c))try{c.apply(g,b)}catch(C){y("Custom callback error - ".concat(C))}finally{continue}var d=
-c.split(":");c=d[0];d=1<d.length?d[1].split(";"):[];d=[c,d];c=d[0];d=d[1];if("newTracker"===c)f(b[0],b[1],b[2]);else if("setCollectorCf"!==c&&"setCollectorUrl"!==c||d&&0!==d.length){var e=[];if(d&&0!==d.length)for(var h=0;h<d.length;h++)g.hasOwnProperty(d[h])?e.push(g[d[h]]):y('Warning: Tracker namespace "'+d[h]+'" not configured');else e=ca(g);0===e.length&&y("Warning: No tracker configured");for(d=0;d<e.length;d++)e[d][c].apply(e[d],b)}else d=b[0],b=b[1],y(c+" is deprecated. Set the collector when a new tracker instance using newTracker."),
-b=void 0===b?"sp":b,f(b),g[b][c](d)}}for(var g={},k=0;k<e.length;k++)h(e[k]);return{push:h}}function tc(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b),b=Gb("u",a[1]),a=Tb(b);else{var e;if(!(e="cc.bingj.com"===a||"webcache.googleusercontent.com"===a))a:{if(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(a))try{var d=
-document.body.children[0].children[0].children[0].children[0].children[0].children[0].innerHTML;e="You have reached the cached page for"===d.slice(0,36);break a}catch(f){e=!1;break a}e=void 0}e&&(b=document.links[0].href,a=Tb(b))}return[a,b,c]}function vd(){try{var a=!!ya.localStorage}catch(b){a=!0}if(!a)return!1;try{return ya.localStorage.setItem("modernizr","modernizr"),ya.localStorage.removeItem("modernizr"),!0}catch(b){return!1}}function wd(){var a=ya,b="inner";"innerWidth"in ya||(b="client",
-a=pb.documentElement||pb.body);var c=a[b+"Width"];a=a[b+"Height"];return 0<=c&&0<=a?c+"x"+a:null}function xd(){var a=pb.documentElement,b=pb.body,c=Math.max(a.clientWidth,a.offsetWidth,a.scrollWidth);a=Math.max(a.clientHeight,a.offsetHeight,a.scrollHeight,b?Math.max(b.offsetHeight,b.scrollHeight):0);return isNaN(c)||isNaN(a)?"":c+"x"+a}function yd(){var a,b={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",
-java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"},c={};if(R.mimeTypes&&R.mimeTypes.length)for(a in b)if(Object.prototype.hasOwnProperty.call(b,a)){var e=R.mimeTypes[b[a]];c[a]=e&&e.enabledPlugin?"1":"0"}R.constructor===window.Navigator&&"unknown"!==typeof R.javaEnabled&&void 0!==R.javaEnabled&&R.javaEnabled()&&(c.java="1");ob(ya.GearsFactory)&&(c.gears="1");c.res=qb.width+"x"+qb.height;c.cd=qb.colorDepth;c.cookie=R.cookieEnabled?"1":"0";return c}function zd(a,
-b,c){function e(b,d){for(var e,f,h,k;null!==(e=b.parentNode)&&void 0!==e&&"A"!==(f=b.tagName.toUpperCase())&&"AREA"!==f;)b=e;if(void 0!==b.href){e=b.hostname||Tb(b.href);f=e.toLowerCase();var p=b.href.replace(e,f);/^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):/i.test(p)||(e=b.id,f=da(b),h=b.target,k=g?b.innerHTML:null,p=unescape(p),a.trackLinkClick(p,e,f,h,k,c(mb(d,b))))}}function d(a){return function(b){b=b||window.event;var c=b.which||b.button;var d=b.target||b.srcElement;"click"===
-b.type?d&&e(d,a):"mousedown"===b.type?1!==c&&2!==c||!d?p=v=null:(p=c,v=d):"mouseup"===b.type&&(c===p&&d===v&&e(d,a),p=v=null)}}var f,h,g,k,p,v;return{configureLinkClickTracking:function(a,b,c,d){g=c;k=d;h=b;f=Hb(a,!0)},addClickListeners:function(){var a=document.links,c;for(c=0;c<a.length;c++)if(f(a[c])&&!a[c][b]){var e=a[c];h?(q(e,"mouseup",d(k),!1),q(e,"mousedown",d(k),!1)):q(e,"click",d(k),!1);a[c][b]=!0}}}}function Ad(a,b,c){function e(a){return a[Bd(["name","id","type","nodeName"],function(b){return a[b]&&
-"string"===typeof a[b]})]}function d(a){for(;a&&a.nodeName&&"HTML"!==a.nodeName.toUpperCase()&&"FORM"!==a.nodeName.toUpperCase();)a=a.parentNode;if(a&&a.nodeName&&"FORM"===a.nodeName.toUpperCase())return e(a)}function f(a){var b=[];O(k,function(c){c=Array.prototype.filter.call(a.getElementsByTagName(c),function(a){return a.hasOwnProperty(p)});O(c,function(a){if("submit"!==a.type){var c={name:e(a),value:a.value,nodeName:a.nodeName};a.type&&"INPUT"===a.nodeName.toUpperCase()&&(c.type=a.type);"checkbox"!==
-a.type&&"radio"!==a.type||a.checked||(c.value=null);b.push(c)}})});return b}function h(b,f){return function(g){g=g.target;var h=g.nodeName&&"INPUT"===g.nodeName.toUpperCase()?g.type:null,k="checkbox"!==g.type||g.checked?m(g.value,g):null;("change_form"===b||"checkbox"!==h&&"radio"!==h)&&a.trackFormFocusOrChange(b,d(g),e(g),g.nodeName,h,da(g),k,c(mb(f,g,h,k)))}}function g(b){return function(d){d=d.target;var g=f(d);O(g,function(a){a.value=m(a.value,a)});a.trackFormSubmission(e(d),da(d),g,c(mb(b,d,
-g)))}}var k=["textarea","input","select"],p=b+"form",v=function(){return!0},M=function(){return!0},m=function(a){return a};return{configureFormTracking:function(a){a&&(v=Hb(a.forms,!0),M=Hb(a.fields,!1),m=sd(a.fields))},addFormListeners:function(a){O(document.getElementsByTagName("form"),function(b){v(b)&&!b[p]&&(O(k,function(c){O(b.getElementsByTagName(c),function(b){M(b)&&!b[p]&&"password"!==b.type.toLowerCase()&&(q(b,"focus",h("focus_form",a),!1),q(b,"change",h("change_form",a),!1),b[p]=!0)})}),
-q(b,"submit",g(a)),b[p]=!0)})}}}function Cd(a){function b(b,e,d,f,h,g){a.trackSelfDescribingEvent({schema:"iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1",data:{programmingLanguage:"JAVASCRIPT",message:b||"JS Exception. Browser doesn't support ErrorEvent API",stackTrace:h&&h.stack?h.stack:null,lineNumber:d,lineColumn:f,fileName:e}},g)}return{trackError:b,enableErrorTracking:function(a,e,d){q(Dd,"error",function(c){if(ob(a)&&a(c)||null==a){var f=ob(e)?d.concat(e(c)):d;b(c.message,
-c.filename,c.lineno,c.colno,c.error,f)}},!0)}}}function Ed(a,b,c,e,d,f,h,g,k,p,v,M){function m(a){var b="?",c={co:!0,cx:!0},d=!0,e;for(e in a)a.hasOwnProperty(e)&&!c.hasOwnProperty(e)&&(d?d=!1:b+="&",b+=encodeURIComponent(e)+"="+encodeURIComponent(a[e]));for(var g in c)a.hasOwnProperty(g)&&c.hasOwnProperty(g)&&(b+="&"+g+"="+encodeURIComponent(a[g]));return b}function r(a){a=Fd(a,function(a){return a.toString()});return{evt:a,bytes:N(JSON.stringify(a))}}function N(a){for(var b=0,c=0;c<a.length;c++){var d=
-a.charCodeAt(c);127>=d?b+=1:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,c++):b=65535>d?b+3:b+4}return b}function C(){for(;E.length&&"string"!==typeof E[0]&&"object"!==D(E[0]);)E.shift();if(1>E.length)q=!1;else{if(!qc(u))throw"No collector configured";q=!0;var a=E[0];if(P){var b=function(a){for(var b=0,c=0;b<a.length&&!(c+=a[b].bytes,c>=g);)b+=1;return b},c=function(a){for(var b=0;b<a;b++)E.shift();e&&Ub(L,JSON.stringify(E.slice(0,p)));C()};if(F){a=vc(a);var d=n(a,!1);var f=1}else a=u,d=n(a,!0),f=b(E);var h=
-setTimeout(function(){d.abort();q=!1},v);d.onreadystatechange=function(){if(4===d.readyState&&200<=d.status&&400>d.status){clearTimeout(h);if(x&&!J)try{wc.setItem(Q,!0)}catch(uc){}c(f)}else 4===d.readyState&&400<=d.status&&(clearTimeout(h),q=!1)};if(F)d.send();else if(b=E.slice(0,f),0<b.length){var k;if(!(k=J)&&(k=x))try{k=wc.getItem(Q)}catch(uc){k=void 0}J=k;b=ca(b,function(a){return a.evt});if(J){k=new Blob([Jb(w(b))],{type:"application/json"});try{var m=navigator.sendBeacon(a,k)}catch(uc){m=!1}}!0===
-m&&c(f);x&&m||d.send(Jb(w(b)))}}else if(M)q=!1;else{m=new Image(1,1);var r=!0;m.onload=function(){r&&(r=!1,E.shift(),e&&Ub(L,JSON.stringify(E.slice(0,p))),C())};m.onerror=function(){r&&(q=r=!1)};m.src=vc(a);setTimeout(function(){r&&q&&(r=!1,C())},v)}}}function n(a,b){var c=new XMLHttpRequest;b?(c.open("POST",a,!0),c.setRequestHeader("Content-Type","application/json; charset=UTF-8")):c.open("GET",a,!0);c.withCredentials=!0;M&&c.setRequestHeader("SP-Anonymous","*");return c}function Jb(a){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
-data:a})}function w(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function vc(a){return k?u+a.replace("?","?stm="+(new Date).getTime()+"&"):u+a}var B=window.localStorage,q=!1,u,J;d=d.toLowerCase?d.toLowerCase():d;var O=null===d||!0===d||"beacon"===d||"true"===d,x=!!(O&&navigator&&navigator.sendBeacon)&&O,F="get"===d,P=!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),I=!F&&P&&("post"===d||O),U=I?f:"/i";h=vd()&&e&&I&&h||1;var L="snowplowOutQueue_".concat(a,
-"_").concat(b,"_").concat(I?"post2":"get");var Q="spBeaconPreflight_".concat(a,"_").concat(b);if(e)try{var E=JSON.parse(B.getItem(L))}catch(df){}Array.isArray(E)||(E=[]);c.outQueues.push(E);P&&1<h&&c.bufferFlushers.push(function(){q||C()});return{enqueueRequest:function(a,b){u=b+U;if(I){a=r(a);if(a.bytes>=g){y("Event ("+a.bytes+"B) too big, max is "+g);n(u,!0).send(Jb(w([a.evt])));return}E.push(a)}else E.push(m(a));a=!1;e&&(a=Ub(L,JSON.stringify(E.slice(0,p))));q||a&&!(E.length>=h)||C()},executeQueue:function(){q||
-C()},setUseLocalStorage:function(a){e=a},setAnonymousTracking:function(a){M=a},setCollectorUrl:function(a){u=a+U}}}function Gd(a){var b={};"object"===D(a)&&null!==a&&Object.getOwnPropertyNames(a).forEach(function(c,e,d){"function"===typeof a[c]&&(b[c]=Hd(a[c]))});return b}function Id(a){if(!a)return a;switch(4-a.length%4){case 2:a+="==";break;case 3:a+="="}a=a.replace(/-/g,"+").replace(/_/g,"/");return Jd(a)}function Jd(a){var b=0,c=0;var e="";var d=[];if(!a)return a;a+="";do{var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(b++));
-var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(b++));e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(b++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(b++));var k=f<<18|h<<12|e<<6|g;f=k>>16&255;h=k>>8&255;k&=255;64===e?d[c++]=String.fromCharCode(f):64===g?d[c++]=String.fromCharCode(f,h):d[c++]=String.fromCharCode(f,h,k)}while(b<a.length);e=d.join("");return function(a){return decodeURIComponent(a.split("").map(function(a){return"%"+
-("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(e.replace(/\0+$/,""))}function Na(a){if(!xc(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function xc(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function za(a){var b={},c=function(a,c){null!=c&&""!==c&&(b[a]=c)};return{add:c,addDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&c(b,a[b])},addJson:function(b,
-d,f){if(f&&Na(f))if(f=JSON.stringify(f),a){if(f){d=f;var e=f=0,g=[];if(d){d=unescape(encodeURIComponent(d));do{var k=d.charCodeAt(f++);var p=d.charCodeAt(f++);var v=d.charCodeAt(f++);var M=k<<16|p<<8|v;k=M>>18&63;p=M>>12&63;v=M>>6&63;M&=63;g[e++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(v)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(M)}while(f<
-d.length);f=g.join("");d=d.length%3;d=(d?f.slice(0,d-3):f)+"===".slice(d||3)}d=d.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}else d=f;c(b,d)}else c(d,f)},build:function(){return b}}}function Kd(){var a=[],b=[];return{getGlobalPrimitives:function(){return a},getConditionalProviders:function(){return b},addGlobalContexts:function(c){var e=[],d=[];c=kb(c);var f;try{for(c.s();!(f=c.n()).done;){var h=f.value;yc(h)?e.push(h):ea(h)&&d.push(h)}}catch(g){c.e(g)}finally{c.f()}a=a.concat(d);b=b.concat(e)},
-clearGlobalContexts:function(){b=[];a=[]},removeGlobalContexts:function(c){c=kb(c);var e;try{var d=function(){var c=e.value;yc(c)?b=b.filter(function(a){return!rb(a,c)}):ea(c)&&(a=a.filter(function(a){return!rb(a,c)}))};for(c.s();!(e=c.n()).done;)d()}catch(f){c.e(f)}finally{c.f()}},getApplicableContexts:function(c){c=c.build();var e=Na(c)&&"e"in c?"string"===typeof c.e:!1;if(e){c=nd({},c);try{null!=c&&sb(c,"ue_px",Kb)&&(c.ue_px=JSON.parse(Id(F(c,["ue_px"]))));var d=c}catch(g){d=c}c=d;e="string"===
-typeof F(c,"ue_px.data.schema")?F(c,"ue_px.data.schema"):"string"===typeof F(c,"ue_pr.data.schema")?F(c,"ue_pr.data.schema"):"string"===typeof F(c,"schema")?F(c,"schema"):"";var f=F(c,"e","");d=[];var h=tb(a,c,f,e);d.push.apply(d,qa(h));c=Ld(b,c,f,e);d.push.apply(d,qa(c));return d}return[]}}}function Md(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1;a=kb(a.slice(2));var c;try{for(a.s();!(c=a.n()).done;)if("*"===c.value)b=!0;else if(b)return!1}catch(e){a.e(e)}finally{a.f()}return!0}return 2==
-a.length?!0:!1}function zc(a){return(a=a.split("."))&&1<a.length?Md(a):!1}function Ac(a){a=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(a);if(null!==a&&zc(a[1]))return a.slice(1,6)}function Oa(a){if(a=Ac(a)){var b=a[0];return 5===a.length&&zc(b)}return!1}function Nd(a){return Array.isArray(a)&&a.every(function(a){return"string"===typeof a})}function Bc(a){return Nd(a)?a.every(function(a){return Oa(a)}):
-"string"===typeof a?Oa(a):!1}function Pa(a){return Na(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===D(a.data):!1}function Od(a){var b=0;if(Q(a)&&"[object Object]"==W(a)){var c=Pd(a);null===c?c=!0:(c=Qd.call(c,"constructor")&&c.constructor,c="function"==typeof c&&c instanceof c&&Cc.call(c)==Rd)}else c=!1;if(c){if(null!=a&&sb(a,"accept",Kb))if(Bc(a.accept))b+=1;else return!1;if(null!=a&&sb(a,"reject",Kb))if(Bc(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function Dc(a){return"function"===
-typeof a&&1>=a.length}function ea(a){return"function"===typeof a&&1>=a.length||Pa(a)}function Ec(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?Dc(a[0])&&Lb(a[1],ea):Dc(a[0])&&ea(a[1]):!1}function Fc(a){return Array.isArray(a)&&2===a.length?Od(a[0])?Array.isArray(a[1])?Lb(a[1],ea):ea(a[1]):!1:!1}function yc(a){return Ec(a)||Fc(a)}function Sd(a,b){var c=0,e=0,d=F(a,"accept");Array.isArray(d)?a.accept.some(function(a){return ub(a,b)})&&e++:"string"===typeof d&&ub(d,b)&&e++;d=F(a,"reject");
-Array.isArray(d)?a.reject.some(function(a){return ub(a,b)})&&c++:"string"===typeof d&&ub(d,b)&&c++;return 0<e&&0===c?!0:!1}function ub(a,b){if(!Oa(a))return!1;a=Ac(a);b=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(b);b=null!==b?b.slice(1,6):void 0;if(a&&b){if(!Td(a[0],b[0]))return!1;for(var c=1;5>c;c++)if(!Gc(a[c],b[c]))return!1;return!0}return!1}function Td(a,b){b=b.split(".");a=a.split(".");if(b&&a){if(b.length!==a.length)return!1;
-for(var c=0;c<a.length;c++)if(!Gc(b[c],a[c]))return!1;return!0}return!1}function Gc(a,b){return a&&b&&"*"===a||a===b}function Hc(a){return Array.isArray(a)?a:[a]}function tb(a,b,c,e){var d;a=Hc(a);a=ca(a,function(a){a:if(Pa(a))a=[a];else{if("function"===typeof a&&1>=a.length){b:{var d=void 0;try{d=a({event:b,eventType:c,eventSchema:e});if(Pa(d)||Array.isArray(d)&&Lb(d,Pa)){var g=d;break b}g=void 0;break b}catch(k){}g=void 0}if(Pa(g)){a=[g];break a}else if(Array.isArray(g)){a=g;break a}}a=void 0}if(a&&
-0!==a.length)return a});return(d=[]).concat.apply(d,qa(Ic(a)))}function Ld(a,b,c,e){var d;a=Hc(a);a=ca(a,function(a){a:{if(Ec(a)){var d=a[0],g=!1;try{g=d({event:b,eventType:c,eventSchema:e})}catch(k){g=!1}if(!0===g){a=tb(a[1],b,c,e);break a}}else if(Fc(a)&&Sd(a[0],e)){a=tb(a[1],b,c,e);break a}a=[]}if(a&&0!==a.length)return a});return(d=[]).concat.apply(d,qa(Ic(a)))}function Ud(a,b){var c=Kd(),e={};"undefined"===typeof a&&(a=!0);var d=function(a,b){var c={};b=b||{};for(var d in a)if(b[d]||null!==a[d]&&
-"undefined"!==typeof a[d])c[d]=a[d];return c},f=function(a,d,f,h){a.addDict(e);a.add("eid",Vd.v4());f=null==f?{type:"dtm",value:(new Date).getTime()}:"number"===typeof f?{type:"dtm",value:f}:"ttm"===f.type?{type:"ttm",value:f.value}:{type:"dtm",value:f.value||(new Date).getTime()};a.add(f.type,f.value.toString());f=c.getApplicableContexts(a);var g=[];d&&d.length&&g.push.apply(g,qa(d));f&&f.length&&g.push.apply(g,qa(f));d=g&&g.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
-data:g}:void 0;void 0!==d&&a.addJson("cx","co",d);"function"===typeof b&&b(a);try{h&&h(a.build())}catch(m){console.warn("Snowplow: error running custom callback")}return a},h=function(b,c,d,e){var g=za(a);b={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:b};g.add("e","ue");g.addJson("ue_px","ue_pr",b);return f(g,c,d,e)};return{addPayloadPair:function(a,b){e[a]=b},setBase64Encoding:function(b){a=b},addPayloadDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,
-b)&&(e[b]=a[b])},resetPayloadPairs:function(a){e=xc(a)?a:{}},setTrackerVersion:function(a){e.tv=a},setTrackerNamespace:function(a){e.tna=a},setAppId:function(a){e.aid=a},setPlatform:function(a){e.p=a},setUserId:function(a){e.uid=a},setScreenResolution:function(a,b){e.res=a+"x"+b},setViewport:function(a,b){e.vp=a+"x"+b},setColorDepth:function(a){e.cd=a},setTimezone:function(a){e.tz=a},setLang:function(a){e.lang=a},setIpAddress:function(a){e.ip=a},setUseragent:function(a){e.ua=a},trackUnstructEvent:h,
-trackSelfDescribingEvent:h,trackPageView:function(b,c,d,e,h,m){var g=za(a);g.add("e","pv");g.add("url",b);g.add("page",c);g.add("refr",d);return f(g,e,h,m)},trackPagePing:function(b,c,d,e,h,m,r,N,C,n){var g=za(a);g.add("e","pp");g.add("url",b);g.add("page",c);g.add("refr",d);g.add("pp_mix",e.toString());g.add("pp_max",h.toString());g.add("pp_miy",m.toString());g.add("pp_may",r.toString());return f(g,N,C,n)},trackStructEvent:function(b,c,d,e,h,m,r,N){var g=za(a);g.add("e","se");g.add("se_ca",b);g.add("se_ac",
-c);g.add("se_la",d);g.add("se_pr",e);g.add("se_va",null==h?void 0:h.toString());return f(g,m,r,N)},trackEcommerceTransaction:function(b,c,d,e,h,m,r,N,C,n,Jb,w){var g=za(a);g.add("e","tr");g.add("tr_id",b);g.add("tr_af",c);g.add("tr_tt",d);g.add("tr_tx",e);g.add("tr_sh",h);g.add("tr_ci",m);g.add("tr_st",r);g.add("tr_co",N);g.add("tr_cu",C);return f(g,n,Jb,w)},trackEcommerceTransactionItem:function(b,c,d,e,h,m,r,N,C,n){var g=za(a);g.add("e","ti");g.add("ti_id",b);g.add("ti_sk",c);g.add("ti_nm",d);g.add("ti_ca",
-e);g.add("ti_pr",h);g.add("ti_qu",m);g.add("ti_cu",r);return f(g,N,C,n)},trackScreenView:function(a,b,c,e,f){return h({schema:"iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0",data:d({name:a,id:b})},c,e,f)},trackLinkClick:function(a,b,c,e,f,m,r,N){a={schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:d({targetUrl:a,elementId:b,elementClasses:c,elementTarget:e,elementContent:f})};return h(a,m,r,N)},trackAdImpression:function(a,b,c,e,f,m,r,N,n,q,u){a={schema:"iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0",
-data:d({impressionId:a,costModel:b,cost:c,targetUrl:e,bannerId:f,zoneId:m,advertiserId:r,campaignId:N})};return h(a,n,q,u)},trackAdClick:function(a,b,c,e,f,m,r,n,C,q,u,w){a={schema:"iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0",data:d({targetUrl:a,clickId:b,costModel:c,cost:e,bannerId:f,zoneId:m,impressionId:r,advertiserId:n,campaignId:C})};return h(a,q,u,w)},trackAdConversion:function(a,b,c,e,f,m,r,n,C,q,u,w){a={schema:"iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0",
-data:d({conversionId:a,costModel:b,cost:c,category:e,action:f,property:m,initialValue:r,advertiserId:n,campaignId:C})};return h(a,q,u,w)},trackSocialInteraction:function(a,b,c,e,f,m){a={schema:"iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0",data:d({action:a,network:b,target:c})};return h(a,e,f,m)},trackAddToCart:function(a,b,c,e,f,m,r,n,q){return h({schema:"iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0",data:d({sku:a,name:b,category:c,unitPrice:e,quantity:f,
-currency:m})},r,n,q)},trackRemoveFromCart:function(a,b,c,e,f,m,r,n,q){return h({schema:"iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0",data:d({sku:a,name:b,category:c,unitPrice:e,quantity:f,currency:m})},r,n,q)},trackFormFocusOrChange:function(a,b,c,e,f,m,r,n,q,u){var g="";b={formId:b,elementId:c,nodeName:e,elementClasses:m,value:r};"change_form"===a?(g="iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0",b.type=f):"focus_form"===a&&(g="iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0",
-b.elementType=f);return h({schema:g,data:d(b,{value:!0})},n,q,u)},trackFormSubmission:function(a,b,c,e,f,m){return h({schema:"iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0",data:d({formId:a,formClasses:b,elements:c})},e,f,m)},trackSiteSearch:function(a,b,c,e,f,m,r){return h({schema:"iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0",data:d({terms:a,filters:b,totalResults:c,pageResults:e})},f,m,r)},trackConsentWithdrawn:function(a,b,c,e,f,m,r,n){b={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",
-data:d({id:b,version:c,name:e,description:f})};return h({schema:"iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0",data:d({all:a})},b.data&&m?m.concat([b]):m,r,n)},trackConsentGranted:function(a,b,c,e,f,m,r,n){a={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",data:d({id:a,version:b,name:c,description:e})};return h({schema:"iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0",data:d({expiry:f})},m?m.concat([a]):[a],r,n)},addGlobalContexts:function(a){c.addGlobalContexts(a)},
-clearGlobalContexts:function(){c.clearGlobalContexts()},removeGlobalContexts:function(a){c.removeGlobalContexts(a)}}}function Qa(a,b,c,e,d){function f(a){return-1<Sb.map(function(a){return a.toLowerCase()}).indexOf(a.toLowerCase())}function h(){Ra=tc(z.domain,A.location.href,dc());Ra[1]!==Aa&&(Mb=dc(Aa));Ma=cc(Ra[0]);Aa=Ra[1]}function g(){var a=(new Date).getTime();if(this.href){a="_sp="+(Nb+"."+a);var b=this.href.split("#"),c=b[0].split("?"),d=c.shift();if(c=c.join("?")){for(var e=!0,f=c.split("&"),
-g=0;g<f.length;g++)if("_sp="===f[g].substr(0,4)){e=!1;f[g]=a;c=f.join("&");break}e&&(c=a+"&"+c)}else c=a;b[0]=d+"?"+c;this.href=b.join("#")}}function k(a){for(var b=0;b<z.links.length;b++){var c=z.links[b];!c.spDecorationEnabled&&a(c)&&(q(c,"click",g,!0),q(c,"mousedown",g,!0),c.spDecorationEnabled=!0)}}function p(a){if(Qa){var b=/#.*/;a=a.replace(b,"")}Wa&&(b=/[{}]/g,a=a.replace(b,""));return a}function v(a){return(a=/^([a-z]+):/.exec(a))?a[1]:null}function n(a){a=Sa+a+"."+Ta;if("localStorage"==G){a:{try{var b=
-xa.getItem(a+".expires");if(null===b||+b>Date.now()){var c=xa.getItem(a);break a}else xa.removeItem(a),xa.removeItem(a+".expires");c=void 0;break a}catch(ef){}c=void 0}return c}if("cookie"==G||"cookieAndLocalStorage"==G)return J(a)}function m(){h();Ta=Lb((vb||Ma)+(Ea||"/")).slice(0,4)}function r(){Vb=(new Date).getTime()}function u(){var a=C(),b=a[0];b<Wb?Wb=b:b>Xb&&(Xb=b);a=a[1];a<Yb?Yb=a:a>Zb&&(Zb=a);r()}function C(){var a=z.compatMode&&"BackCompat"!==z.compatMode?z.documentElement:z.body;return[a.scrollLeft||
-A.pageXOffset,a.scrollTop||A.pageYOffset]}function B(){var a=C(),b=a[0];Xb=Wb=b;Zb=Yb=a=a[1]}function D(a){a=Math.round(a);if(!isNaN(a))return a}function w(){I(Sa+"ses."+Ta,"*",Ja)}function F(a,b,c,d,e,f){I(Sa+"id."+Ta,a+"."+b+"."+c+"."+d+"."+e+"."+f,kb)}function I(a,b,c){if(!fa||Ua)"localStorage"==G?Ub(a,b,c):("cookie"==G||"cookieAndLocalStorage"==G)&&J(a,b,c,Ea,vb,ja,oa)}function L(){var a=Sa+"id."+Ta,b=Sa+"ses."+Ta;rc(a);rc(b);J(a,"",-1,"/",vb,ja,oa);J(b,"",-1,"/",vb,ja,oa)}function Q(){if(!fa||
-Ua){var a="none"!=G&&!!n("ses"),b=R();b[1]?Nb=b[1]:(Nb=fa?"":P(),b[1]=Nb);T=b[6];a||(b[3]++,T=P(),b[6]=T,b[5]=b[4]);"none"!=G&&(w(),b[4]=Math.round((new Date).getTime()/1E3),b.shift(),F.apply(null,b))}}function R(){if("none"==G)return[];var a=Math.round((new Date).getTime()/1E3),b=n("id");b?(a=b.split("."),a.unshift("0")):a=["1",Nb,a,0,a,""];a[6]||(a[6]=P());return a}function W(a){return mb?"https://"+a:Hb?"http://"+a:("https:"===z.location.protocol?"https":"http")+"://"+a}function x(a){var b=ib.concat(a||
-[]);H.webPage&&b.push({schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:V()}});H.performanceTiming&&(a=ba())&&b.push(a);if(A.optimizely){H.optimizelySummary&&(a=ua(),O(a,function(a){b.push(a)}));H.optimizelyXSummary&&(a=ya(),O(a,function(a){b.push(a)}));if(H.optimizelyExperiments){var c=la();for(a=0;a<c.length;a++)b.push(c[a])}if(H.optimizelyStates)for(c=pa(),a=0;a<c.length;a++)b.push(c[a]);if(H.optimizelyVariations)for(c=qa(),a=0;a<c.length;a++)b.push(c[a]);H.optimizelyVisitor&&
-(a=ra())&&b.push(a);if(H.optimizelyAudiences)for(c=sa(),a=0;a<c.length;a++)b.push(c[a]);if(H.optimizelyDimensions)for(c=ta(),a=0;a<c.length;a++)b.push(c[a])}H.parrable&&(a=za())&&b.push(a);H.gdprBasis&&Va.gdprBasis&&(a=Va.gdprBasis?{schema:"iglu:com.snowplowanalytics.snowplow/gdpr/jsonschema/1-0-0",data:{basisForProcessing:Va.gdprBasis,documentId:Va.gdprDocId||null,documentVersion:Va.gdprDocVer||null,documentDescription:Va.gdprDocDesc||null}}:void 0,a&&b.push(a));H.clientHints&&Ba&&b.push({schema:"iglu:org.ietf/http_client_hints/jsonschema/1-0-0",
-data:Ba});return b}function Y(){Db&&null!=e.pageViewId||(e.pageViewId=P())}function V(){null==e.pageViewId&&(e.pageViewId=P());return e.pageViewId}function ba(){var a="navigationStart redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart secureConnectionStart connectEnd requestStart responseStart responseEnd unloadEventStart unloadEventEnd domLoading domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd msFirstPaint chromeFirstPaint requestEnd proxyStart proxyEnd".split(" "),
-b=A.performance||A.mozPerformance||A.msPerformance||A.webkitPerformance;if(b){var c={},d;for(d in b.timing)sc(d,a)&&null!==b.timing[d]&&(c[d]=b.timing[d]);delete c.requestEnd;return{schema:"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",data:c}}}function U(a,b){if(A.optimizely&&A.optimizely.data){var c=A.optimizely.data[a];"undefined"!==typeof b&&void 0!==c&&(c=c[b])}return c}function Z(a,b){if(A.optimizely&&"function"===typeof A.optimizely.get){var c=A.optimizely.get(a);"undefined"!==typeof b&&
-void 0!==c&&(c=c[b])}return c}function ka(){var a=U("state"),b=U("experiments");return ca(a&&b&&a.activeExperiments,function(c){var d=b[c];return{activeExperimentId:c.toString(),variation:a.variationIdsMap[c][0].toString(),conditional:d&&d.conditional,manual:d&&d.manual,name:d&&d.name}})}function E(){var a=Z("state"),b=a&&a.getActiveExperimentIds(),c=a&&a.getVariationMap(),d=Z("visitor");return ca(b,function(a){var b=c[a],e=b&&b.name&&b.name.toString()||null;b=b&&b.id;var f=d&&d.visitorId&&d.visitorId.toString()||
-null;return{experimentId:nb(a)||null,variationName:e,variation:nb(b)||null,visitorId:f}})}function la(){var a=U("experiments");if(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d={};d.id=c;var e=a[c];d.code=e.code;d.manual=e.manual;d.conditional=e.conditional;d.name=e.name;d.variationIds=e.variation_ids;b.push({schema:"iglu:com.optimizely/experiment/jsonschema/1-0-0",data:d})}return b}return[]}function pa(){var a=[],b=U("experiments");if(b)for(var c in b)b.hasOwnProperty(c)&&a.push(c);if(b=
-U("state")){c=[];for(var d=b.activeExperiments||[],e=0;e<a.length;e++){var f=a[e],g={};g.experimentId=f;g.isActive=sc(a[e],d);g.variationIndex=(b.variationMap||{})[f];g.variationName=(b.variationNamesMap||{})[f];var h=b.variationIdsMap||{};h[f]&&1===h[f].length&&(g.variationId=h[f][0]);c.push({schema:"iglu:com.optimizely/state/jsonschema/1-0-0",data:g})}return c}return[]}function qa(){var a=U("variations");if(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d={};d.id=c;var e=a[c];d.name=e.name;
-d.code=e.code;b.push({schema:"iglu:com.optimizely/variation/jsonschema/1-0-0",data:d})}return b}return[]}function ra(){var a=U("visitor");if(a){var b={};b.browser=a.browser;b.browserVersion=a.browserVersion;b.device=a.device;b.deviceType=a.deviceType;b.ip=a.ip;var c=a.platform||{};b.platformId=c.id;b.platformVersion=c.version;c=a.location||{};b.locationCity=c.city;b.locationRegion=c.region;b.locationCountry=c.country;b.mobile=a.mobile;b.mobileId=a.mobileId;b.referrer=a.referrer;b.os=a.os;return{schema:"iglu:com.optimizely/visitor/jsonschema/1-0-0",
-data:b}}}function sa(){var a=U("visitor","audiences");if(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push({schema:"iglu:com.optimizely/visitor_audience/jsonschema/1-0-0",data:{id:c,isMember:a[c]}});return b}return[]}function ta(){var a=U("visitor","dimensions");if(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push({schema:"iglu:com.optimizely/visitor_dimension/jsonschema/1-0-0",data:{id:c,value:a[c]}});return b}return[]}function ua(){return ca(ka(),function(a){return{schema:"iglu:com.optimizely.snowplow/optimizely_summary/jsonschema/1-0-0",
-data:a}})}function ya(){return ca(E(),function(a){return{schema:"iglu:com.optimizely.optimizelyx/summary/jsonschema/1-0-0",data:a}})}function za(){var a=window._hawk;if(a){var b={encryptedId:null,optout:null};b.encryptedId=a.browserid;a=new RegExp("(?:^|;)\\s?"+"_parrable_hawk_optout".replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")+"=(.*?)(?:;|$)","i");a=document.cookie.match(a);b.optout=a&&decodeURIComponent(a[1])?a&&decodeURIComponent(a[1]):"false";return{schema:"iglu:com.parrable/encrypted_payload/jsonschema/1-0-0",
-data:b}}}function ea(){!Cb&&S.geolocation&&S.geolocation.getCurrentPosition&&(Cb=!0,S.geolocation.getCurrentPosition(function(a){var b=a.coords;ib.push({schema:"iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0",data:{latitude:b.latitude,longitude:b.longitude,latitudeLongitudeAccuracy:b.accuracy,altitude:b.altitude,altitudeAccuracy:b.altitudeAccuracy,bearing:b.heading,speed:b.speed,timestamp:Math.round(a.timestamp)}})}))}function Fa(){var a={};O("__utma __utmb __utmc __utmv __utmz _ga".split(" "),
-function(b){var c=J(b);c&&(a[b]=c)});return{schema:"iglu:com.google.analytics/cookies/jsonschema/1-0-0",data:a}}function Ia(a,b,c,d,e){h();Eb&&Y();Eb=!0;wb=z.title;Ob=a;a=pc(Ob||wb);t.trackPageView(p(xb||Aa),a,p(da||Mb),x((b||[]).concat(c?c():[])),d,e);d=new Date;e=!1;if(X.enabled&&!X.installed){e=X.installed=!0;var f={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}}),c=function(){};
-window.addEventListener("testPassiveEventSupport",c,b);window.removeEventListener("testPassiveEventSupport",c,b);f.hasSupport=a}}};f.update();a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(f,"hasSupport")?q(z,a,r,{passive:!0}):q(z,a,r);B();a=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r;return function(a){return q(z,a,b)}};O("click mouseup mousedown mousemove keypress keydown keyup".split(" "),
-a(z));O(["resize","focus","blur"],a(A));a(A,u)("scroll")}if(X.enabled&&(ub||e)){Vb=d.getTime();for(var g in X.configurations)X.configurations.hasOwnProperty(g)&&(d=X.configurations[g],clearInterval(d.activityInterval),La(d,b,c))}}function La(a,b,c){var d=function(a,b){h();a({context:b,pageViewId:V(),minXOffset:Wb,minYOffset:Yb,maxXOffset:Xb,maxYOffset:Zb});B()},e=function(){Vb+a.configHeartBeatTimer>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]))};a.activityInterval=0!=a.configMinimumVisitLength?
-setTimeout(function(){Vb+a.configMinimumVisitLength>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]));a.activityInterval=setInterval(e,a.configHeartBeatTimer)},a.configMinimumVisitLength):setInterval(e,a.configHeartBeatTimer)}function wa(a,b,c){if("number"==typeof a&&a==ec(a)&&"number"==typeof b&&b==ec(b))return{configMinimumVisitLength:1E3*a,configHeartBeatTimer:1E3*b,activityInterval:null,callback:c};y("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartBeatDelay.");
-return{}}function Pa(a){var b=a.context,c=a.minXOffset,d=a.minYOffset,e=a.maxXOffset;a=a.maxYOffset;var f=z.title;f!==wb&&(wb=f,Ob=null);t.trackPagePing(p(xb||Aa),pc(Ob||wb),p(da||Mb),D(c),D(e),D(d),D(a),x(b))}function ia(a,b){return""!==a?a+b.charAt(0).toUpperCase()+b.slice(1):b}function K(a){var b,c,d=["","webkit","ms","moz"];if(!jb)for(c=0;c<d.length;c++){var e=d[c];if(z[ia(e,"hidden")]){"prerender"===z[ia(e,"visibilityState")]&&(b=!0);break}else if(!1===z[ia(e,"hidden")])break}b?q(z,e+"visibilitychange",
-function Xd(){z.removeEventListener(e+"visibilitychange",Xd,!1);a()}):a()}d=d||{};d.hasOwnProperty("post")?d.eventMethod=!0===d.post?"post":"get":d.eventMethod=d.eventMethod||"post";d.hasOwnProperty("useStm")||(d.useStm=!0);var Da=function(a){return a.hasOwnProperty("stateStorageStrategy")?a.stateStorageStrategy:Na||qb?Na&&qb?"cookieAndLocalStorage":Na?"cookie":"localStorage":"none"},ma=function(a){return a.hasOwnProperty("anonymousTracking")?!0===a.anonymousTracking.withSessionTracking:!1},na=function(a){return a.hasOwnProperty("anonymousTracking")?
-!0===a.anonymousTracking.withServerAnonymisation:!1},lb=Object.freeze({consent:"consent",contract:"contract",legalObligation:"legal_obligation",vitalInterests:"vital_interests",publicTask:"public_task",legitimateInterests:"legitimate_interests"}),t=Ud(!0,function(a){var b=Math.round((new Date).getTime()/1E3),c=n("ses"),d=R(),f=d[0],g=d[1],Wd=d[2],k=d[3],l=d[4],m=d[5];d=d[6];var v=Pb?!!J(Pb):!1;Ga||v?L():("0"===f?(T=d,c||"none"==G||(k++,m=l,T=P()),ha=k):(new Date).getTime()-Oa>1E3*Ja&&(T=P(),ha++),
-a.add("vp",wd()),a.add("ds",xd()),a.add("vid",Ua?ha:fa?null:ha),a.add("sid",Ua?T:fa?null:T),a.add("duid",fa?null:g),a.add("uid",fa?null:yb),h(),a.add("refr",p(da||Mb)),a.add("url",p(xb||Aa)),"none"!=G&&(F(g,Wd,ha,b,m,T),w()),Oa=(new Date).getTime());b=sb;c=new Date;f=Pb?!!J(Pb):!1;Ga||f||(Ca.enqueueRequest(a.build(),Qb),e.expireDateTime=c.getTime()+b)}),Ha=!1,l={},va={},Ka={},z=document,A=window,S=navigator,Ra=tc(z.domain,A.location.href,dc()),Ma=cc(Ra[0]),Aa=Ra[1],Mb=Ra[2],da,ob=d.hasOwnProperty("platform")?
-d.platform:"web",Qb,pb=d.hasOwnProperty("postPath")?d.postPath:"/com.snowplowanalytics.snowplow/tp2",rb=d.hasOwnProperty("appId")?d.appId:"",xb,wb=z.title,Ob,sb=d.hasOwnProperty("pageUnloadTimer")?d.pageUnloadTimer:500,ub=d.hasOwnProperty("resetActivityTrackingOnPageView")?d.resetActivityTrackingOnPageView:!0,Qa,Wa,Sa=d.hasOwnProperty("cookieName")?d.cookieName:"_sp_",vb=d.hasOwnProperty("cookieDomain")?d.cookieDomain:null,Ea="/",ja=d.hasOwnProperty("cookieSameSite")?d.cookieSameSite:"None",oa=d.hasOwnProperty("cookieSecure")?
-d.cookieSecure:!0,gb=S.doNotTrack||S.msDoNotTrack||A.doNotTrack,Ga=d.hasOwnProperty("respectDoNotTrack")?d.respectDoNotTrack&&("yes"===gb||"1"===gb):!1,Pb,jb,kb=d.hasOwnProperty("cookieLifetime")?d.cookieLifetime:63072E3,Ja=d.hasOwnProperty("sessionCookieTimeout")?d.sessionCookieTimeout:1800,Fb=z.characterSet||z.charset,mb=d.hasOwnProperty("forceSecureTracker")?!0===d.forceSecureTracker:!1,Hb=!mb&&d.hasOwnProperty("forceUnsecureTracker")?!0===d.forceUnsecureTracker:!1,Ua=ma(d),Rb=na(d),fa=!!d.anonymousTracking,
-qb=d.hasOwnProperty("useLocalStorage")?(y("argmap.useLocalStorage is deprecated. Use argmap.stateStorageStrategy instead."),d.useLocalStorage):!0,Na=d.hasOwnProperty("useCookies")?(y("argmap.useCookies is deprecated. Use argmap.stateStorageStrategy instead."),d.useCookies):!0,G=Da(d),Kb=S.userLanguage||S.language,$b=yd(),tb=a+"_"+b,Vb,Oa=(new Date).getTime(),Wb,Xb,Yb,Zb,Lb=Yd,Ta,Nb,T,ha=1,yb,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,hb,ac=[],zb=new zd(t,tb,x),bc=new Ad(t,tb,x),Bb=new Cd(t),Ca=new Ed(a,b,e,"localStorage"==
-G||"cookieAndLocalStorage"==G,d.eventMethod,pb,d.bufferSize,d.maxPostBytes||4E4,d.useStm,d.maxLocalStorageQueueSize||1E3,d.connectionTimeout||5E3,Rb),Cb=!1,H=d.contexts||{},ib=[],Ab=[],Db=!1,Eb=!1,X={enabled:!1,installed:!1,configurations:{}},Ba=null;H.clientHints&&S.userAgentData&&(Ba={isMobile:S.userAgentData.mobile,brands:S.userAgentData.brands},H.clientHints.includeHighEntropy&&S.userAgentData.getHighEntropyValues&&S.userAgentData.getHighEntropyValues(["platform","platformVersion","architecture",
-"model","uaFullVersion"]).then(function(a){Ba.architecture=a.architecture;Ba.model=a.model;Ba.platform=a.platform;Ba.uaFullVersion=a.uaFullVersion;Ba.platformVersion=a.platformVersion}));var Sb=d.skippedBrowserFeatures||[],Va={};d.hasOwnProperty("discoverRootDomain")&&d.discoverRootDomain&&(vb=td(ja,oa));H.gaCookies&&ib.push(Fa());H.geolocation&&ea();t.setBase64Encoding(d.hasOwnProperty("encodeBase64")?d.encodeBase64:!0);t.setTrackerVersion(c);t.setTrackerNamespace(b);t.setAppId(rb);t.setPlatform(ob);
-t.setTimezone(Zd.jstz.determine().name());t.addPayloadPair("lang",Kb);t.addPayloadPair("cs",Fb);for(var aa in $b)Object.prototype.hasOwnProperty.call($b,aa)&&("res"!==aa&&"cd"!==aa&&"cookie"!==aa||f(aa)?f(aa)||t.addPayloadPair("f_"+aa,$b[aa]):t.addPayloadPair(aa,$b[aa]));m();Q();d.crossDomainLinker&&k(d.crossDomainLinker);l.getDomainSessionIndex=function(){return ha};l.getPageViewId=function(){return V()};l.newSession=function(){var a=Math.round((new Date).getTime()/1E3),b=R(),c=b[1],d=b[2],e=b[3],
-f=b[4],g=b[5],h=b[6];"0"===b[0]?(T=h,"none"!=G&&(e++,g=f,T=P()),ha=e,w()):(T=P(),ha++);"none"!=G&&(F(c,d,ha,a,g,T),w());Oa=(new Date).getTime()};l.getCookieName=function(a){return Sa+a+"."+Ta};l.getUserId=function(){return yb};l.getDomainUserId=function(){return R()[1]};l.getDomainUserInfo=function(){return R()};l.getUserFingerprint=function(){y("User Fingerprinting is no longer supported. This function will be removed in a future release.");return 0};l.setAppId=function(a){y("setAppId is deprecated. Instead use the argmap argument on tracker initialisation: appId");
-t.setAppId(a)};l.setReferrerUrl=function(a){da=a};l.setCustomUrl=function(a){h();var b=Aa,c;v(a)?xb=a:"/"===a.slice(0,1)?xb=v(b)+"://"+Tb(b)+a:(b=p(b),0<=(c=b.indexOf("?"))&&(b=b.slice(0,c)),(c=b.lastIndexOf("/"))!==b.length-1&&(b=b.slice(0,c+1)),xb=b+a)};l.setDocumentTitle=function(a){wb=z.title;Ob=a};l.discardHashTag=function(a){Qa=a};l.discardBrace=function(a){Wa=a};l.setCookieNamePrefix=function(a){y("setCookieNamePrefix is deprecated. Instead use the argmap argument on tracker initialisation: cookieName");
-Sa=a};l.setCookieDomain=function(a){y("setCookieDomain is deprecated. Instead use the argmap argument on tracker initialisation: cookieDomain");vb=cc(a);m()};l.setCookiePath=function(a){Ea=a;m()};l.setVisitorCookieTimeout=function(a){kb=a};l.setSessionCookieTimeout=function(a){y("setSessionCookieTimeout is deprecated. Instead use the argmap argument on tracker initialisation: sessionCookieTimeout");Ja=a};l.setUserFingerprintSeed=function(){y("User Fingerprinting is no longer supported. This function will be removed in a future release.")};
-l.enableUserFingerprint=function(){y("User Fingerprinting is no longer supported. This function will be removed in a future release.")};l.respectDoNotTrack=function(a){y("respectDoNotTrack is deprecated. Instead use the argmap argument on tracker initialisation: respectDoNotTrack");var b=S.doNotTrack||S.msDoNotTrack;Ga=a&&("yes"===b||"1"===b)};l.crossDomainLinker=function(a){k(a)};l.enableLinkClickTracking=function(a,b,c,d){e.hasLoaded?(zb.configureLinkClickTracking(a,b,c,d),zb.addClickListeners()):
-e.registeredOnLoadHandlers.push(function(){zb.configureLinkClickTracking(a,b,c,d);zb.addClickListeners()})};l.refreshLinkClickTracking=function(){e.hasLoaded?zb.addClickListeners():e.registeredOnLoadHandlers.push(function(){zb.addClickListeners()})};l.enableActivityTracking=function(a,b){X.enabled=!0;X.configurations.pagePing=wa(a,b,Pa)};l.enableActivityTrackingCallback=function(a,b,c){X.enabled=!0;X.configurations.callback=wa(a,b,c)};l.updatePageActivity=function(){r()};l.enableFormTracking=function(a,
-b){e.hasLoaded?(bc.configureFormTracking(a),bc.addFormListeners(b)):e.registeredOnLoadHandlers.push(function(){bc.configureFormTracking(a);bc.addFormListeners(b)})};l.killFrame=function(){A.location!==A.top.location&&(A.top.location=A.location)};l.redirectFile=function(a){"file:"===A.location.protocol&&(A.location=a)};l.setOptOutCookie=function(a){Pb=a};l.setCountPreRendered=function(a){jb=a};l.setUserId=function(a){yb=a};l.identifyUser=function(a){l.setUserId(a)};l.setUserIdFromLocation=function(a){h();
-yb=Gb(a,Aa)};l.setUserIdFromReferrer=function(a){h();yb=Gb(a,Mb)};l.setUserIdFromCookie=function(a){yb=J(a)};l.setCollectorCf=function(a){Qb=W(a+".cloudfront.net");Ca.setCollectorUrl(Qb)};l.setCollectorUrl=function(a){Qb=W(a);Ca.setCollectorUrl(Qb)};l.setPlatform=function(a){y("setPlatform is deprecated. Instead use the argmap argument on tracker initialisation: platform");t.setPlatform(a)};l.encodeBase64=function(a){y("encodeBase64 is deprecated. Instead use the argmap argument on tracker initialisation: encodeBase64");
-t.setBase64Encoding(a)};l.flushBuffer=function(){Ca.executeQueue()};l.enableGeolocationContext=ea;l.trackPageView=function(a,b,c,d,e){K(function(){Ia(a,b,c,d,e)})};l.trackStructEvent=function(a,b,c,d,e,f,g,h){K(function(){t.trackStructEvent(a,b,c,d,e,x(f),g,h)})};l.trackSelfDescribingEvent=function(a,b,c,d){K(function(){t.trackSelfDescribingEvent(a,x(b),c,d)})};l.trackUnstructEvent=function(a,b,c){K(function(){t.trackSelfDescribingEvent(a,x(b),c)})};l.addTrans=function(a,b,c,d,e,f,g,h,k,l,p){Xa=a;
-Ya=b;Za=c;$a=d;ab=e;bb=f;cb=g;db=h;eb=k;fb=l;hb=p};l.addItem=function(a,b,c,d,e,f,g,h,k){ac.push({orderId:a,sku:b,name:c,category:d,price:e,quantity:f,currency:g,context:h,tstamp:k})};l.trackTrans=function(){K(function(){var a=hb;t.trackEcommerceTransaction(Xa,Ya,Za,$a,ab,bb,cb,db,eb,x(fb),a);for(a=0;a<ac.length;a++){var b=ac[a],c=b.tstamp;t.trackEcommerceTransactionItem(b.orderId,b.sku,b.name,b.category,b.price,b.quantity,b.currency,x(b.context),c)}hb=fb=eb=db=cb=bb=ab=$a=Za=Ya=Xa=void 0;ac=[]})};
-l.trackLinkClick=function(a,b,c,d,e,f,g){K(function(){t.trackLinkClick(a,b,c,d,e,x(f),g)})};l.trackAdImpression=function(a,b,c,d,e,f,g,h,k,l){K(function(){t.trackAdImpression(a,b,c,d,e,f,g,h,x(k),l)})};l.trackAdClick=function(a,b,c,d,e,f,g,h,k,l,p){K(function(){t.trackAdClick(a,b,c,d,e,f,g,h,k,x(l),p)})};l.trackAdConversion=function(a,b,c,d,e,f,g,h,k,l,p){K(function(){t.trackAdConversion(a,b,c,d,e,f,g,h,k,x(l),p)})};l.trackSocialInteraction=function(a,b,c,d,e){K(function(){t.trackSocialInteraction(a,
-b,c,x(d),e)})};l.trackAddToCart=function(a,b,c,d,e,f,g,h){K(function(){t.trackAddToCart(a,b,c,d,e,f,x(g),h)})};l.trackRemoveFromCart=function(a,b,c,d,e,f,g,h){K(function(){t.trackRemoveFromCart(a,b,c,d,e,f,x(g),h)})};l.trackSiteSearch=function(a,b,c,d,e,f){K(function(){t.trackSiteSearch(a,b,c,d,x(e),f)})};l.trackTiming=function(a,b,c,d,e,f){K(function(){t.trackSelfDescribingEvent({schema:"iglu:com.snowplowanalytics.snowplow/timing/jsonschema/1-0-0",data:{category:a,variable:b,timing:c,label:d}},x(e),
-f)})};l.trackConsentWithdrawn=function(a,b,c,d,e,f,g){K(function(){t.trackConsentWithdrawn(a,b,c,d,e,x(f),g)})};l.trackConsentGranted=function(a,b,c,d,e,f,g){K(function(){t.trackConsentGranted(a,b,c,d,e,x(f),g)})};l.trackEnhancedEcommerceAction=function(a,b,c){var d=Ab.concat(b||[]);Ab.length=0;K(function(){t.trackSelfDescribingEvent({schema:"iglu:com.google.analytics.enhanced-ecommerce/action/jsonschema/1-0-0",data:{action:a}},x(d),c)})};l.addEnhancedEcommerceActionContext=function(a,b,c,d,e,f,g,
-h,k,l){Ab.push({schema:"iglu:com.google.analytics.enhanced-ecommerce/actionFieldObject/jsonschema/1-0-0",data:{id:a,affiliation:b,revenue:Ib(c),tax:Ib(d),shipping:Ib(e),coupon:f,list:g,step:nb(h),option:k,currency:l}})};l.addEnhancedEcommerceImpressionContext=function(a,b,c,d,e,f,g,h,k){Ab.push({schema:"iglu:com.google.analytics.enhanced-ecommerce/impressionFieldObject/jsonschema/1-0-0",data:{id:a,name:b,list:c,brand:d,category:e,variant:f,position:nb(g),price:Ib(h),currency:k}})};l.addEnhancedEcommerceProductContext=
-function(a,b,c,d,e,f,g,h,k,l,p){Ab.push({schema:"iglu:com.google.analytics.enhanced-ecommerce/productFieldObject/jsonschema/1-0-0",data:{id:a,name:b,list:c,brand:d,category:e,variant:f,price:Ib(g),quantity:nb(h),coupon:k,position:nb(l),currency:p}})};l.addEnhancedEcommercePromoContext=function(a,b,c,d,e){Ab.push({schema:"iglu:com.google.analytics.enhanced-ecommerce/promoFieldObject/jsonschema/1-0-0",data:{id:a,name:b,creative:c,position:d,currency:e}})};l.enableGdprContext=function(a){var b=1<arguments.length&&
-void 0!==arguments[1]?arguments[1]:null,c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,e=lb[a];e?(H.gdprBasis=!0,Va={gdprBasis:e,gdprDocId:b,gdprDocVer:c,gdprDocDesc:d}):y("enableGdprContext failed. basisForProcessing must be set to one of: consent, legalObligation, vitalInterests publicTask, legitimateInterests")};l.addGlobalContexts=function(a){t.addGlobalContexts(a)};l.removeGlobalContexts=function(a){t.removeGlobalContexts(a)};
-l.clearGlobalContexts=function(){t.clearGlobalContexts()};l.enableErrorTracking=function(a,b){Bb.enableErrorTracking(a,b,x())};l.trackError=function(a,b,c,d,e,f){f=x(f);Bb.trackError(a,b,c,d,e,f)};l.preservePageViewId=function(){Db=!0};l.disableAnonymousTracking=function(a){a?(d.stateStorageStrategy=a,d.anonymousTracking=!1,G=Da(d)):d.anonymousTracking=!1;fa=!!d.anonymousTracking;Ua=ma(d);Rb=na(d);Ca.setUseLocalStorage("localStorage"==G||"cookieAndLocalStorage"==G);Ca.setAnonymousTracking(Rb);Q();
-Ca.executeQueue()};l.enableAnonymousTracking=function(a){d.anonymousTracking=a||!0;fa=!!d.anonymousTracking;Ua=ma(d);Rb=na(d);Ua||Y();Ca.setAnonymousTracking(Rb)};l.clearUserData=L;l.setDebug=function(a){Ka=(Ha=(!!a).valueOf())?l:va};va=Gd(l);return Ka=Ha?l:va}function Jc(a,b){function c(){var a;if(!f.hasLoaded)for(f.hasLoaded=!0,a=0;a<f.registeredOnLoadHandlers.length;a++)f.registeredOnLoadHandlers[a]();return!0}var e=document,d=window,f={outQueues:[],bufferFlushers:[],expireDateTime:null,hasLoaded:!1,
-registeredOnLoadHandlers:[],pageViewId:null};d.Snowplow={getTrackerCf:function(a){var c=new Qa(b,"","js-2.17.3",f,{});c.setCollectorCf(a);return c},getTrackerUrl:function(a){var c=new Qa(b,"","js-2.17.3",f,{});c.setCollectorUrl(a);return c},getAsyncTracker:function(){return new Qa(b,"","js-2.17.3",f,{})}};q(d,"beforeunload",function(){O(f.bufferFlushers,function(a){a()});if(f.expireDateTime){do{var a=new Date;if(0===Array.prototype.filter.call(f.outQueues,function(a){return 0<a.length}).length)break}while(a.getTime()<
-f.expireDateTime)}},!1);(function(){var a;e.addEventListener?q(e,"DOMContentLoaded",function k(){e.removeEventListener("DOMContentLoaded",k,!1);c()}):e.attachEvent&&(e.attachEvent("onreadystatechange",function k(){"complete"===e.readyState&&(e.detachEvent("onreadystatechange",k),c())}),e.documentElement.doScroll&&d===d.top&&function p(){if(!f.hasLoaded){try{e.documentElement.doScroll("left")}catch(v){setTimeout(p,0);return}c()}}());/WebKit/.test(navigator.userAgent)&&(a=setInterval(function(){if(f.hasLoaded||
-/loaded|complete/.test(e.readyState))clearInterval(a),c()},10));q(d,"load",c,!1)})();return new ud(Qa,"js-2.17.3",f,a,b)}var $d=function(a,b){for(var c=-1,e=null==a?0:a.length;++c<e&&!1!==b(a[c],c,a););return a},ae=function(a){return function(b,c,e){var d=-1,f=Object(b);e=e(b);for(var h=e.length;h--;){var g=e[a?h:++d];if(!1===c(f[g],g,f))break}return b}}(),Wa="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?
-self:{},Kc="object"==D(Wa)&&Wa&&Wa.Object===Object&&Wa,be="object"==("undefined"===typeof self?"undefined":D(self))&&self&&self.Object===Object&&self,L=Kc||be||Function("return this")(),Y=L.Symbol,Lc=Object.prototype,ce=Lc.hasOwnProperty,de=Lc.toString,ia=Y?Y.toStringTag:void 0,ee=Object.prototype.toString,Mc=Y?Y.toStringTag:void 0,W=function(a){if(null==a)a=void 0===a?"[object Undefined]":"[object Null]";else if(Mc&&Mc in Object(a)){var b=ce.call(a,ia),c=a[ia];try{a[ia]=void 0;var e=!0}catch(f){}var d=
-de.call(a);e&&(b?a[ia]=c:delete a[ia]);a=d}else a=ee.call(a);return a},Q=function(a){return null!=a&&"object"==D(a)},Nc=function(a){return Q(a)&&"[object Arguments]"==W(a)},Oc=Object.prototype,fe=Oc.hasOwnProperty,ge=Oc.propertyIsEnumerable,Pc=Nc(function(){return arguments}())?Nc:function(a){return Q(a)&&fe.call(a,"callee")&&!ge.call(a,"callee")},u=Array.isArray,he=function(){return!1},Ja=ra(function(a,b){var c=(b=b&&!b.nodeType&&b)&&a&&!a.nodeType&&a;b=c&&c.exports===b?L.Buffer:void 0;a.exports=
-(b?b.isBuffer:void 0)||he}),ie=/^(?:0|[1-9]\d*)$/,Xa=function(a,b){var c=D(a);b=null==b?9007199254740991:b;return!!b&&("number"==c||"symbol"!=c&&ie.test(a))&&-1<a&&0==a%1&&a<b},Ya=function(a){return"number"==typeof a&&-1<a&&0==a%1&&9007199254740991>=a},n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0;n["[object Arguments]"]=
-n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1;var je=function(a){return Q(a)&&Ya(a.length)&&!!n[W(a)]},ke=function(a){return function(b){return a(b)}},Qc=ra(function(a,b){var c=b&&!b.nodeType&&b;c=(b=c&&a&&!a.nodeType&&a)&&b.exports===c&&Kc.process;
-a:{try{var e=b&&b.require&&b.require("util").types;if(e){var d=e;break a}d=c&&c.binding&&c.binding("util");break a}catch(f){}d=void 0}a.exports=d}),Rc=Qc&&Qc.isTypedArray,hc=Rc?ke(Rc):je,le=Object.prototype.hasOwnProperty,me=Object.prototype,Sc=function(a,b){return function(c){return a(b(c))}},ne=Sc(Object.keys,Object),oe=Object.prototype.hasOwnProperty,I=function(a){var b=D(a);return null!=a&&("object"==b||"function"==b)},Tc=function(a){if(!I(a))return!1;a=W(a);return"[object Function]"==a||"[object GeneratorFunction]"==
-a||"[object AsyncFunction]"==a||"[object Proxy]"==a},Da=function(a){return null!=a&&Ya(a.length)&&!Tc(a)},La=function(a){if(Da(a)){var b=u(a),c=!b&&Pc(a),e=!b&&!c&&Ja(a),d=!b&&!c&&!e&&hc(a);if(b=b||c||e||d){c=a.length;for(var f=String,h=-1,g=Array(c);++h<c;)g[h]=f(h);c=g}else c=[];f=c.length;for(var k in a)!le.call(a,k)||b&&("length"==k||e&&("offset"==k||"parent"==k)||d&&("buffer"==k||"byteLength"==k||"byteOffset"==k)||Xa(k,f))||c.push(k);a=c}else if(k=a&&a.constructor,a===("function"==typeof k&&
-k.prototype||me)){k=[];for(e in Object(a))oe.call(a,e)&&"constructor"!=e&&k.push(e);a=k}else a=ne(a);return a},Uc=function(a,b){return a&&ae(a,b,La)},Ea=function(a,b){return function(c,e){if(null==c)return c;if(!Da(c))return a(c,e);for(var d=c.length,f=b?d:-1,h=Object(c);(b?f--:++f<d)&&!1!==e(h[f],f,h););return c}}(Uc),Vc=function(a){return a},O=function(a,b){return(u(a)?$d:Ea)(a,"function"==typeof b?b:Vc)},Wc=function(a,b){for(var c=-1,e=null==a?0:a.length,d=0,f=[];++c<e;){var h=a[c];b(h,c,a)&&(f[d++]=
-h)}return f},pe=function(a,b){var c=[];Ea(a,function(a,d,f){b(a,d,f)&&c.push(a)});return c},Za=function(a,b){return a===b||a!==a&&b!==b},ja=function(a,b){for(var c=a.length;c--;)if(Za(a[c][0],b))return c;return-1},qe=Array.prototype.splice;sa.prototype.clear=function(){this.__data__=[];this.size=0};sa.prototype["delete"]=function(a){var b=this.__data__;a=ja(b,a);if(0>a)return!1;a==b.length-1?b.pop():qe.call(b,a,1);--this.size;return!0};sa.prototype.get=function(a){var b=this.__data__;a=ja(b,a);return 0>
-a?void 0:b[a][1]};sa.prototype.has=function(a){return-1<ja(this.__data__,a)};sa.prototype.set=function(a,b){var c=this.__data__,e=ja(c,a);0>e?(++this.size,c.push([a,b])):c[e][1]=b;return this};var lb=sa,$a=L["__core-js_shared__"],Xc=function(){var a=/[^.]+$/.exec($a&&$a.keys&&$a.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),re=Function.prototype.toString,ka=function(a){if(null!=a){try{return re.call(a)}catch(b){}return a+""}return""},se=/^\[object .+?Constructor\]$/,te=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,
-"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),la=function(a,b){a=null==a?void 0:a[b];return(!I(a)||Xc&&Xc in a?0:(Tc(a)?te:se).test(ka(a)))?a:void 0},ma=la(L,"Map"),na=la(Object,"create"),ue=Object.prototype.hasOwnProperty,ve=Object.prototype.hasOwnProperty;ba.prototype.clear=function(){this.__data__=na?na(null):{};this.size=0};ba.prototype["delete"]=function(a){a=this.has(a)&&delete this.__data__[a];this.size-=a?1:0;return a};ba.prototype.get=function(a){var b=
-this.__data__;return na?(a=b[a],"__lodash_hash_undefined__"===a?void 0:a):ue.call(b,a)?b[a]:void 0};ba.prototype.has=function(a){var b=this.__data__;return na?void 0!==b[a]:ve.call(b,a)};ba.prototype.set=function(a,b){var c=this.__data__;this.size+=this.has(a)?0:1;c[a]=na&&void 0===b?"__lodash_hash_undefined__":b;return this};var oa=function(a,b){a=a.__data__;var c=D(b);return("string"==c||"number"==c||"symbol"==c||"boolean"==c?"__proto__"!==b:null===b)?a["string"==typeof b?"string":"hash"]:a.map};
-ta.prototype.clear=function(){this.size=0;this.__data__={hash:new ba,map:new (ma||lb),string:new ba}};ta.prototype["delete"]=function(a){a=oa(this,a)["delete"](a);this.size-=a?1:0;return a};ta.prototype.get=function(a){return oa(this,a).get(a)};ta.prototype.has=function(a){return oa(this,a).has(a)};ta.prototype.set=function(a,b){var c=oa(this,a),e=c.size;c.set(a,b);this.size+=c.size==e?0:1;return this};var va=ta;ua.prototype.clear=function(){this.__data__=new lb;this.size=0};ua.prototype["delete"]=
-function(a){var b=this.__data__;a=b["delete"](a);this.size=b.size;return a};ua.prototype.get=function(a){return this.__data__.get(a)};ua.prototype.has=function(a){return this.__data__.has(a)};ua.prototype.set=function(a,b){var c=this.__data__;if(c instanceof lb){var e=c.__data__;if(!ma||199>e.length)return e.push([a,b]),this.size=++c.size,this;c=this.__data__=new va(e)}c.set(a,b);this.size=c.size;return this};var Ka=ua;Ha.prototype.add=Ha.prototype.push=function(a){this.__data__.set(a,"__lodash_hash_undefined__");
-return this};Ha.prototype.has=function(a){return this.__data__.has(a)};var we=function(a,b){for(var c=-1,e=null==a?0:a.length;++c<e;)if(b(a[c],c,a))return!0;return!1},ic=function(a,b,c,e,d,f){var h=c&1,g=a.length,k=b.length;if(g!=k&&!(h&&k>g))return!1;k=f.get(a);var p=f.get(b);if(k&&p)return k==b&&p==a;k=-1;p=!0;var n=c&2?new Ha:void 0;f.set(a,b);for(f.set(b,a);++k<g;){var q=a[k],m=b[k];if(e)var r=h?e(m,q,k,b,a,f):e(q,m,k,a,b,f);if(void 0!==r){if(r)continue;p=!1;break}if(n){if(!we(b,function(a,b){if(!n.has(b)&&
-(q===a||d(q,a,c,e,f)))return n.push(b)})){p=!1;break}}else if(q!==m&&!d(q,m,c,e,f)){p=!1;break}}f["delete"](a);f["delete"](b);return p},Yc=L.Uint8Array,xe=function(a){var b=-1,c=Array(a.size);a.forEach(function(a,d){c[++b]=[d,a]});return c},ye=function(a){var b=-1,c=Array(a.size);a.forEach(function(a){c[++b]=a});return c},Zc=Y?Y.prototype:void 0,ab=Zc?Zc.valueOf:void 0,od=function(a,b,c,e,d,f,h){switch(c){case "[object DataView]":if(a.byteLength!=b.byteLength||a.byteOffset!=b.byteOffset)break;a=a.buffer;
-b=b.buffer;case "[object ArrayBuffer]":if(a.byteLength!=b.byteLength||!f(new Yc(a),new Yc(b)))break;return!0;case "[object Boolean]":case "[object Date]":case "[object Number]":return Za(+a,+b);case "[object Error]":return a.name==b.name&&a.message==b.message;case "[object RegExp]":case "[object String]":return a==b+"";case "[object Map]":var g=xe;case "[object Set]":g||(g=ye);if(a.size!=b.size&&!(e&1))break;if(c=h.get(a))return c==b;e|=2;h.set(a,b);b=ic(g(a),g(b),e,d,f,h);h["delete"](a);return b;
-case "[object Symbol]":if(ab)return ab.call(a)==ab.call(b)}return!1},kc=function(a,b,c){b=b(a);if(!u(a)){a=c(a);c=-1;for(var e=a.length,d=b.length;++c<e;)b[d+c]=a[c]}return b},ze=function(){return[]},Ae=Object.prototype.propertyIsEnumerable,$c=Object.getOwnPropertySymbols,lc=$c?function(a){if(null==a)return[];a=Object(a);return Wc($c(a),function(b){return Ae.call(a,b)})}:ze,pd=Object.prototype.hasOwnProperty,bb=la(L,"DataView"),cb=la(L,"Promise"),db=la(L,"Set"),eb=la(L,"WeakMap"),Be=ka(bb),Ce=ka(ma),
-De=ka(cb),Ee=ka(db),Fe=ka(eb),pa=W;if(bb&&"[object DataView]"!=pa(new bb(new ArrayBuffer(1)))||ma&&"[object Map]"!=pa(new ma)||cb&&"[object Promise]"!=pa(cb.resolve())||db&&"[object Set]"!=pa(new db)||eb&&"[object WeakMap]"!=pa(new eb))pa=function(a){var b=W(a);if(a=(a="[object Object]"==b?a.constructor:void 0)?ka(a):"")switch(a){case Be:return"[object DataView]";case Ce:return"[object Map]";case De:return"[object Promise]";case Ee:return"[object Set]";case Fe:return"[object WeakMap]"}return b};var gc=
-pa,jc=Object.prototype.hasOwnProperty,rb=Ia,Ge=function(a,b,c,e){var d=c.length,f=d,h=!e;if(null==a)return!f;for(a=Object(a);d--;){var g=c[d];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++d<f;){g=c[d];var k=g[0],p=a[k],n=g[1];if(h&&g[2]){if(void 0===p&&!(k in a))return!1}else{g=new Ka;if(e)var q=e(p,n,k,a,b,g);if(void 0===q?!rb(n,p,3,e,g):!q)return!1}}return!0},He=function(a){for(var b=La(a),c=b.length;c--;){var e=b[c],d=a[e];b[c]=[e,d,d===d&&!I(d)]}return b},ad=function(a,b){return function(c){return null==
-c?!1:c[a]===b&&(void 0!==b||a in Object(c))}},Ie=function(a){var b=He(a);return 1==b.length&&b[0][2]?ad(b[0][0],b[0][1]):function(c){return c===a||Ge(c,a,b)}},Ma=function(a){return"symbol"==D(a)||Q(a)&&"[object Symbol]"==W(a)},Je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,fb=function(a,b){if(u(a))return!1;var c=D(a);return"number"==c||"symbol"==c||"boolean"==c||null==a||Ma(a)?!0:Ke.test(a)||!Je.test(a)||null!=b&&a in Object(b)};Fb.Cache=va;var Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
-Me=/\\(\\)?/g,Ne=function(a){a=Fb(a,function(a){500===b.size&&b.clear();return a});var b=a.cache;return a}(function(a){var b=[];46===a.charCodeAt(0)&&b.push("");a.replace(Le,function(a,e,d,f){b.push(d?f.replace(Me,"$1"):e||a)});return b}),nc=function(a,b){for(var c=-1,e=null==a?0:a.length,d=Array(e);++c<e;)d[c]=b(a[c],c,a);return d},qd=1/0,bd=Y?Y.prototype:void 0,oc=bd?bd.toString:void 0,cd=function(a,b){return u(a)?a:fb(a,b)?[a]:Ne(null==a?"":mc(a))},Oe=1/0,gb=function(a){if("string"==typeof a||
-Ma(a))return a;var b=a+"";return"0"==b&&1/a==-Oe?"-0":b},dd=function(a,b){b=cd(b,a);for(var c=0,e=b.length;null!=a&&c<e;)a=a[gb(b[c++])];return c&&c==e?a:void 0},F=function(a,b,c){a=null==a?void 0:dd(a,b);return void 0===a?c:a},Pe=function(a,b){return null!=a&&b in Object(a)},sb=function(a,b,c){b=cd(b,a);for(var e=-1,d=b.length,f=!1;++e<d;){var h=gb(b[e]);if(!(f=null!=a&&c(a,h)))break;a=a[h]}if(f||++e!=d)return f;d=null==a?0:a.length;return!!d&&Ya(d)&&Xa(h,d)&&(u(a)||Pc(a))},Qe=function(a,b){return fb(a)&&
-b===b&&!I(b)?ad(gb(a),b):function(c){var e=F(c,a);return void 0===e&&e===b?null!=c&&sb(c,a,Pe):rb(b,e,3)}},Re=function(a){return function(b){return null==b?void 0:b[a]}},Se=function(a){return function(b){return dd(b,a)}},Fa=function(a){return"function"==typeof a?a:null==a?Vc:"object"==D(a)?u(a)?Qe(a[0],a[1]):Ie(a):fb(a)?Re(gb(a)):Se(a)},rd=function(a,b){return(u(a)?Wc:pe)(a,Fa(b))},qc=function(a){return"string"==typeof a||!u(a)&&Q(a)&&"[object String]"==W(a)},Te=function(a,b){var c=-1,e=Da(a)?Array(a.length):
-[];Ea(a,function(a,f,h){e[++c]=b(a,f,h)});return e},ca=function(a,b){return(u(a)?nc:Te)(a,Fa(b))},Z=window,wa=document,xa=window.localStorage,wc=window.sessionStorage,ed=0/0,Ue=/^\s+|\s+$/g,Ve=/^[-+]0x[0-9a-f]+$/i,We=/^0b[01]+$/i,Xe=/^0o[0-7]+$/i,Ye=parseInt,Ze=function(a){if("number"==typeof a)return a;if(Ma(a))return ed;I(a)&&(a="function"==typeof a.valueOf?a.valueOf():a,a=I(a)?a+"":a);if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Ue,"");var b=We.test(a);return b||Xe.test(a)?Ye(a.slice(2),
-b?2:8):Ve.test(a)?ed:+a},fd=1/0,ec=function(a){a?(a=Ze(a),a=a===fd||a===-fd?1.7976931348623157E308*(0>a?-1:1):a===a?a:0):a=0===a?a:0;var b=a%1;return a===a?b?a-b:a:0},Zd=ra(function(a,b){(function(a){var c=function(){var a=function(a){a=-a.getTimezoneOffset();return null!==a?a:0},b=function(a,b,c){var d=new Date;void 0!==a&&d.setFullYear(a);d.setMonth(b);d.setDate(c);return d};return{determine:function(){var d=a(b(void 0,0,2)),e=a(b(void 0,5,2)),f=d-e;return new c.TimeZone(c.olson.timezones[0>f?d+
-",1":0<f?e+",1,s":d+",0"])},date_is_dst:function(c){var d=7<c.getMonth(),e=d?a(b(c.getFullYear(),5,2)):a(b(c.getFullYear(),0,2));c=a(c);c=e-c;return 0>e||d?0!==c:0>c},dst_start_for:function(a){var b=new Date(2010,6,15,1,0,0,0);return{"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,
-3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Europe/Helsinki":new Date(2013,2,31,5,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,
-2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":b,"Asia/Amman":new Date(2013,2,29,1,0,0,0),"Asia/Beirut":new Date(2013,2,31,2,0,0,0),"Asia/Damascus":new Date(2013,3,6,2,0,0,0),"Asia/Jerusalem":new Date(2013,2,29,5,0,0,0),"Asia/Yekaterinburg":b,"Asia/Omsk":b,"Asia/Krasnoyarsk":b,"Asia/Irkutsk":b,"Asia/Yakutsk":b,"Asia/Vladivostok":b,"Asia/Baku":new Date(2013,2,31,4,0,0),"Asia/Yerevan":new Date(2013,2,31,3,0,0),"Asia/Kamchatka":b,
-"Asia/Gaza":new Date(2010,2,27,4,0,0),"Africa/Cairo":new Date(2010,4,1,3,0,0),"Europe/Minsk":b,"Pacific/Apia":new Date(2010,10,1,1,0,0,0),"Pacific/Fiji":new Date(2010,11,1,0,0,0),"Australia/Perth":new Date(2008,10,1,1,0,0,0)}[a]}}}();c.TimeZone=function(a){var b={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo",
-"America/Sao_Paulo"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Asia/Beirut","Europe/Helsinki","Asia/Damascus"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],
-"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk"],"Asia/Baku":["Asia/Yerevan","Asia/Baku"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]},d=a;a=function(){for(var a=b[d],e=a.length,f=0,h;f<e;f+=1)if(h=a[f],c.date_is_dst(c.dst_start_for(h))){d=h;break}};"undefined"!==
-typeof b[d]&&a();return{name:function(){return d}}};c.olson={};c.olson.timezones={"-720,0":"Pacific/Majuro","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York",
-"-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Santiago","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg",
-"180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin",
-"570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"};b.jstz=c})()}),ya=window,R=navigator,qb=screen,pb=document,hb=ra(function(a){(function(){var b={rotl:function(a,
-b){return a<<b|a>>>32-b},rotr:function(a,b){return a<<32-b|a>>>b},endian:function(a){if(a.constructor==Number)return b.rotl(a,8)&16711935|b.rotl(a,24)&4278255360;for(var c=0;c<a.length;c++)a[c]=b.endian(a[c]);return a},randomBytes:function(a){for(var b=[];0<a;a--)b.push(Math.floor(256*Math.random()));return b},bytesToWords:function(a){for(var b=[],c=0,f=0;c<a.length;c++,f+=8)b[f>>>5]|=a[c]<<24-f%32;return b},wordsToBytes:function(a){for(var b=[],c=0;c<32*a.length;c+=8)b.push(a[c>>>5]>>>24-c%32&255);
-return b},bytesToHex:function(a){for(var b=[],c=0;c<a.length;c++)b.push((a[c]>>>4).toString(16)),b.push((a[c]&15).toString(16));return b.join("")},hexToBytes:function(a){for(var b=[],c=0;c<a.length;c+=2)b.push(parseInt(a.substr(c,2),16));return b},bytesToBase64:function(a){for(var b=[],c=0;c<a.length;c+=3)for(var f=a[c]<<16|a[c+1]<<8|a[c+2],h=0;4>h;h++)8*c+6*h<=8*a.length?b.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-h)&63)):b.push("=");return b.join("")},
-base64ToBytes:function(a){a=a.replace(/[^A-Z0-9+\/]/ig,"");for(var b=[],c=0,f=0;c<a.length;f=++c%4)0!=f&&b.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c))>>>6-2*f);return b}};a.exports=b})()}),Bb={utf8:{stringToBytes:function(a){return Bb.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(Bb.bin.bytesToString(a)))}},
-bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},gd=Bb,Yd=ra(function(a){(function(){var b=gd.utf8,c=gd.bin,e=function(a){a.constructor==String&&(a=b.stringToBytes(a));var c=hb.bytesToWords(a),d=8*a.length;a=[];var e=1732584193,f=-271733879,n=-1732584194,q=271733878,m=-1009589776;c[d>>5]|=128<<24-d%32;c[(d+64>>>9<<4)+15]=d;for(d=0;d<c.length;d+=
-16){for(var r=e,u=f,C=n,B=q,D=m,w=0;80>w;w++){if(16>w)a[w]=c[d+w];else{var y=a[w-3]^a[w-8]^a[w-14]^a[w-16];a[w]=y<<1|y>>>31}y=(e<<5|e>>>27)+m+(a[w]>>>0)+(20>w?(f&n|~f&q)+1518500249:40>w?(f^n^q)+1859775393:60>w?(f&n|f&q|n&q)-1894007588:(f^n^q)-899497514);m=q;q=n;n=f<<30|f>>>2;f=e;e=y}e+=r;f+=u;n+=C;q+=B;m+=D}return[e,f,n,q,m]},d=function(a,b){a=hb.wordsToBytes(e(a));return b&&b.asBytes?a:b&&b.asString?c.bytesToString(a):hb.bytesToHex(a)};d._blocksize=16;d._digestsize=20;a.exports=d})()}),$e=Math.max,
-Bd=function(a){return function(b,c,e){var d=Object(b);if(!Da(b)){var f=Fa(c);b=La(b);c=function(a){return f(d[a],a,d)}}c=a(b,c,e);return-1<c?d[f?b[c]:c]:void 0}}(function(a,b,c){var e=null==a?0:a.length;if(!e)return-1;c=null==c?0:ec(c);0>c&&(c=$e(e+c,0));a:{b=Fa(b);e=a.length;for(c+=-1;++c<e;)if(b(a[c],c,a)){a=c;break a}a=-1}return a}),Dd=window,hd=function(){try{var a=la(Object,"defineProperty");a({},"",{});return a}catch(b){}}(),Fd=function(a,b){var c={};b=Fa(b);Uc(a,function(a,d,f){a=b(a,d,f);
-"__proto__"==d&&hd?hd(c,d,{configurable:!0,enumerable:!0,value:a,writable:!0}):c[d]=a});return c},Hd=function(a){return function(){try{return a.apply(this,arguments)}catch(b){}}},id=ra(function(a){var b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(b){var c=new Uint8Array(16);a.exports=function(){b(c);return c}}else{var e=Array(16);
-a.exports=function(){for(var a=0,b;16>a;a++)0===(a&3)&&(b=4294967296*Math.random()),e[a]=b>>>((a&3)<<3)&255;return e}}}),B=[],Ga=0;for(;256>Ga;++Ga)B[Ga]=(Ga+256).toString(16).substr(1);var jd=function(a,b){b=b||0;return[B[a[b++]],B[a[b++]],B[a[b++]],B[a[b++]],"-",B[a[b++]],B[a[b++]],"-",B[a[b++]],B[a[b++]],"-",B[a[b++]],B[a[b++]],"-",B[a[b++]],B[a[b++]],B[a[b++]],B[a[b++]],B[a[b++]],B[a[b++]]].join("")},kd,Cb,ib=0,Db=0,P=function(a,b,c){c=b&&c||0;"string"==typeof a&&(b="binary"===a?Array(16):null,
-a=null);a=a||{};a=a.random||(a.rng||id)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(b)for(var e=0;16>e;++e)b[c+e]=a[e];return b||jd(a)},Eb=P;Eb.v1=function(a,b,c){c=b&&c||0;var e=b||[];a=a||{};var d=a.node||kd,f=void 0!==a.clockseq?a.clockseq:Cb;if(null==d||null==f){var h=id();null==d&&(d=kd=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]);null==f&&(f=Cb=(h[6]<<8|h[7])&16383)}h=void 0!==a.msecs?a.msecs:(new Date).getTime();var g=void 0!==a.nsecs?a.nsecs:Db+1,k=h-ib+(g-Db)/1E4;0>k&&void 0===a.clockseq&&(f=f+1&16383);
-(0>k||h>ib)&&void 0===a.nsecs&&(g=0);if(1E4<=g)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");ib=h;Db=g;Cb=f;h+=122192928E5;a=(1E4*(h&268435455)+g)%4294967296;e[c++]=a>>>24&255;e[c++]=a>>>16&255;e[c++]=a>>>8&255;e[c++]=a&255;a=h/4294967296*1E4&268435455;e[c++]=a>>>8&255;e[c++]=a&255;e[c++]=a>>>24&15|16;e[c++]=a>>>16&255;e[c++]=f>>>8|128;e[c++]=f&255;for(f=0;6>f;++f)e[c+f]=d[f];return b?b:jd(e)};Eb.v4=P;var Vd=Eb,af=Object.prototype.hasOwnProperty,Kb=function(a,b){return null!=a&&af.call(a,
-b)},bf=function(a,b){for(var c=-1,e=null==a?0:a.length;++c<e;)if(!b(a[c],c,a))return!1;return!0},cf=function(a,b){var c=!0;Ea(a,function(a,d,f){return c=!!b(a,d,f)});return c},Lb=function(a,b,c){var e=u(a)?bf:cf,d;if(d=c)if(d=b,I(c)){var f=D(d);d=("number"==f?Da(c)&&Xa(d,c.length):"string"==f&&d in c)?Za(c[d],a):!1}else d=!1;d&&(b=void 0);return e(a,Fa(b))},Ic=function(a){for(var b=-1,c=null==a?0:a.length,e=0,d=[];++b<c;){var f=a[b];f&&(d[e++]=f)}return d},Pd=Sc(Object.getPrototypeOf,Object),Cc=Function.prototype.toString,
-Qd=Object.prototype.hasOwnProperty,Rd=Cc.call(Object),V=window;if(V.GlobalSnowplowNamespace&&0<V.GlobalSnowplowNamespace.length){var ld=V.GlobalSnowplowNamespace.shift();var md=V[ld];md.q=new Jc(md.q,ld)}else V._snaq=V._snaq||[],V._snaq=new Jc(V._snaq,"_snaq")})()
diff --git a/vendor/assets/javascripts/u2f.js b/vendor/assets/javascripts/u2f.js
deleted file mode 100644
index a33e5e0ade9..00000000000
--- a/vendor/assets/javascripts/u2f.js
+++ /dev/null
@@ -1,750 +0,0 @@
-//Copyright 2014-2015 Google Inc. All rights reserved.
-
-//Use of this source code is governed by a BSD-style
-//license that can be found in the LICENSE file or at
-//https://developers.google.com/open-source/licenses/bsd
-
-/**
- * @fileoverview The U2F api.
- */
-'use strict';
-
-
-/**
- * Namespace for the U2F api.
- * @type {Object}
- */
-var u2f = u2f || {};
-
-/**
- * FIDO U2F Javascript API Version
- * @number
- */
-var js_api_version;
-
-/**
- * The U2F extension id
- * @const {string}
- */
-// The Chrome packaged app extension ID.
-// Uncomment this if you want to deploy a server instance that uses
-// the package Chrome app and does not require installing the U2F Chrome extension.
-u2f.EXTENSION_ID = 'kmendfapggjehodndflmmgagdbamhnfd';
-// The U2F Chrome extension ID.
-// Uncomment this if you want to deploy a server instance that uses
-// the U2F Chrome extension to authenticate.
-// u2f.EXTENSION_ID = 'pfboblefjcgdjicmnffhdgionmgcdmne';
-
-
-/**
- * Message types for messsages to/from the extension
- * @const
- * @enum {string}
- */
-u2f.MessageTypes = {
- 'U2F_REGISTER_REQUEST': 'u2f_register_request',
- 'U2F_REGISTER_RESPONSE': 'u2f_register_response',
- 'U2F_SIGN_REQUEST': 'u2f_sign_request',
- 'U2F_SIGN_RESPONSE': 'u2f_sign_response',
- 'U2F_GET_API_VERSION_REQUEST': 'u2f_get_api_version_request',
- 'U2F_GET_API_VERSION_RESPONSE': 'u2f_get_api_version_response'
-};
-
-
-/**
- * Response status codes
- * @const
- * @enum {number}
- */
-u2f.ErrorCodes = {
- 'OK': 0,
- 'OTHER_ERROR': 1,
- 'BAD_REQUEST': 2,
- 'CONFIGURATION_UNSUPPORTED': 3,
- 'DEVICE_INELIGIBLE': 4,
- 'TIMEOUT': 5
-};
-
-
-/**
- * A message for registration requests
- * @typedef {{
- * type: u2f.MessageTypes,
- * appId: ?string,
- * timeoutSeconds: ?number,
- * requestId: ?number
- * }}
- */
-u2f.U2fRequest;
-
-
-/**
- * A message for registration responses
- * @typedef {{
- * type: u2f.MessageTypes,
- * responseData: (u2f.Error | u2f.RegisterResponse | u2f.SignResponse),
- * requestId: ?number
- * }}
- */
-u2f.U2fResponse;
-
-
-/**
- * An error object for responses
- * @typedef {{
- * errorCode: u2f.ErrorCodes,
- * errorMessage: ?string
- * }}
- */
-u2f.Error;
-
-/**
- * Data object for a single sign request.
- * @typedef {enum {BLUETOOTH_RADIO, BLUETOOTH_LOW_ENERGY, USB, NFC}}
- */
-u2f.Transport;
-
-
-/**
- * Data object for a single sign request.
- * @typedef {Array<u2f.Transport>}
- */
-u2f.Transports;
-
-/**
- * Data object for a single sign request.
- * @typedef {{
- * version: string,
- * challenge: string,
- * keyHandle: string,
- * appId: string
- * }}
- */
-u2f.SignRequest;
-
-
-/**
- * Data object for a sign response.
- * @typedef {{
- * keyHandle: string,
- * signatureData: string,
- * clientData: string
- * }}
- */
-u2f.SignResponse;
-
-
-/**
- * Data object for a registration request.
- * @typedef {{
- * version: string,
- * challenge: string
- * }}
- */
-u2f.RegisterRequest;
-
-
-/**
- * Data object for a registration response.
- * @typedef {{
- * version: string,
- * keyHandle: string,
- * transports: Transports,
- * appId: string
- * }}
- */
-u2f.RegisterResponse;
-
-
-/**
- * Data object for a registered key.
- * @typedef {{
- * version: string,
- * keyHandle: string,
- * transports: ?Transports,
- * appId: ?string
- * }}
- */
-u2f.RegisteredKey;
-
-
-/**
- * Data object for a get API register response.
- * @typedef {{
- * js_api_version: number
- * }}
- */
-u2f.GetJsApiVersionResponse;
-
-
-//Low level MessagePort API support
-
-/**
- * Sets up a MessagePort to the U2F extension using the
- * available mechanisms.
- * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
- */
-u2f.getMessagePort = function(callback) {
- if (typeof chrome != 'undefined' && chrome.runtime) {
- // The actual message here does not matter, but we need to get a reply
- // for the callback to run. Thus, send an empty signature request
- // in order to get a failure response.
- var msg = {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- signRequests: []
- };
- chrome.runtime.sendMessage(u2f.EXTENSION_ID, msg, function() {
- if (!chrome.runtime.lastError) {
- // We are on a whitelisted origin and can talk directly
- // with the extension.
- u2f.getChromeRuntimePort_(callback);
- } else {
- // chrome.runtime was available, but we couldn't message
- // the extension directly, use iframe
- u2f.getIframePort_(callback);
- }
- });
- } else if (u2f.isAndroidChrome_()) {
- u2f.getAuthenticatorPort_(callback);
- } else if (u2f.isIosChrome_()) {
- u2f.getIosPort_(callback);
- } else {
- // chrome.runtime was not available at all, which is normal
- // when this origin doesn't have access to any extensions.
- u2f.getIframePort_(callback);
- }
-};
-
-/**
- * Detect chrome running on android based on the browser's useragent.
- * @private
- */
-u2f.isAndroidChrome_ = function() {
- var userAgent = navigator.userAgent;
- return userAgent.indexOf('Chrome') != -1 &&
- userAgent.indexOf('Android') != -1;
-};
-
-/**
- * Detect chrome running on iOS based on the browser's platform.
- * @private
- */
-u2f.isIosChrome_ = function() {
- return $.inArray(navigator.platform, ["iPhone", "iPad", "iPod"]) > -1;
-};
-
-/**
- * Connects directly to the extension via chrome.runtime.connect.
- * @param {function(u2f.WrappedChromeRuntimePort_)} callback
- * @private
- */
-u2f.getChromeRuntimePort_ = function(callback) {
- var port = chrome.runtime.connect(u2f.EXTENSION_ID,
- {'includeTlsChannelId': true});
- setTimeout(function() {
- callback(new u2f.WrappedChromeRuntimePort_(port));
- }, 0);
-};
-
-/**
- * Return a 'port' abstraction to the Authenticator app.
- * @param {function(u2f.WrappedAuthenticatorPort_)} callback
- * @private
- */
-u2f.getAuthenticatorPort_ = function(callback) {
- setTimeout(function() {
- callback(new u2f.WrappedAuthenticatorPort_());
- }, 0);
-};
-
-/**
- * Return a 'port' abstraction to the iOS client app.
- * @param {function(u2f.WrappedIosPort_)} callback
- * @private
- */
-u2f.getIosPort_ = function(callback) {
- setTimeout(function() {
- callback(new u2f.WrappedIosPort_());
- }, 0);
-};
-
-/**
- * A wrapper for chrome.runtime.Port that is compatible with MessagePort.
- * @param {Port} port
- * @constructor
- * @private
- */
-u2f.WrappedChromeRuntimePort_ = function(port) {
- this.port_ = port;
-};
-
-/**
- * Format and return a sign request compliant with the JS API version supported by the extension.
- * @param {Array<u2f.SignRequest>} signRequests
- * @param {number} timeoutSeconds
- * @param {number} reqId
- * @return {Object}
- */
-u2f.formatSignRequest_ =
- function(appId, challenge, registeredKeys, timeoutSeconds, reqId) {
- if (js_api_version === undefined || js_api_version < 1.1) {
- // Adapt request to the 1.0 JS API
- var signRequests = [];
- for (var i = 0; i < registeredKeys.length; i++) {
- signRequests[i] = {
- version: registeredKeys[i].version,
- challenge: challenge,
- keyHandle: registeredKeys[i].keyHandle,
- appId: appId
- };
- }
- return {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- signRequests: signRequests,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- }
- // JS 1.1 API
- return {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- appId: appId,
- challenge: challenge,
- registeredKeys: registeredKeys,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- };
-
-/**
- * Format and return a register request compliant with the JS API version supported by the extension..
- * @param {Array<u2f.SignRequest>} signRequests
- * @param {Array<u2f.RegisterRequest>} signRequests
- * @param {number} timeoutSeconds
- * @param {number} reqId
- * @return {Object}
- */
-u2f.formatRegisterRequest_ =
- function(appId, registeredKeys, registerRequests, timeoutSeconds, reqId) {
- if (js_api_version === undefined || js_api_version < 1.1) {
- // Adapt request to the 1.0 JS API
- for (var i = 0; i < registerRequests.length; i++) {
- registerRequests[i].appId = appId;
- }
- var signRequests = [];
- for (var i = 0; i < registeredKeys.length; i++) {
- signRequests[i] = {
- version: registeredKeys[i].version,
- challenge: registerRequests[0],
- keyHandle: registeredKeys[i].keyHandle,
- appId: appId
- };
- }
- return {
- type: u2f.MessageTypes.U2F_REGISTER_REQUEST,
- signRequests: signRequests,
- registerRequests: registerRequests,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- }
- // JS 1.1 API
- return {
- type: u2f.MessageTypes.U2F_REGISTER_REQUEST,
- appId: appId,
- registerRequests: registerRequests,
- registeredKeys: registeredKeys,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- };
-
-
-/**
- * Posts a message on the underlying channel.
- * @param {Object} message
- */
-u2f.WrappedChromeRuntimePort_.prototype.postMessage = function(message) {
- this.port_.postMessage(message);
-};
-
-
-/**
- * Emulates the HTML 5 addEventListener interface. Works only for the
- * onmessage event, which is hooked up to the chrome.runtime.Port.onMessage.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedChromeRuntimePort_.prototype.addEventListener =
- function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name == 'message' || name == 'onmessage') {
- this.port_.onMessage.addListener(function(message) {
- // Emulate a minimal MessageEvent object
- handler({'data': message});
- });
- } else {
- console.error('WrappedChromeRuntimePort only supports onMessage');
- }
- };
-
-/**
- * Wrap the Authenticator app with a MessagePort interface.
- * @constructor
- * @private
- */
-u2f.WrappedAuthenticatorPort_ = function() {
- this.requestId_ = -1;
- this.requestObject_ = null;
-}
-
-/**
- * Launch the Authenticator intent.
- * @param {Object} message
- */
-u2f.WrappedAuthenticatorPort_.prototype.postMessage = function(message) {
- var intentUrl =
- u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_ +
- ';S.request=' + encodeURIComponent(JSON.stringify(message)) +
- ';end';
- document.location = intentUrl;
-};
-
-/**
- * Tells what type of port this is.
- * @return {String} port type
- */
-u2f.WrappedAuthenticatorPort_.prototype.getPortType = function() {
- return "WrappedAuthenticatorPort_";
-};
-
-
-/**
- * Emulates the HTML 5 addEventListener interface.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedAuthenticatorPort_.prototype.addEventListener = function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name == 'message') {
- var self = this;
- /* Register a callback to that executes when
- * chrome injects the response. */
- window.addEventListener(
- 'message', self.onRequestUpdate_.bind(self, handler), false);
- } else {
- console.error('WrappedAuthenticatorPort only supports message');
- }
-};
-
-/**
- * Callback invoked when a response is received from the Authenticator.
- * @param function({data: Object}) callback
- * @param {Object} message message Object
- */
-u2f.WrappedAuthenticatorPort_.prototype.onRequestUpdate_ =
- function(callback, message) {
- var messageObject = JSON.parse(message.data);
- var intentUrl = messageObject['intentURL'];
-
- var errorCode = messageObject['errorCode'];
- var responseObject = null;
- if (messageObject.hasOwnProperty('data')) {
- responseObject = /** @type {Object} */ (
- JSON.parse(messageObject['data']));
- }
-
- callback({'data': responseObject});
- };
-
-/**
- * Base URL for intents to Authenticator.
- * @const
- * @private
- */
-u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_ =
- 'intent:#Intent;action=com.google.android.apps.authenticator.AUTHENTICATE';
-
-/**
- * Wrap the iOS client app with a MessagePort interface.
- * @constructor
- * @private
- */
-u2f.WrappedIosPort_ = function() {};
-
-/**
- * Launch the iOS client app request
- * @param {Object} message
- */
-u2f.WrappedIosPort_.prototype.postMessage = function(message) {
- var str = JSON.stringify(message);
- var url = "u2f://auth?" + encodeURI(str);
- location.replace(url);
-};
-
-/**
- * Tells what type of port this is.
- * @return {String} port type
- */
-u2f.WrappedIosPort_.prototype.getPortType = function() {
- return "WrappedIosPort_";
-};
-
-/**
- * Emulates the HTML 5 addEventListener interface.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedIosPort_.prototype.addEventListener = function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name !== 'message') {
- console.error('WrappedIosPort only supports message');
- }
-};
-
-/**
- * Sets up an embedded trampoline iframe, sourced from the extension.
- * @param {function(MessagePort)} callback
- * @private
- */
-u2f.getIframePort_ = function(callback) {
- // Create the iframe
- var iframeOrigin = 'chrome-extension://' + u2f.EXTENSION_ID;
- var iframe = document.createElement('iframe');
- iframe.src = iframeOrigin + '/u2f-comms.html';
- iframe.setAttribute('style', 'display:none');
- document.body.appendChild(iframe);
-
- var channel = new MessageChannel();
- var ready = function(message) {
- if (message.data == 'ready') {
- channel.port1.removeEventListener('message', ready);
- callback(channel.port1);
- } else {
- console.error('First event on iframe port was not "ready"');
- }
- };
- channel.port1.addEventListener('message', ready);
- channel.port1.start();
-
- iframe.addEventListener('load', function() {
- // Deliver the port to the iframe and initialize
- iframe.contentWindow.postMessage('init', iframeOrigin, [channel.port2]);
- });
-};
-
-
-//High-level JS API
-
-/**
- * Default extension response timeout in seconds.
- * @const
- */
-u2f.EXTENSION_TIMEOUT_SEC = 30;
-
-/**
- * A singleton instance for a MessagePort to the extension.
- * @type {MessagePort|u2f.WrappedChromeRuntimePort_}
- * @private
- */
-u2f.port_ = null;
-
-/**
- * Callbacks waiting for a port
- * @type {Array<function((MessagePort|u2f.WrappedChromeRuntimePort_))>}
- * @private
- */
-u2f.waitingForPort_ = [];
-
-/**
- * A counter for requestIds.
- * @type {number}
- * @private
- */
-u2f.reqCounter_ = 0;
-
-/**
- * A map from requestIds to client callbacks
- * @type {Object.<number,(function((u2f.Error|u2f.RegisterResponse))
- * |function((u2f.Error|u2f.SignResponse)))>}
- * @private
- */
-u2f.callbackMap_ = {};
-
-/**
- * Creates or retrieves the MessagePort singleton to use.
- * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
- * @private
- */
-u2f.getPortSingleton_ = function(callback) {
- if (u2f.port_) {
- callback(u2f.port_);
- } else {
- if (u2f.waitingForPort_.length == 0) {
- u2f.getMessagePort(function(port) {
- u2f.port_ = port;
- u2f.port_.addEventListener('message',
- /** @type {function(Event)} */ (u2f.responseHandler_));
-
- // Careful, here be async callbacks. Maybe.
- while (u2f.waitingForPort_.length)
- u2f.waitingForPort_.shift()(u2f.port_);
- });
- }
- u2f.waitingForPort_.push(callback);
- }
-};
-
-/**
- * Handles response messages from the extension.
- * @param {MessageEvent.<u2f.Response>} message
- * @private
- */
-u2f.responseHandler_ = function(message) {
- var response = message.data;
- var reqId = response['requestId'];
- if (!reqId || !u2f.callbackMap_[reqId]) {
- console.error('Unknown or missing requestId in response.');
- return;
- }
- var cb = u2f.callbackMap_[reqId];
- delete u2f.callbackMap_[reqId];
- cb(response['responseData']);
-};
-
-/**
- * Dispatches an array of sign requests to available U2F tokens.
- * If the JS API version supported by the extension is unknown, it first sends a
- * message to the extension to find out the supported API version and then it sends
- * the sign request.
- * @param {string=} appId
- * @param {string=} challenge
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.SignResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sign = function(appId, challenge, registeredKeys, callback, opt_timeoutSeconds) {
- if (js_api_version === undefined) {
- // Send a message to get the extension to JS API version, then send the actual sign request.
- u2f.getApiVersion(
- function (response) {
- js_api_version = response['js_api_version'] === undefined ? 0 : response['js_api_version'];
- console.log("Extension JS API Version: ", js_api_version);
- u2f.sendSignRequest(appId, challenge, registeredKeys, callback, opt_timeoutSeconds);
- });
- } else {
- // We know the JS API version. Send the actual sign request in the supported API version.
- u2f.sendSignRequest(appId, challenge, registeredKeys, callback, opt_timeoutSeconds);
- }
-};
-
-/**
- * Dispatches an array of sign requests to available U2F tokens.
- * @param {string=} appId
- * @param {string=} challenge
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.SignResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sendSignRequest = function(appId, challenge, registeredKeys, callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var timeoutSeconds = (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC);
- var req = u2f.formatSignRequest_(appId, challenge, registeredKeys, timeoutSeconds, reqId);
- port.postMessage(req);
- });
-};
-
-/**
- * Dispatches register requests to available U2F tokens. An array of sign
- * requests identifies already registered tokens.
- * If the JS API version supported by the extension is unknown, it first sends a
- * message to the extension to find out the supported API version and then it sends
- * the register request.
- * @param {string=} appId
- * @param {Array<u2f.RegisterRequest>} registerRequests
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.RegisterResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.register = function(appId, registerRequests, registeredKeys, callback, opt_timeoutSeconds) {
- if (js_api_version === undefined) {
- // Send a message to get the extension to JS API version, then send the actual register request.
- u2f.getApiVersion(
- function (response) {
- js_api_version = response['js_api_version'] === undefined ? 0: response['js_api_version'];
- console.log("Extension JS API Version: ", js_api_version);
- u2f.sendRegisterRequest(appId, registerRequests, registeredKeys,
- callback, opt_timeoutSeconds);
- });
- } else {
- // We know the JS API version. Send the actual register request in the supported API version.
- u2f.sendRegisterRequest(appId, registerRequests, registeredKeys,
- callback, opt_timeoutSeconds);
- }
-};
-
-/**
- * Dispatches register requests to available U2F tokens. An array of sign
- * requests identifies already registered tokens.
- * @param {string=} appId
- * @param {Array<u2f.RegisterRequest>} registerRequests
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.RegisterResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sendRegisterRequest = function(appId, registerRequests, registeredKeys, callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var timeoutSeconds = (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC);
- var req = u2f.formatRegisterRequest_(
- appId, registeredKeys, registerRequests, timeoutSeconds, reqId);
- port.postMessage(req);
- });
-};
-
-
-/**
- * Dispatches a message to the extension to find out the supported
- * JS API version.
- * If the user is on a mobile phone and is thus using Google Authenticator instead
- * of the Chrome extension, don't send the request and simply return 0.
- * @param {function((u2f.Error|u2f.GetJsApiVersionResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.getApiVersion = function(callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- // If we are using Android Google Authenticator or iOS client app,
- // do not fire an intent to ask which JS API version to use.
- if (port.getPortType) {
- var apiVersion;
- switch (port.getPortType()) {
- case 'WrappedIosPort_':
- case 'WrappedAuthenticatorPort_':
- apiVersion = 1.1;
- break;
-
- default:
- apiVersion = 0;
- break;
- }
- callback({ 'js_api_version': apiVersion });
- return;
- }
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var req = {
- type: u2f.MessageTypes.U2F_GET_API_VERSION_REQUEST,
- timeoutSeconds: (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC),
- requestId: reqId
- };
- port.postMessage(req);
- });
-};
-
-window.u2f || (window.u2f = u2f);
diff --git a/vendor/assets/javascripts/vue-virtual-scroller/src/components/RecycleScroller.vue b/vendor/assets/javascripts/vue-virtual-scroller/src/components/RecycleScroller.vue
index d18c5f3ee97..f6838ddbb92 100644
--- a/vendor/assets/javascripts/vue-virtual-scroller/src/components/RecycleScroller.vue
+++ b/vendor/assets/javascripts/vue-virtual-scroller/src/components/RecycleScroller.vue
@@ -222,6 +222,10 @@ export default {
position: 0,
}
const nonReactive = {
+ // FIXME: replace with markRaw in Vue3
+ // See https://gitlab.com/gitlab-org/gitlab/-/issues/395772
+ __v_skip: true,
+
id: uid++,
index,
used: true,
diff --git a/vendor/gems/bundler-checksum/.gitlab-ci.yml b/vendor/gems/bundler-checksum/.gitlab-ci.yml
index f6bdb73a039..2de1c5e982c 100644
--- a/vendor/gems/bundler-checksum/.gitlab-ci.yml
+++ b/vendor/gems/bundler-checksum/.gitlab-ci.yml
@@ -2,7 +2,8 @@ workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
-.test:
+rspec:
+ image: "ruby:${RUBY_VERSION}"
cache:
key: bundler-checksum
paths:
@@ -18,11 +19,6 @@ workflow:
- bundle install -j $(nproc)
script:
- pushd test/project_with_checksum_lock && scripts/test
-
-test-2.7:
- image: "ruby:2.7"
- extends: .test
-
-test-3.0:
- image: "ruby:3.0"
- extends: .test
+ parallel:
+ matrix:
+ - RUBY_VERSION: ["2.7", "3.0", "3.1", "3.2"]
diff --git a/vendor/gems/bundler-checksum/README.md b/vendor/gems/bundler-checksum/README.md
index 675c3ad2ee8..ba9b7c5a25f 100644
--- a/vendor/gems/bundler-checksum/README.md
+++ b/vendor/gems/bundler-checksum/README.md
@@ -7,7 +7,7 @@ Bundler patch for verifying local gem checksums
Add the following to your Gemfile:
```
-if ENV['BUNDLER_CHECKSUM_VERIFICATION_OPT_IN'] # this verification is still experimental
+if ENV.fetch('BUNDLER_CHECKSUM_VERIFICATION_OPT_IN', 'false') != 'false' # this verification is still experimental
require 'bundler-checksum'
BundlerChecksum.patch!
end
diff --git a/vendor/gems/bundler-checksum/test/project_with_checksum_lock/Gemfile b/vendor/gems/bundler-checksum/test/project_with_checksum_lock/Gemfile
index 503cf4587fa..6787ee0521a 100644
--- a/vendor/gems/bundler-checksum/test/project_with_checksum_lock/Gemfile
+++ b/vendor/gems/bundler-checksum/test/project_with_checksum_lock/Gemfile
@@ -2,7 +2,7 @@
source 'https://rubygems.org'
-if ENV['BUNDLER_CHECKSUM_VERIFICATION_OPT_IN'] # this verification is still experimental
+if ENV.fetch('BUNDLER_CHECKSUM_VERIFICATION_OPT_IN', 'false') != 'false' # this verification is still experimental
$:.unshift(File.expand_path('../../lib', __dir__))
require 'bundler-checksum'
BundlerChecksum.patch!
diff --git a/vendor/gems/omniauth-cas3/.gitlab-ci.yml b/vendor/gems/cloud_profiler_agent/.gitlab-ci.yml
index e728d704d21..9e508d920e8 100644
--- a/vendor/gems/omniauth-cas3/.gitlab-ci.yml
+++ b/vendor/gems/cloud_profiler_agent/.gitlab-ci.yml
@@ -4,11 +4,11 @@ workflow:
.rspec:
cache:
- key: omniauth-cas3-ruby
+ key: cloud_profiler_agent-ruby-${RUBY_VERSION}
paths:
- - vendor/gems/omniauth-cas3/vendor/ruby
+ - vendor/gems/cloud_profiler_agent/vendor/ruby
before_script:
- - cd vendor/gems/omniauth-cas3
+ - cd vendor/gems/cloud_profiler_agent
- ruby -v # Print out ruby version for debugging
- gem install bundler --no-document # Bundler is not installed with the image
- bundle config set --local path 'vendor' # Install dependencies into ./vendor/ruby
@@ -19,10 +19,14 @@ workflow:
script:
- bundle exec rspec
-rspec-2.7:
- image: "ruby:2.7"
- extends: .rspec
-
rspec-3.0:
image: "ruby:3.0"
extends: .rspec
+
+rspec-3.1:
+ image: "ruby:3.1"
+ extends: .rspec
+
+rspec-3.2:
+ image: "ruby:3.2"
+ extends: .rspec
diff --git a/vendor/gems/cloud_profiler_agent/Gemfile b/vendor/gems/cloud_profiler_agent/Gemfile
new file mode 100644
index 00000000000..5f10ba8c95a
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/Gemfile
@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+
+source 'https://rubygems.org'
+gemspec
diff --git a/vendor/gems/cloud_profiler_agent/Gemfile.lock b/vendor/gems/cloud_profiler_agent/Gemfile.lock
new file mode 100644
index 00000000000..47087362534
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/Gemfile.lock
@@ -0,0 +1,126 @@
+PATH
+ remote: .
+ specs:
+ cloud_profiler_agent (0.0.1.pre)
+ google-cloud-profiler-v2 (~> 0.3)
+ google-protobuf (~> 3.13)
+ googleauth (>= 0.14)
+ stackprof (~> 0.2)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.8.1)
+ public_suffix (>= 2.0.2, < 6.0)
+ ast (2.4.2)
+ diff-lcs (1.5.0)
+ faraday (1.10.2)
+ faraday-em_http (~> 1.0)
+ faraday-em_synchrony (~> 1.0)
+ faraday-excon (~> 1.1)
+ faraday-httpclient (~> 1.0)
+ faraday-multipart (~> 1.0)
+ faraday-net_http (~> 1.0)
+ faraday-net_http_persistent (~> 1.0)
+ faraday-patron (~> 1.0)
+ faraday-rack (~> 1.0)
+ faraday-retry (~> 1.0)
+ ruby2_keywords (>= 0.0.4)
+ faraday-em_http (1.0.0)
+ faraday-em_synchrony (1.0.0)
+ faraday-excon (1.1.0)
+ faraday-httpclient (1.0.1)
+ faraday-multipart (1.0.4)
+ multipart-post (~> 2)
+ faraday-net_http (1.0.1)
+ faraday-net_http_persistent (1.2.0)
+ faraday-patron (1.0.0)
+ faraday-rack (1.0.0)
+ faraday-retry (1.0.3)
+ gapic-common (0.17.1)
+ faraday (>= 1.9, < 3.a)
+ faraday-retry (>= 1.0, < 3.a)
+ google-protobuf (~> 3.14)
+ googleapis-common-protos (>= 1.3.12, < 2.a)
+ googleapis-common-protos-types (>= 1.3.1, < 2.a)
+ googleauth (~> 1.0)
+ grpc (~> 1.36)
+ google-cloud-errors (1.3.0)
+ google-cloud-profiler-v2 (0.3.0)
+ gapic-common (>= 0.10, < 2.a)
+ google-cloud-errors (~> 1.0)
+ google-protobuf (3.22.0)
+ googleapis-common-protos (1.4.0)
+ google-protobuf (~> 3.14)
+ googleapis-common-protos-types (~> 1.2)
+ grpc (~> 1.27)
+ googleapis-common-protos-types (1.5.0)
+ google-protobuf (~> 3.14)
+ googleauth (1.3.0)
+ faraday (>= 0.17.3, < 3.a)
+ jwt (>= 1.4, < 3.0)
+ memoist (~> 0.16)
+ multi_json (~> 1.11)
+ os (>= 0.9, < 2.0)
+ signet (>= 0.16, < 2.a)
+ grpc (1.52.0)
+ google-protobuf (~> 3.21)
+ googleapis-common-protos-types (~> 1.0)
+ json (2.6.2)
+ jwt (2.1.0)
+ memoist (0.16.2)
+ multi_json (1.14.1)
+ multipart-post (2.2.3)
+ os (1.1.1)
+ parallel (1.22.1)
+ parser (3.1.3.0)
+ ast (~> 2.4.1)
+ public_suffix (5.0.0)
+ rainbow (3.1.1)
+ regexp_parser (2.6.0)
+ rexml (3.2.5)
+ rspec (3.11.0)
+ rspec-core (~> 3.11.0)
+ rspec-expectations (~> 3.11.0)
+ rspec-mocks (~> 3.11.0)
+ rspec-core (3.11.0)
+ rspec-support (~> 3.11.0)
+ rspec-expectations (3.11.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.11.0)
+ rspec-mocks (3.11.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.11.0)
+ rspec-support (3.11.1)
+ rubocop (1.38.0)
+ json (~> 2.3)
+ parallel (~> 1.10)
+ parser (>= 3.1.2.1)
+ rainbow (>= 2.2.2, < 4.0)
+ regexp_parser (>= 1.8, < 3.0)
+ rexml (>= 3.2.5, < 4.0)
+ rubocop-ast (>= 1.23.0, < 2.0)
+ ruby-progressbar (~> 1.7)
+ unicode-display_width (>= 1.4.0, < 3.0)
+ rubocop-ast (1.23.0)
+ parser (>= 3.1.1.0)
+ ruby-progressbar (1.11.0)
+ ruby2_keywords (0.0.5)
+ signet (0.17.0)
+ addressable (~> 2.8)
+ faraday (>= 0.17.5, < 3.a)
+ jwt (>= 1.5, < 3.0)
+ multi_json (~> 1.10)
+ stackprof (0.2.21)
+ unicode-display_width (2.3.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ cloud_profiler_agent!
+ rspec (>= 3.10)
+ rubocop (>= 1.2)
+
+BUNDLED WITH
+ 2.3.26
diff --git a/vendor/gems/cloud_profiler_agent/LICENSE b/vendor/gems/cloud_profiler_agent/LICENSE
new file mode 100644
index 00000000000..4a8062eea52
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2020, Remind101, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/gems/cloud_profiler_agent/README.md b/vendor/gems/cloud_profiler_agent/README.md
new file mode 100644
index 00000000000..5ae2ec7c15c
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/README.md
@@ -0,0 +1,30 @@
+# ruby-cloud-profiler
+
+An implementation of [Google Cloud Profiler](https://cloud.google.com/profiler/docs)
+for Ruby.
+
+This project is not officially supported or endorsed by Google in any way.
+
+Under the hood, the agent uses [Stackprof](https://github.com/tmm1/stackprof)
+to collect the profiling data, and then converts it to
+[the pprof format](https://github.com/google/pprof/blob/master/proto/profile.proto)
+expected by Cloud Profiler. The Cloud Profiler API doesn't have pretty HTML
+documentation, but is described
+[in the googleapis specification](https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudprofiler/v2/profiler.proto)
+which creates
+[generated code in google-api-ruby-client](https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google/apis/cloudprofiler_v2).
+
+To use, you need to decide what to name your service and you need a Google
+Cloud project ID:
+
+ require 'cloud_profiler_agent'
+ agent = CloudProfilerAgent::Agent.new(service: 'my-service', project_id: 'my-project-id')
+ agent.start
+
+This will start a background thread that will merrily poll the Cloud Profiler
+API to see what kinds of profiles it should collect, and when. Then it will run
+stackprof, and upload the profiles.
+
+Note: the agent can only profile its own process. If your Ruby application is
+running from a webserver that forks subprocesses, then you'll need to somehow
+arrange to start the agent in the subprocess.
diff --git a/vendor/gems/cloud_profiler_agent/cloud_profiler_agent.gemspec b/vendor/gems/cloud_profiler_agent/cloud_profiler_agent.gemspec
new file mode 100644
index 00000000000..82e5041491d
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/cloud_profiler_agent.gemspec
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+lib = File.expand_path('lib', __dir__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'cloud_profiler_agent'
+
+Gem::Specification.new do |spec|
+ spec.name = 'cloud_profiler_agent'
+ spec.version = CloudProfilerAgent::VERSION
+ spec.authors = ['Remind']
+
+ spec.summary = 'Profiling agent for Google Cloud Profiler'
+ spec.homepage = 'https://github.com/remind101/ruby-cloud-profiler'
+ spec.license = 'BSD-2-Clause'
+
+ spec.files = ['lib/profile_pb.rb',
+ 'lib/cloud_profiler_agent.rb',
+ 'lib/cloud_profiler_agent/agent.rb',
+ 'lib/cloud_profiler_agent/looper.rb',
+ 'lib/cloud_profiler_agent/pprof_builder.rb']
+
+ spec.add_runtime_dependency 'googleauth', '>= 0.14'
+ spec.add_runtime_dependency 'google-cloud-profiler-v2', '~> 0.3'
+ spec.add_runtime_dependency 'google-protobuf', '~> 3.13'
+ spec.add_runtime_dependency 'stackprof', '~> 0.2'
+
+ spec.add_development_dependency 'rspec', '>= 3.10'
+ spec.add_development_dependency 'rubocop', '>= 1.2'
+end
diff --git a/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent.rb b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent.rb
new file mode 100644
index 00000000000..60350e2e54a
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module CloudProfilerAgent
+ VERSION = '0.0.1.pre'
+ autoload :Agent, 'cloud_profiler_agent/agent'
+ autoload :PprofBuilder, 'cloud_profiler_agent/pprof_builder'
+ autoload :Looper, 'cloud_profiler_agent/looper'
+end
+
+module Perftools
+ autoload :Profiles, 'profile_pb'
+end
diff --git a/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/agent.rb b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/agent.rb
new file mode 100644
index 00000000000..2c538d5224e
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/agent.rb
@@ -0,0 +1,152 @@
+# frozen_string_literal: true
+
+require "google/cloud/profiler/v2"
+require 'googleauth'
+require 'stackprof'
+require 'logger'
+
+module CloudProfilerAgent
+ GoogleCloudProfiler = ::Google::Cloud::Profiler::V2
+
+ PROFILE_TYPES = {
+ CPU: :cpu,
+ WALL: :wall
+ }.freeze
+ # This regexp will ensure the service name is valid.
+ # See https://cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-Deployment#Google__Cloud__Profiler__V2__Deployment_target_instance_
+ SERVICE_REGEXP = /^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$/
+
+ # Agent interfaces with the CloudProfiler API.
+ class Agent
+ def initialize(
+ service:, project_id:, service_version: nil, instance: nil, zone: nil,
+ logger: nil, log_labels: {})
+ raise ArgumentError, "service must match #{SERVICE_REGEXP}" unless SERVICE_REGEXP =~ service
+
+ @service = service
+ @project_id = project_id
+
+ @labels = { language: 'ruby' }
+ @labels[:version] = service_version unless service_version.nil?
+ @labels[:zone] = zone unless zone.nil?
+
+ @deployment = GoogleCloudProfiler::Deployment.new(project_id: project_id, target: service, labels: @labels)
+
+ @profile_labels = {}
+ @profile_labels[:instance] = instance unless instance.nil?
+
+ @google_profiler = GoogleCloudProfiler::ProfilerService::Client.new
+
+ @logger = logger || ::Logger.new($stdout)
+ @log_labels = log_labels
+ end
+
+ attr_reader :service, :project_id, :labels, :deployment, :profile_labels, :logger, :log_labels
+
+ def create_google_profile
+ google_profile_request = GoogleCloudProfiler::CreateProfileRequest.new(
+ deployment: deployment,
+ profile_type: PROFILE_TYPES.keys)
+
+ google_profile, wall_time, cpu_time = time { @google_profiler.create_profile(google_profile_request) }
+
+ logger.info(
+ gcp_ruby_status: "google profile resource created",
+ duration_s: wall_time,
+ cpu_s: cpu_time,
+ **log_labels
+ )
+
+ google_profile
+ end
+
+ # start will begin creating profiles in a background thread, looping
+ # forever. Exceptions are rescued and logged, and retries are made with
+ # exponential backoff.
+ def start
+ return if @thread&.alive?
+
+ @thread = Thread.new do
+ logger.info(
+ gcp_ruby_status: "Created new agent thread",
+ **log_labels
+ )
+
+ Looper.new(logger: logger, log_labels: log_labels).run do
+ google_profile = create_google_profile
+ google_profile = profile_app(google_profile)
+ upload_profile_to_google(google_profile)
+ end
+ end
+ end
+
+ private
+
+ def time
+ start_monotonic_time = Gitlab::Metrics::System.monotonic_time
+ start_thread_cpu_time = Gitlab::Metrics::System.thread_cpu_time
+
+ result = yield
+
+ finish_monotonic_time = Gitlab::Metrics::System.monotonic_time
+ finish_thread_cpu_time = Gitlab::Metrics::System.thread_cpu_time
+ [
+ result,
+ finish_monotonic_time - start_monotonic_time,
+ finish_thread_cpu_time - start_thread_cpu_time
+ ]
+ end
+
+ def stackprof_profile_as_pprof(duration, mode)
+ start_time = Time.now
+
+ stackprof, wall_time, cpu_time = time do
+ StackProf.run(mode: mode, raw: true, interval: ::Gitlab::StackProf.interval(mode)) do
+ sleep(duration)
+ end
+ end
+
+ logger.info(
+ gcp_ruby_status: "stackprof run finished",
+ duration_s: wall_time,
+ cpu_s: cpu_time,
+ **log_labels
+ )
+
+ pprof_result, wall_time, cpu_time = time do
+ CloudProfilerAgent::PprofBuilder.convert_stackprof(stackprof, start_time, Time.now)
+ end
+
+ logger.info(
+ gcp_ruby_status: "stackprof to pprof converted",
+ duration_s: wall_time,
+ cpu_s: cpu_time,
+ **log_labels
+ )
+
+ pprof_result
+ end
+
+ def profile_app(google_profile)
+ google_profile.profile_bytes = stackprof_profile_as_pprof(google_profile.duration.seconds,
+ PROFILE_TYPES.fetch(google_profile.profile_type))
+ google_profile
+ end
+
+ def upload_profile_to_google(google_profile)
+ start_monotonic_time = Gitlab::Metrics::System.monotonic_time
+ start_thread_cpu_time = Gitlab::Metrics::System.thread_cpu_time
+
+ @google_profiler.update_profile(profile: google_profile)
+
+ finish_monotonic_time = Gitlab::Metrics::System.monotonic_time
+ finish_thread_cpu_time = Gitlab::Metrics::System.thread_cpu_time
+ logger.info(
+ gcp_ruby_status: "profile resource updated",
+ duration_s: finish_monotonic_time - start_monotonic_time,
+ cpu_s: finish_thread_cpu_time - start_thread_cpu_time,
+ **log_labels
+ )
+ end
+ end
+end
diff --git a/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/looper.rb b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/looper.rb
new file mode 100644
index 00000000000..cd9502de435
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/looper.rb
@@ -0,0 +1,114 @@
+# frozen_string_literal: true
+
+require "google/cloud/profiler/v2"
+require "logger"
+
+module CloudProfilerAgent
+ # Looper is responsible for the main loop of the agent. It calls a
+ # block repeatedly, handling errors, backing off, and retrying as
+ # appropriate.
+
+ class Looper
+ LOG_MESSAGE = "Google Cloud Profiler Ruby"
+
+ def initialize(
+ min_iteration_sec: 10,
+ max_iteration_sec: 60 * 60,
+ backoff_factor: 1.5,
+ sleeper: ->(sec) { sleep(sec) },
+ clock: -> { Process.clock_gettime(Process::CLOCK_MONOTONIC) },
+ rander: -> { rand },
+ logger: nil,
+ log_labels: {}
+ )
+
+ # the minimum and maximum time between iterations of the profiler loop,
+ # in seconds. Normally the Cloud Profiler API tells us how fast to go,
+ # but we back off in case of error.
+ @min_iteration_sec = min_iteration_sec
+ @max_iteration_sec = max_iteration_sec
+ @backoff_factor = backoff_factor
+
+ # stubbable for testing
+ @sleeper = sleeper
+ @clock = clock
+ @rander = rander
+
+ @logger = logger || ::Logger.new($stdout)
+ @log_labels = log_labels
+ end
+
+ attr_reader :min_iteration_sec, :max_iteration_sec, :backoff_factor, :logger, :log_labels
+
+ def run(max_iterations = 0)
+ iterations = 0
+ iteration_time = @min_iteration_sec
+ loop do
+ start_time = @clock.call
+ iterations += 1
+ begin
+ yield
+ rescue ::Google::Cloud::Error => e
+ logger.error(
+ gcp_ruby_status: "error",
+ error: e.inspect,
+ **log_labels
+ )
+
+ backoff = backoff_duration(e)
+ if backoff.nil?
+ iteration_time = @max_iteration_sec
+ else
+ # This might be longer than max_iteration_sec and that's OK: with
+ # a very large number of agents it might be necessary to achieve
+ # the objective of 1 profile per minute.
+ @sleeper.call(backoff)
+ iteration_time = @min_iteration_sec
+ end
+ rescue StandardError => e
+ iteration_time *= @backoff_factor + (@rander.call / 2)
+ elapsed = @clock.call - start_time
+ logger.error(
+ gcp_ruby_status: "error",
+ error: e.inspect,
+ duration_s: elapsed,
+ **log_labels
+ )
+ rescue Exception => e # rubocop:disable Lint/RescueException
+ # We rescue exception here to make sure we log the error message, then we re-raise the exception.
+ logger.error(
+ gcp_ruby_status: "exception",
+ error: e.inspect,
+ **log_labels
+ )
+ raise e
+ else
+ iteration_time = @min_iteration_sec
+ end
+
+ return unless iterations < max_iterations || max_iterations == 0
+
+ iteration_time = [@max_iteration_sec, iteration_time].min
+ next_time = start_time + iteration_time
+ delay = next_time - @clock.call
+ @sleeper.call(delay) if delay > 0
+ end
+ end
+
+ private
+
+ def backoff_duration(error)
+ # It's unclear how this should work, so this is based on a guess.
+ #
+ # https://github.com/googleapis/google-api-ruby-client/issues/1498
+ match = /backoff for (?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?/.match(error.message)
+ return if match.nil?
+
+ hours = Integer(match[1] || 0)
+ minutes = Integer(match[2] || 0)
+ seconds = Integer(match[3] || 0)
+
+ seconds + (minutes * 60) + (hours * 60 * 60)
+ end
+ end
+end
diff --git a/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/pprof_builder.rb b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/pprof_builder.rb
new file mode 100644
index 00000000000..0f2ff71c791
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/lib/cloud_profiler_agent/pprof_builder.rb
@@ -0,0 +1,191 @@
+# frozen_string_literal: true
+
+require 'zlib'
+require 'stackprof'
+
+module CloudProfilerAgent
+ # PprofBuilder converts from stackprof to pprof formats.
+ #
+ # Typical usage:
+ #
+ # start_time = Time.now
+ # stackprof = StackProf.run(mode: :cpu, raw: true) do
+ # # ...
+ # end
+ # pprof = PprofBuilder.convert_stackprof(stackprof, start_time, Time.now)
+ # IO::binwrite('profile.pprof', pprof)
+ #
+ # StackProf must be invoked with raw: true for the conversion to work.
+ #
+ # The pprof format is a gzip-compressed protobuf, documented here:
+ # https://github.com/google/pprof/blob/master/proto/profile.proto
+ #
+ # The conversion is not quite isomorphic. In particular, each sample in pprof
+ # consists of a stack with line numbers and even instruction addresses.
+ # StackProf on the other hand records stack frames with only function-level
+ # granularity. Thus, the line numbers in the pprof output only reflect the
+ # first line of the function, regardless of which line was actually in the
+ # stack frame.
+ class PprofBuilder
+ def self.convert_stackprof(stackprof, start_time, end_time)
+ converter = PprofBuilder.new(stackprof, start_time, end_time)
+ converter.pprof_bytes
+ end
+
+ def initialize(profile, start_time, end_time)
+ @profile = profile
+ @start_time = start_time
+ @duration = end_time - start_time
+
+ @string_map = StringMap.new
+ end
+
+ # message returns a Perftools::Profiles::Profile, the deserialized version
+ # of a pprof profile.
+ def message
+ main_mapping = Perftools::Profiles::Mapping.new(
+ id: 1,
+ filename: @string_map.add('TODO')
+ )
+
+ message = Perftools::Profiles::Profile.new(
+ sample_type: [sample_type],
+ mapping: [main_mapping],
+ time_nanos: @start_time.to_i * 1_000_000_000,
+ duration_nanos: @duration * 1_000_000_000,
+ period_type: sample_type,
+ period: period,
+ default_sample_type: 0
+ )
+ process_raw(message)
+ process_frames(message)
+ message.string_table += @string_map.strings
+ message
+ end
+
+ # pprof_bytes returns a gzip'd protobuf object, like would be written to
+ # disk, returned by a profiling endpoint, or otherwise consumed by the
+ # `pprof` tool.
+ def pprof_bytes
+ Zlib.gzip(Perftools::Profiles::Profile.encode(message))
+ end
+
+ private
+
+ def to_pprof_unit(value)
+ case @profile.fetch(:mode)
+ when :cpu, :wall
+ value * 1000 # stackprof uses microseconds, pprof nanoseconds
+ when :object
+ value # both stackprof and pprof are counting allocations
+ else
+ raise "unknown profile mode #{@profile.fetch(:mode)}"
+ end
+ end
+
+ def period
+ to_pprof_unit @profile.fetch(:interval)
+ end
+
+ def sample_type
+ case @profile.fetch(:mode)
+ when :cpu
+ type = 'cpu'
+ unit = 'nanoseconds'
+ when :wall
+ type = 'wall'
+ unit = 'nanoseconds'
+ when :object
+ type = 'alloc_objects'
+ unit = 'count'
+ else
+ raise "unknown profile mode #{@profile.fetch(:mode)}"
+ end
+
+ Perftools::Profiles::ValueType.new(
+ type: @string_map.add(type),
+ unit: @string_map.add(unit)
+ )
+ end
+
+ # process_raw reads the :raw section of the stackprof profile and adds to
+ # the given protobuf message as appropriate
+ def process_raw(message)
+ i = 0
+ raw = @profile.fetch(:raw, [])
+
+ # It would be cleaner to use raw.shift here, but since that changes the
+ # size of the array each time it is much slower. So we use an
+ # incrementing pointer instead.
+ while i < raw.length
+ len = raw.fetch(i)
+ i += 1
+
+ frames = raw.slice(i, len)
+ i += len
+ frames.reverse!
+
+ # "weight" is how many times stackprof has seen this stack. It's
+ # usually 1, but can be 2 or more if stackprof sees the same stack in
+ # sequential samples.
+ weight = raw.fetch(i)
+ i += 1
+
+ sample = Perftools::Profiles::Sample.new(
+ value: [weight * period],
+ location_id: frames
+ )
+ message.sample.push(sample)
+ end
+ end
+
+ # process_frames reads the :frames section of the stackprof profile and adds to
+ # the given protobuf message as appropriate
+ def process_frames(message)
+ @profile.fetch(:frames, []).each do |location_id, location|
+ message.function.push(Perftools::Profiles::Function.new(
+ id: location_id,
+ name: @string_map.add(location.fetch(:name)),
+ filename: @string_map.add(location.fetch(:file)),
+ start_line: location.fetch(:line, nil)
+ ))
+
+ line = Perftools::Profiles::Line.new(
+ function_id: location_id,
+ line: location.fetch(:line, nil)
+ )
+
+ message.location.push(Perftools::Profiles::Location.new(
+ id: location_id,
+ line: [line]
+ ))
+ end
+ end
+ end
+
+ # The pprof format has one table of strings, and objects that need strings
+ # (like filenames, function names, etc) are indexes into this table,
+ # achieving a cheap kind of compression for commonly repeated strings.
+ # StringMap is a helper for building this table.
+ class StringMap
+ def initialize
+ @strings = []
+ @string_hash = {}
+ add('') # spec says string_table[0] must always be "".
+ end
+
+ # strings an array of all the strings which will go into the pprof message.
+ attr_reader :strings
+
+ # add will return an index for the given string, either returning the
+ # existing index or adding a new string to the table as appropriate.
+ def add(str)
+ i = @string_hash.fetch(str, nil)
+ return i unless i.nil?
+
+ i = strings.push(str).length - 1
+ @string_hash[str] = i
+ i
+ end
+ end
+end
diff --git a/vendor/gems/cloud_profiler_agent/lib/profile_pb.rb b/vendor/gems/cloud_profiler_agent/lib/profile_pb.rb
new file mode 100644
index 00000000000..01ef0d99141
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/lib/profile_pb.rb
@@ -0,0 +1,85 @@
+# frozen_string_literal: true
+
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: profile.proto
+
+require 'google/protobuf'
+
+Google::Protobuf::DescriptorPool.generated_pool.build do
+ add_file("profile.proto", syntax: :proto3) do
+ add_message "perftools.profiles.Profile" do
+ repeated :sample_type, :message, 1, "perftools.profiles.ValueType"
+ repeated :sample, :message, 2, "perftools.profiles.Sample"
+ repeated :mapping, :message, 3, "perftools.profiles.Mapping"
+ repeated :location, :message, 4, "perftools.profiles.Location"
+ repeated :function, :message, 5, "perftools.profiles.Function"
+ repeated :string_table, :string, 6
+ optional :drop_frames, :int64, 7
+ optional :keep_frames, :int64, 8
+ optional :time_nanos, :int64, 9
+ optional :duration_nanos, :int64, 10
+ optional :period_type, :message, 11, "perftools.profiles.ValueType"
+ optional :period, :int64, 12
+ repeated :comment, :int64, 13
+ optional :default_sample_type, :int64, 14
+ end
+ add_message "perftools.profiles.ValueType" do
+ optional :type, :int64, 1
+ optional :unit, :int64, 2
+ end
+ add_message "perftools.profiles.Sample" do
+ repeated :location_id, :uint64, 1
+ repeated :value, :int64, 2
+ repeated :label, :message, 3, "perftools.profiles.Label"
+ end
+ add_message "perftools.profiles.Label" do
+ optional :key, :int64, 1
+ optional :str, :int64, 2
+ optional :num, :int64, 3
+ optional :num_unit, :int64, 4
+ end
+ add_message "perftools.profiles.Mapping" do
+ optional :id, :uint64, 1
+ optional :memory_start, :uint64, 2
+ optional :memory_limit, :uint64, 3
+ optional :file_offset, :uint64, 4
+ optional :filename, :int64, 5
+ optional :build_id, :int64, 6
+ optional :has_functions, :bool, 7
+ optional :has_filenames, :bool, 8
+ optional :has_line_numbers, :bool, 9
+ optional :has_inline_frames, :bool, 10
+ end
+ add_message "perftools.profiles.Location" do
+ optional :id, :uint64, 1
+ optional :mapping_id, :uint64, 2
+ optional :address, :uint64, 3
+ repeated :line, :message, 4, "perftools.profiles.Line"
+ optional :is_folded, :bool, 5
+ end
+ add_message "perftools.profiles.Line" do
+ optional :function_id, :uint64, 1
+ optional :line, :int64, 2
+ end
+ add_message "perftools.profiles.Function" do
+ optional :id, :uint64, 1
+ optional :name, :int64, 2
+ optional :system_name, :int64, 3
+ optional :filename, :int64, 4
+ optional :start_line, :int64, 5
+ end
+ end
+end
+
+module Perftools
+ module Profiles
+ Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Profile").msgclass
+ ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.ValueType").msgclass
+ Sample = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Sample").msgclass
+ Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Label").msgclass
+ Mapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Mapping").msgclass
+ Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Location").msgclass
+ Line = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Line").msgclass
+ Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("perftools.profiles.Function").msgclass
+ end
+end
diff --git a/vendor/gems/cloud_profiler_agent/script/generate_profile.rb b/vendor/gems/cloud_profiler_agent/script/generate_profile.rb
new file mode 100755
index 00000000000..d31c8415186
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/script/generate_profile.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+require 'prime'
+require 'stackprof'
+
+StackProf.run(mode: :cpu, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/cpu.stackprof') do
+ (1..1000).each { |i| Prime.prime_division(i) }
+end
+
+StackProf.run(mode: :wall, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/wall.stackprof') do
+ sleep(1)
+end
+
+StackProf.run(mode: :object, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/object.stackprof') do
+ (1..1000).each { |i| Prime.prime_division(i) }
+end
diff --git a/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/cpu.stackprof b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/cpu.stackprof
new file mode 100644
index 00000000000..ccd82272fbb
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/cpu.stackprof
Binary files differ
diff --git a/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/looper_spec.rb b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/looper_spec.rb
new file mode 100644
index 00000000000..6150fd8b1ea
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/looper_spec.rb
@@ -0,0 +1,176 @@
+# frozen_string_literal: true
+
+require 'cloud_profiler_agent'
+
+RSpec.describe CloudProfilerAgent::Looper, feature_category: :application_performance do
+ # rubocop:disable RSpec/InstanceVariable
+ before do
+ @now = 0.0
+ end
+
+ subject do
+ described_class.new(
+ clock: -> { @now },
+ sleeper: ->(secs) {
+ sleeps.push(secs)
+ @now += secs
+ },
+ rander: -> { rand },
+ logger: Logger.new('/dev/null')
+ )
+ end
+
+ let!(:sleeps) { [] }
+ let(:rand) { 0.4 } # chosen by fair dice roll. guaranteed to be random.
+ let(:min_time) { subject.min_iteration_sec }
+ let(:max_time) { subject.max_iteration_sec }
+ let(:backoff) { subject.backoff_factor }
+
+ describe '#run' do
+ it 'runs the block the specified number of times' do
+ runs = []
+ subject.run(3) do
+ runs.push(true)
+ end
+ expect(runs.length).to eq(3)
+ end
+
+ it 'runs the block forever when max_iterations is not given' do
+ # but we don't test this, because how do you test an infinite loop?
+ end
+
+ it 'will not run faster than min_iteration_sec' do
+ subject.run(3) { nil }
+ expect(sleeps).to eq([min_time, min_time])
+ end
+
+ context 'when the block takes some time' do
+ it 'accounts for time taken by the block' do
+ subject.run(3) { @now += 1 }
+ expect(sleeps).to eq([min_time - 1, min_time - 1])
+ end
+ end
+
+ context 'when the block takes longer than min_iteration_sec' do
+ it 'does not sleep between iterations' do
+ subject.run(3) { @now += 11 }
+ expect(sleeps).to eq([])
+ end
+ end
+
+ context 'when the block raises a StandardError' do
+ it 'exponentially backs off' do
+ subject.run(3) do
+ @now += 1
+ raise StandardError, 'bam'
+ end
+
+ factor = backoff + (rand / 2)
+ expect(sleeps).to eq([(min_time * factor) - 1, (min_time * (factor**2)) - 1])
+ end
+
+ it 'respects max_iteration_sec' do
+ subject.run(15) do
+ @now += 1
+ raise StandardError, 'bam'
+ end
+
+ expect(sleeps.last).to eq(max_time - 1)
+ end
+ end
+
+ context 'when the block raises an Exception' do
+ let(:exception_subject) do
+ subject.run do
+ raise Exception, 'bam'
+ end
+ end
+
+ it 'logs the error and re-raises the exception' do
+ expect_any_instance_of(Logger).to receive(:error).with(
+ hash_including(
+ gcp_ruby_status: "exception",
+ error: "#<Exception: bam>"
+ )
+ )
+
+ expect { exception_subject }.to raise_exception
+ end
+ end
+
+ context 'when Google asks for backoff' do
+ it 'slows down' do
+ subject.run(2) do
+ @now += 1
+ raise backoff_exception('44m0s')
+ end
+
+ expect(sleeps.first).to eq(60 * 44)
+ end
+ end
+
+ context 'when the block raises some other ClientError' do
+ it 'goes to the maximum iteration time' do
+ subject.run(2) do
+ @now += 1
+ raise ::Google::Cloud::InvalidArgumentError, 'you are a bad client'
+ end
+
+ expect(sleeps).to eq([max_time - 1])
+ end
+ end
+
+ context 'when the block fails then works' do
+ it 'backs off then returns to normal' do
+ i = 0
+ subject.run(4) do
+ @now += 1
+ i += 1
+ raise 'whoops' if i == 1
+ end
+
+ factor = backoff + (rand / 2)
+ expect(sleeps).to eq([(min_time * factor) - 1, min_time - 1, min_time - 1])
+ end
+ end
+ end
+
+ describe '#max_iteration_sec' do
+ it 'is 1 hour by default' do
+ expect(subject.max_iteration_sec).to eq(60 * 60)
+ end
+ end
+
+ describe '#min_iteration_sec' do
+ it 'is 10 seconds by default' do
+ expect(subject.min_iteration_sec).to eq(10)
+ end
+ end
+
+ describe '#backoff_factor' do
+ it 'is 1.5 by default' do
+ expect(subject.backoff_factor).to eq(1.5)
+ end
+ end
+
+ def backoff_exception(duration)
+ body = "{
+ \"error\": {
+ \"code\": 409,
+ \"message\": \"generic::aborted: action throttled, backoff for #{duration}\",
+ \"errors\": [
+ {
+ \"message\": \"generic::aborted: action throttled, backoff for #{duration}\",
+ \"domain\": \"global\",
+ \"reason\": \"aborted\"
+ }
+ ],
+ \"status\": \"ABORTED\"
+ }
+ }
+ "
+ ::Google::Cloud::AlreadyExistsError.new(body) # AbortedError
+ end
+
+ # rubocop:enable RSpec/InstanceVariable
+end
diff --git a/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/object.stackprof b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/object.stackprof
new file mode 100644
index 00000000000..781e38dcb05
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/object.stackprof
Binary files differ
diff --git a/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/pprof_builder_spec.rb b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/pprof_builder_spec.rb
new file mode 100644
index 00000000000..5c94a8e1e44
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/pprof_builder_spec.rb
@@ -0,0 +1,103 @@
+# frozen_string_literal: true
+
+require 'cloud_profiler_agent'
+
+RSpec.describe CloudProfilerAgent::PprofBuilder, feature_category: :application_performance do
+ subject { described_class.new(profile, start_time, end_time) }
+
+ # load_profile loads one of the example profiles created by
+ # script/generate_profile.rb
+ def load_profile(name)
+ # We are disabling this security check since we are loading static files that we generated ourselves, and it is
+ # only used in specs. This is the same method StackProf uses:
+ # https://github.com/tmm1/stackprof/blob/master/lib/stackprof/report.rb#L14
+ Marshal.load(File.binread(File.expand_path("#{name}.stackprof", __dir__))) # rubocop:disable Security/MarshalLoad
+ end
+
+ def get_str(index)
+ message.string_table.fetch(index)
+ end
+
+ let(:start_time) { Time.new(2020, 10, 31, 17, 12, 0) }
+ let(:end_time) { Time.new(2020, 10, 31, 17, 12, 30) }
+
+ # message is the protobuf object, which typically gets serialized and gzip'd
+ # before being sent to the Profiler API or written to disk. Rather than
+ # unzipping and deserializing all the time, we will be making a lot of
+ # assertions about the message directly.
+ let(:message) { subject.message }
+
+ context 'with :cpu profile' do
+ let(:profile) { load_profile(:cpu) }
+
+ it 'has a sample type of [["cpu", "nanoseconds"]]' do
+ expect(message.sample_type.length).to eq(1)
+
+ sample_type = message.sample_type.first
+ expect(get_str(sample_type.type)).to eq('cpu')
+ expect(get_str(sample_type.unit)).to eq('nanoseconds')
+ end
+
+ it 'has a period of 100,000 cpu nanoseconds' do
+ expect(message.period).to eq(100_000)
+ period_type = message.period_type
+ expect(get_str(period_type.type)).to eq('cpu')
+ expect(get_str(period_type.unit)).to eq('nanoseconds')
+ end
+
+ it 'has a duration of 30 seconds' do
+ expect(message.duration_nanos).to eq(30 * 1_000_000_000)
+ end
+
+ it 'has the start time' do
+ expect(message.time_nanos).to eq(start_time.to_i * 1_000_000_000)
+ end
+ end
+
+ context 'with :wall profile' do
+ let(:profile) { load_profile(:wall) }
+
+ it 'has a sample type of [["wall", "nanoseconds"]]' do
+ expect(message.sample_type.length).to eq(1)
+
+ sample_type = message.sample_type.first
+ expect(get_str(sample_type.type)).to eq('wall')
+ expect(get_str(sample_type.unit)).to eq('nanoseconds')
+ end
+
+ it 'has a period of 100,000 wall nanoseconds' do
+ expect(message.period).to eq(100_000)
+ period_type = message.period_type
+ expect(get_str(period_type.type)).to eq('wall')
+ expect(get_str(period_type.unit)).to eq('nanoseconds')
+ end
+
+ it 'has a sum time of about 1 second' do
+ sum_nanos = 0
+ message.sample.each do |sample|
+ sum_nanos += sample.value.first
+ end
+
+ expect(sum_nanos).to be_within(1_000_000).of(1_000_000_000)
+ end
+ end
+
+ context 'with :object profile' do
+ let(:profile) { load_profile(:object) }
+
+ it 'has a sample type of [["alloc_objects", "count"]]' do
+ expect(message.sample_type.length).to eq(1)
+
+ sample_type = message.sample_type.first
+ expect(get_str(sample_type.type)).to eq('alloc_objects')
+ expect(get_str(sample_type.unit)).to eq('count')
+ end
+
+ it 'has a period of 100 alloc_objects count' do
+ expect(message.period).to eq(100)
+ period_type = message.period_type
+ expect(get_str(period_type.type)).to eq('alloc_objects')
+ expect(get_str(period_type.unit)).to eq('count')
+ end
+ end
+end
diff --git a/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/wall.stackprof b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/wall.stackprof
new file mode 100644
index 00000000000..90db8c3721e
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/cloud_profiler_agent/wall.stackprof
Binary files differ
diff --git a/vendor/gems/cloud_profiler_agent/spec/spec_helper.rb b/vendor/gems/cloud_profiler_agent/spec/spec_helper.rb
new file mode 100644
index 00000000000..e02fd27e9c8
--- /dev/null
+++ b/vendor/gems/cloud_profiler_agent/spec/spec_helper.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ config.expect_with :rspec do |expectations|
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ config.mock_with :rspec do |mocks|
+ mocks.verify_partial_doubles = true
+ end
+
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+ config.filter_run_when_matching :focus
+ config.example_status_persistence_file_path = 'spec/examples.txt'
+ config.disable_monkey_patching!
+ config.warnings = true
+ config.default_formatter = 'doc' if config.files_to_run.one?
+ config.order = :random
+ Kernel.srand config.seed
+end
diff --git a/vendor/gems/kubeclient/.gitignore b/vendor/gems/kubeclient/.gitignore
deleted file mode 100644
index a0afe33a553..00000000000
--- a/vendor/gems/kubeclient/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/.bundle/
-/.yardoc
-/Gemfile.lock
-/_yardoc/
-/coverage/
-/doc/
-/pkg/
-/spec/reports/
-/tmp/
-*.bundle
-*.so
-*.o
-*.a
-mkmf.log
-*.idea*
-/Gemfile.dev.rb
diff --git a/vendor/gems/kubeclient/CHANGELOG.md b/vendor/gems/kubeclient/CHANGELOG.md
deleted file mode 100644
index 3237d4a3c2d..00000000000
--- a/vendor/gems/kubeclient/CHANGELOG.md
+++ /dev/null
@@ -1,247 +0,0 @@
-# Changelog
-
-Notable changes to this project will be documented in this file.
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
-Kubeclient release versioning follows [SemVer](https://semver.org/).
-
-## 4.9.3 — 2021-03-23
-
-### Fixed
-
-- VULNERABILITY FIX: Previously, whenever kubeconfig did not define custom CA
- (normal situation for production clusters with public domain and certificate!),
- `Config` was returning ssl_options[:verify_ssl] hard-coded to `VERIFY_NONE` :-(
-
- Assuming you passed those ssl_options to Kubeclient::Client, this means that
- instead of checking server's certificate against your system CA store,
- it would accept ANY certificate, allowing easy man-in-the middle attacks.
-
- This is especially dangerous with user/password or token credentials
- because MITM attacker could simply steal those credentials to the cluster
- and do anything you could do on the cluster.
-
- This was broken IN ALL RELEASES MADE BEFORE 2022, ever since
- [`Kubeclient::Config` was created](https://github.com/ManageIQ/kubeclient/pull/127/files#diff-32e70f2f6781a9e9c7b83ae5e7eaf5ffd068a05649077fa38f6789e72f3de837R41-R48).
-
-- Bug fix: kubeconfig `insecure-skip-tls-verify` field was ignored.
- When kubeconfig did define custom CA, `Config` was returning hard-coded `VERIFY_PEER`.
-
- Now we honor it, return `VERIFY_NONE` iff kubeconfig has explicit
- `insecure-skip-tls-verify: true`, otherwise `VERIFY_PEER`.
-
-- `Config`: fixed parsing of `certificate-authority` file containing concatenation of
- several certificates. Previously, server's cert was checked against only first CA cert,
- resulting in possible "certificate verify failed" errors.
-
- An important use case is a chain of root & intermediate cert(s) - necessary when cluster's CA
- itself is signed by another custom CA.
- But also helps when you simply concatenate independent certs. (#461, #552)
-
- - Still broken (#460): inline `certificate-authority-data` is still parsed using `add_cert`
- method that handles only one cert.
-
-These don't affect code that supplies `Client` parameters directly,
-only code that uses `Config`.
-
-## 4.9.2 — 2021-05-30
-
-### Added
-- Ruby 3.0 compatibility (#500, #505).
-
-### Removed
-- Reduce .gem size by dropping test/ directory, it's useless at run time (#502).
-
-## 4.9.1 — 2020-08-31
-### Fixed
-- Now should work with apiserver deployed not at root of domain but a sub-path,
- which is standard with Rancher.
- Notably, `create_...` methods were sending bad apiVersion and getting 400 error.
- (#457, hopefully fixes #318, #418 and https://gitlab.com/gitlab-org/gitlab/-/issues/22043)
-
-## 4.9.0 - 2020-08-03
-### Added
-- Support for `user: exec` credential plugins using TLS client auth (#453)
-
-## 4.8.0 — 2020-07-03
-
-### Added
-- Support for server-side apply (#448).
-
-### Fixed
-- Declared forgotten dependency on jsonpath, needed for `gcp` provider with `cmd-path` (#450).
-
-## 4.7.0 — 2020-06-14
-
-### Fixed
-- Ruby 2.7 compatibility: bumped minimum recursive-open-struct to one that works on 2.7 (#439).
-- Ruby 2.7 warnings (#433, #438).
-- Improved watch documentation, including behavior planned to change in 5.0.0 (#436).
-
-### Added
-- Google Application Default Credentials: Added `userinfo.email` to requested scopes, which is necessary for RBAC policies (#441).
-
-## 4.6.0 — 2019-12-30
-
-### Fixed
-- AmazonEksCredentials was sometimes leaving base64 padding that IAM auth of the EKS cluster rejects. Now padding is always stripped. (#424, #423)
-
-### Added
-- Allow calling `watch_foos` methods with a block, simpler to use and guarantees closing the connection. (#425)
-
-- Support `limitBytes` query parameter for `get_pod_log`. (#426)
-
-## 4.5.0 — 2019-09-27
-
-### Added
-- Support `:resourceVersion` parameter in `get_foos` methods (similar to existing support in `watch_foos` methods). (#420)
-
-- Relax dependency on `http` gem to allow both 3.x and 4.x. (#413)
-
-## 4.4.0 — 2019-05-03
-
-### Added
-- GCP configs with `user[auth-provider][name] == 'gcp'` will execute credential plugin (normally the `gcloud config config-helper` subcommand) when the config specifies it in `cmd-path`, `cmd-args` fields (similar to `exec` support). This code path works without `googleauth` gem. Otherwise, `GoogleApplicationDefaultCredentials` path will be tried as before. (#410)
-- `AmazonEksCredentials` helper for obtaining a token to authenticate against Amazon EKS. This is not currently integrated in `Config`, you will need to invoke it yourself. You'll need some aws gems that Kubeclient _does not_ include. (#404, #406)
-
-### Changed
-- OpenID Connect tokens which cannot be validaded because we cannot identify the key they were signed with will be considered expired and refreshed as usual. (#407)
-
-## 4.3.0 — 2019-03-03
-
-### Changed
-- `GoogleApplicationDefaultCredentials` will now automatically be used by `Config` if the `user[auth-provider][name] == 'gcp'` in the provided context. Note that `user[exec]` is checked first in anticipation of this functionality being added to GCP sometime in the future. Kubeclient _does not_ include the required `googleauth` gem, so you will need to include it in your calling application. (#394)
-
-### Added
-- OpenID Connect credentials will automatically be used if the `user[auth-provider][name] == 'oidc'` in the provided context. Note that `user[exec]` is checked first. Kubeclient _does not_ include the required `openid_connect` gem, so you will need to include it in your calling application. (#396)
-
-- Support for `json_patch_#{entity}` and `merge_patch_#{entity}`. `patch_#{entity}` will continue to use strategic merge patch. (#390)
-
-## 4.2.2 — 2019-01-09
-
-### Added
-- New `http_max_redirects` option (#374).
-
-### Changed
-- Default max redirects for watch increased from 4 to 10, to match other verbs (#374).
-
-## 4.2.1 — 2018-12-26
-
-### Fixed
-- For resources that contain dashes in name, there will be an attempt to resolve the method name based on singular name prefix or by replacing the dash in names with underscores (#383).
-
-## 4.2.0 — 2018-12-20
-
-### Added
-- Support `user: exec: ...` credential plugins like in Go client (#363, #375).
-
-### Security
-- Really made `Kubeclient::Config.new(data, nil)` prevent external file lookups. (#372)
- README documented this since 3.1.1 (#334) but alas that was a lie — absolute paths always worked.
- Now this also prevents credential plugin execution.
-
- Even in this mode, using config from untrusted sources is not recommended.
-
-This release included all changes up to 4.1.1, but NOT 4.1.2 which was branched off later (4.2.1 does include same fix).
-
-## 4.1.2 — 2018-12-26
-
-### Fixed
-- For resources that contain dashes in name, there will be an attempt to resolve the method name based on singular name prefix or by replacing the dash in names with underscores (#382).
-
-## 4.1.1 — 2018-12-17
-
-### Fixed
-- Fixed method names for non-suffix plurals such as y -> ies (#377).
-
-## 4.1.0 — 2018-11-28 — REGRESSION
-
-This version broke method names where plural is not just adding a suffix, notably y -> ies (bug #376).
-
-### Fixed
-- Support custom resources with lowercase `kind` (#361).
-- `create_security_context_constraint` now works (#366).
-- `get_security_context_constraints.kind`, `get_endpoints.kind` are now plural as in kubernetes (#366).
-
-### Added
-- Add support for retrieving large lists of objects in chunks (#356).
-
-## 4.0.0 — 2018-07-23
-
-### Removed
-- Bumped officially supported kubernetes versions to >= 1.3.
-- Specifically `proxy_url` no longer works for <= 1.2 (#323).
-
-### Fixed
-- `proxy_url` now works for kubernetes 1.10 and later (#323).
-
-### Changed
-- Switched `http` gem dependency from 2.y to 3.y (#321).
-
-## 3.1.2 — 2018-06-11
-
-### Fixed
-- Fixed `Kubeclient::Config.read` regression, no longer crashes on YAML timestamps (#338).
-
-## 3.1.1 - 2018-06-01 — REGRESSION
-
-In this version `Kubeclient::Config.read` raises Psych::DisallowedClass on legal yaml configs containing a timestamp, for example gcp access-token expiry (bug #337).
-
-### Security
-- Changed `Kubeclient::Config.read` to use `YAML.safe_load` (#334).
-
- Previously, could deserialize arbitrary ruby classes. The risk depends on ruby classes available in the application; sometimes a class may have side effects - up to arbitrary code execution - when instantiated and/or built up with `x[key] = value` during YAML parsing.
-
- Despite this fix, using config from untrusted sources is not recommended.
-
-## 3.1.0 - 2018-05-27
-
-### Fixed
-- Fixed watch `.finish` sometimes caused `HTTP::ConnectionError` exception from the reading loop (#315).
-
-### Added
-- `get_pod_log` now has `timestamps`, `since_time` (#319) and `tail_lines` (#326) params.
-- `Kubeclient::Config::Context#namespace` now set, if present in kubeconfig file (#308).
-- Improved README directions for authenticating within a kubernetes cluster (#316).
-- `Kubeclient::GoogleApplicationDefaultCredentials` helper for Google application default credentials (#213). Needs `googleauth` gem.
-- New `as: :parsed` and `as: :parsed_symbolized` formats (#306).
-- Allow setting default `as:` format for the whole client (#299, #305).
-- Relaxed `recursive-open-struct` dependency to allow 1.1+ as well (#313).
-
-## 3.0.0 - 2018-02-04
-### Removed
-- Dropped entity classes (`Kubeclient::Pod` etc.), only `Kubeclient::Resource` exists now (#292, #288).
-- Ruby 2.0, 2.1 no longer supported (#253, #291).
-
-### Fixed
-- Added missing singular `get_security_context_constraint`, fixed `get_security_context_constraints` to mean plural (#261).
-- Fixed `@http_proxy_uri` undefined warning (#261).
-- Documentation fixes & improvements (#225, #229, #243, #296).
-
-### Added
-- `delete_options:` parameter to `delete_*` methods, useful for cascade delete (#267).
-- `as: :raw` option for watch (#285).
-- Now raises `Kubeclient::HttpError`. Rescuing `KubeException` still works but is deprecated. (#195, #288)
- - 404 error raise `Kubeclient::ResourceNotFoundError`, a subclass of `HttpError` (#233).
-- Include request info in exception message (#221).
-- Ruby 2.4 and 2.5 are now supported & tested (#247, #295).
-
-### Changed
-- `Kubeclient::Config#context(nonexistent_context_name)` raises `KeyError` instead of `RuntimeError`.
-- `update_*`, `delete_*`, `patch_*` now all return `RecursiveOpenStruct` consistently (#290).
-- Many dependencies bumped (#204, #231, #253, #269).
-
-## 2.5.2 - 2018-02-04
-- Watch results are now `RecursiveOpenStruct` inside arrays too (#279).
-- Fixed watch `.finish` sometimes caused `Errno::EBADF` exception from the reading loop (#280).
-- Easing dependency version (#287, #301)
-
-## 2.5.1 - 2017-10-12
-No changes since 2.5.0, fixed packaging mistake.
-
-## [2.5.0 - 2017-10-12 was YANKED]
-
-### Added
-
-- `as: raw` option for `get_*` methods returning a string (#262 via #271).
-
-## 2.4.0 - 2017-05-10
diff --git a/vendor/gems/kubeclient/Gemfile b/vendor/gems/kubeclient/Gemfile
deleted file mode 100644
index da50b39459f..00000000000
--- a/vendor/gems/kubeclient/Gemfile
+++ /dev/null
@@ -1,7 +0,0 @@
-source 'https://rubygems.org'
-
-dev_gemfile = File.expand_path('Gemfile.dev.rb', __dir__)
-eval_gemfile(dev_gemfile) if File.exist?(dev_gemfile)
-
-# Specify your gem's dependencies in kubeclient.gemspec
-gemspec
diff --git a/vendor/gems/kubeclient/LICENSE.txt b/vendor/gems/kubeclient/LICENSE.txt
deleted file mode 100644
index c79ef416c4b..00000000000
--- a/vendor/gems/kubeclient/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2014 Alissa Bonas
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/gems/kubeclient/README.md b/vendor/gems/kubeclient/README.md
deleted file mode 100644
index 6cf0fb67293..00000000000
--- a/vendor/gems/kubeclient/README.md
+++ /dev/null
@@ -1,889 +0,0 @@
-# Kubeclient
-
-[![Gem Version](https://badge.fury.io/rb/kubeclient.svg)](http://badge.fury.io/rb/kubeclient)
-[![Build Status](https://travis-ci.org/abonas/kubeclient.svg?branch=master)](https://travis-ci.org/abonas/kubeclient)
-[![Code Climate](http://img.shields.io/codeclimate/github/abonas/kubeclient.svg)](https://codeclimate.com/github/abonas/kubeclient)
-
-A Ruby client for Kubernetes REST api.
-The client supports GET, POST, PUT, DELETE on all the entities available in kubernetes in both the core and group apis.
-The client currently supports Kubernetes REST api version v1.
-To learn more about groups and versions in kubernetes refer to [k8s docs](https://kubernetes.io/docs/api/)
-
-## VULNERABILITY❗
-
-If you use `Kubeclient::Config`, all gem versions released before 2022 could return incorrect `ssl_options[:verify_ssl]`,
-endangering your connection and cluster credentials.
-See [latest CHANGELOG.md](https://github.com/ManageIQ/kubeclient/blob/master/CHANGELOG.md) for details and which versions got a fix.
-Open an issue if you want a backport to another version.
-
-## Installation
-
-Add this line to your application's Gemfile:
-
-```ruby
-gem 'kubeclient'
-```
-
-And then execute:
-
-```Bash
-bundle
-```
-
-Or install it yourself as:
-
-```Bash
-gem install kubeclient
-```
-
-## Usage
-
-Initialize the client:
-
-```ruby
-client = Kubeclient::Client.new('http://localhost:8080/api/', "v1")
-```
-
-Or without specifying version (it will be set by default to "v1")
-
-```ruby
-client = Kubeclient::Client.new('http://localhost:8080/api/')
-```
-
-For A Group Api:
-
-```ruby
-client = Kubeclient::Client.new('http://localhost:8080/apis/batch', 'v1')
-```
-
-Another option is to initialize the client with URI object:
-
-```ruby
-uri = URI::HTTP.build(host: "somehostname", port: 8080)
-client = Kubeclient::Client.new(uri)
-```
-
-### SSL
-
-It is also possible to use https and configure ssl with:
-
-```ruby
-ssl_options = {
- client_cert: OpenSSL::X509::Certificate.new(File.read('/path/to/client.crt')),
- client_key: OpenSSL::PKey::RSA.new(File.read('/path/to/client.key')),
- ca_file: '/path/to/ca.crt',
- verify_ssl: OpenSSL::SSL::VERIFY_PEER
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', "v1", ssl_options: ssl_options
-)
-```
-
-As an alternative to the `ca_file` it's possible to use the `cert_store`:
-
-```ruby
-cert_store = OpenSSL::X509::Store.new
-cert_store.add_cert(OpenSSL::X509::Certificate.new(ca_cert_data))
-ssl_options = {
- cert_store: cert_store,
- verify_ssl: OpenSSL::SSL::VERIFY_PEER
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', "v1", ssl_options: ssl_options
-)
-```
-
-For testing and development purpose you can disable the ssl check with:
-
-```ruby
-ssl_options = { verify_ssl: OpenSSL::SSL::VERIFY_NONE }
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', ssl_options: ssl_options
-)
-```
-
-### Authentication
-
-If you are using basic authentication or bearer tokens as described
-[here](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/authentication.md) then you can specify one
-of the following:
-
-```ruby
-auth_options = {
- username: 'username',
- password: 'password'
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', auth_options: auth_options
-)
-```
-
-or
-
-```ruby
-auth_options = {
- bearer_token: 'MDExMWJkMjItOWY1Ny00OGM5LWJlNDEtMjBiMzgxODkxYzYz'
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', auth_options: auth_options
-)
-```
-
-or
-
-```ruby
-auth_options = {
- bearer_token_file: '/path/to/token_file'
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', auth_options: auth_options
-)
-```
-
-#### Inside a Kubernetes cluster
-
-The [recommended way to locate the API server](https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod) within the pod is with the `kubernetes.default.svc` DNS name, which resolves to a Service IP which in turn will be routed to an API server.
-
-The recommended way to authenticate to the API server is with a [service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/). kube-system associates a pod with a service account and a bearer token for that service account is placed into the filesystem tree of each container in that pod at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
-
-If available, a certificate bundle is placed into the filesystem tree of each container at `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`, and should be used to verify the serving certificate of the API server.
-
-For example:
-
-```ruby
-auth_options = {
- bearer_token_file: '/var/run/secrets/kubernetes.io/serviceaccount/token'
-}
-ssl_options = {}
-if File.exist?("/var/run/secrets/kubernetes.io/serviceaccount/ca.crt")
- ssl_options[:ca_file] = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
-end
-client = Kubeclient::Client.new(
- 'https://kubernetes.default.svc',
- 'v1',
- auth_options: auth_options,
- ssl_options: ssl_options
-)
-```
-
-Finally, the default namespace to be used for namespaced API operations is placed in a file at `/var/run/secrets/kubernetes.io/serviceaccount/namespace` in each container. It is recommended that you use this namespace when issuing API commands below.
-
-```ruby
-namespace = File.read('/var/run/secrets/kubernetes.io/serviceaccount/namespace')
-```
-You can find information about tokens in [this guide](https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod) and in [this reference](http://kubernetes.io/docs/admin/authentication/).
-
-### Non-blocking IO
-
-You can also use kubeclient with non-blocking sockets such as Celluloid::IO, see [here](https://github.com/httprb/http/wiki/Parallel-requests-with-Celluloid%3A%3AIO)
-for details. For example:
-
-```ruby
-require 'celluloid/io'
-socket_options = {
- socket_class: Celluloid::IO::TCPSocket,
- ssl_socket_class: Celluloid::IO::SSLSocket
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', socket_options: socket_options
-)
-```
-
-This affects only `.watch_*` sockets, not one-off actions like `.get_*`, `.delete_*` etc.
-
-### Proxies
-
-You can also use kubeclient with an http proxy server such as tinyproxy. It can be entered as a string or a URI object.
-For example:
-```ruby
-proxy_uri = URI::HTTP.build(host: "myproxyhost", port: 8443)
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', http_proxy_uri: proxy_uri
-)
-```
-
-### Redirects
-
-You can optionally not allow redirection with kubeclient. For example:
-
-```ruby
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', http_max_redirects: 0
-)
-```
-
-### Timeouts
-
-Watching configures the socket to never time out (however, sooner or later all watches terminate).
-
-One-off actions like `.get_*`, `.delete_*` have a configurable timeout:
-```ruby
-timeouts = {
- open: 10, # unit is seconds
- read: nil # nil means never time out
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', timeouts: timeouts
-)
-```
-
-Default timeouts match `Net::HTTP` and `RestClient`, which unfortunately depends on ruby version:
-- open was infinite up to ruby 2.2, 60 seconds in 2.3+.
-- read is 60 seconds.
-
-If you want ruby-independent behavior, always specify `:open`.
-
-### Discovery
-
-Discovery from the kube-apiserver is done lazily on method calls so it would not change behavior.
-
-It can also be done explicitly:
-
-```ruby
-client = Kubeclient::Client.new('http://localhost:8080/api', 'v1')
-client.discover
-```
-
-It is possible to check the status of discovery
-
-```ruby
-unless client.discovered
- client.discover
-end
-```
-
-### Kubeclient::Config
-
-If you've been using `kubectl` and have a `.kube/config` file (possibly referencing other files in fields such as `client-certificate`), you can auto-populate a config object using `Kubeclient::Config`:
-
-```ruby
-# assuming $KUBECONFIG is one file, won't merge multiple like kubectl
-config = Kubeclient::Config.read(ENV['KUBECONFIG'] || '/path/to/.kube/config')
-```
-
-This will lookup external files; relative paths will be resolved relative to the file's directory, if config refers to them with relative path.
-This includes external [`exec:` credential plugins][exec] to be executed.
-
-[exec]: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins
-
-You can also construct `Config` directly from nested data. For example if you have JSON or YAML config data in a variable:
-
-```ruby
-config = Kubeclient::Config.new(YAML.safe_load(yaml_text), nil)
-# or
-config = Kubeclient::Config.new(JSON.parse(json_text), nil)
-```
-
-The 2nd argument is a base directory for finding external files, if config refers to them with relative path.
-Setting it to `nil` disables file lookups, and `exec:` execution - such configs will raise an exception. (A config can be self-contained by using inline fields such as `client-certificate-data`.)
-
-To create a client based on a Config object:
-
-```ruby
-# default context according to `current-context` field:
-context = config.context
-# or to use a specific context, by name:
-context = config.context('default/192-168-99-100:8443/system:admin')
-
-Kubeclient::Client.new(
- context.api_endpoint,
- 'v1',
- ssl_options: context.ssl_options,
- auth_options: context.auth_options
-)
-```
-
-
-#### Amazon EKS Credentials
-
-On Amazon EKS by default the authentication method is IAM. When running kubectl a temporary token is generated by shelling out to
-the aws-iam-authenticator binary which is sent to authenticate the user.
-See [aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator).
-To replicate that functionality, the `Kubeclient::AmazonEksCredentials` class can accept a set of IAM credentials and
-contains a helper method to generate the authentication token for you.
-
-This requires a set of gems which are _not_ included in
-`kubeclient` dependencies (`aws-sigv4`) so you should add them to your bundle.
-You will also require either the `aws-sdk` v2 or `aws-sdk-core` v3 gems to generate the required `Aws:Credentials` object to pass to this method.
-
-To obtain a token:
-
-```ruby
-require 'aws-sdk-core'
-# Use keys
-credentials = Aws::Credentials.new(access_key, secret_key)
-# Or a profile
-credentials = Aws::SharedCredentials.new(profile_name: 'default').credentials
-
-auth_options = {
- bearer_token: Kubeclient::AmazonEksCredentials.token(credentials, eks_cluster_name)
-}
-client = Kubeclient::Client.new(
- eks_cluster_https_endpoint, 'v1', auth_options: auth_options
-)
-```
-
-Note that this returns a token good for one minute. If your code requires authorization for longer than that, you should plan to
-acquire a new one, see [How to manually renew](#how-to-manually-renew-expired-credentials) section.
-
-#### Google GCP credential plugin
-
-If kubeconfig file has `user: {auth-provider: {name: gcp, cmd-path: ..., cmd-args: ..., token-key: ...}}`, the command will be executed to obtain a token.
-(Normally this would be a `gcloud config config-helper` command.)
-
-Note that this returns an expiring token. If your code requires authorization for a long time, you should plan to acquire a new one, see [How to manually renew](#how-to-manually-renew-expired-credentials) section.
-
-#### Google's Application Default Credentials
-
-On Google Compute Engine, Google App Engine, or Google Cloud Functions, as well as `gcloud`-configured systems
-with [application default credentials](https://developers.google.com/identity/protocols/application-default-credentials),
-kubeclient can use `googleauth` gem to authorize.
-
-This requires the [`googleauth` gem](https://github.com/google/google-auth-library-ruby) that is _not_ included in
-`kubeclient` dependencies so you should add it to your bundle.
-
-If you use `Config.context(...).auth_options` and the kubeconfig file has `user: {auth-provider: {name: gcp}}`, but does not contain `cmd-path` key, kubeclient will automatically try this (raising LoadError if you don't have `googleauth` in your bundle).
-
-Or you can obtain a token manually:
-
-```ruby
-require 'googleauth'
-
-auth_options = {
- bearer_token: Kubeclient::GoogleApplicationDefaultCredentials.token
-}
-client = Kubeclient::Client.new(
- 'https://localhost:8443/api/', 'v1', auth_options: auth_options
-)
-```
-
-Note that this returns a token good for one hour. If your code requires authorization for longer than that, you should plan to
-acquire a new one, see [How to manually renew](#how-to-manually-renew-expired-credentials) section.
-
-#### OIDC Auth Provider
-
-If the cluster you are using has OIDC authentication enabled you can use the `openid_connect` gem to obtain
-id-tokens if the one in your kubeconfig has expired.
-
-This requires the [`openid_connect` gem](https://github.com/nov/openid_connect) which is not included in
-the `kubeclient` dependencies so should be added to your own applications bundle.
-
-The OIDC Auth Provider will not perform the initial setup of your `$KUBECONFIG` file. You will need to use something
-like [`dexter`](https://github.com/gini/dexter) in order to configure the auth-provider in your `$KUBECONFIG` file.
-
-If you use `Config.context(...).auth_options` and the `$KUBECONFIG` file has user: `{auth-provider: {name: oidc}}`,
-kubeclient will automatically obtain a token (or use `id-token` if still valid)
-
-Tokens are typically short-lived (e.g. 1 hour) and the expiration time is determined by the OIDC Provider (e.g. Google).
-If your code requires authentication for longer than that you should obtain a new token periodically, see [How to manually renew](#how-to-manually-renew-expired-credentials) section.
-
-Note: id-tokens retrieved via this provider are not written back to the `$KUBECONFIG` file as they would be when
-using `kubectl`.
-
-#### How to manually renew expired credentials
-
-Kubeclient [does not yet](https://github.com/abonas/kubeclient/issues/393) help with this.
-
-The division of labor between `Config` and `Context` objects may change, for now please make no assumptions at which stage `exec:` and `auth-provider:` are handled and whether they're cached.
-The currently guaranteed way to renew is create a new `Config` object.
-
-The more painful part is that you'll then need to create new `Client` object(s) with the credentials from new config.
-So repeat all of this:
-```ruby
-config = Kubeclient::Config.read(ENV['KUBECONFIG'] || '/path/to/.kube/config')
-context = config.context
-ssl_options = context.ssl_options
-auth_options = context.auth_options
-
-client = Kubeclient::Client.new(
- context.api_endpoint, 'v1',
- ssl_options: ssl_options, auth_options: auth_options
-)
-# and additional Clients if needed...
-```
-
-#### Security: Don't use config from untrusted sources
-
-`Config.read` is catastrophically unsafe — it will execute arbitrary command lines specified by the config!
-
-`Config.new(data, nil)` is better but Kubeclient was never reviewed for behaving safely with malicious / malformed config.
-It might crash / misbehave in unexpected ways...
-
-#### namespace
-
-Additionally, the `config.context` object will contain a `namespace` attribute, if it was defined in the file.
-It is recommended that you use this namespace when issuing API commands below.
-This is the same behavior that is implemented by `kubectl` command.
-
-You can read it as follows:
-
-```ruby
-puts config.context.namespace
-```
-
-### Supported kubernetes versions
-
-We try to support the last 3 minor versions, matching the [official support policy for Kubernetes](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#supported-releases-and-component-skew).
-Kubernetes 1.2 and below have known issues and are unsupported.
-Kubernetes 1.3 presumed to still work although nobody is really testing on such old versions...
-
-## Supported actions & examples:
-
-Summary of main CRUD actions:
-
-```
-get_foos(namespace: 'namespace', **opts) # namespaced collection
-get_foos(**opts) # all namespaces or global collection
-
-get_foo('name', 'namespace', opts) # namespaced
-get_foo('name', nil, opts) # global
-
-watch_foos(namespace: ns, **opts) # namespaced collection
-watch_foos(**opts) # all namespaces or global collection
-watch_foos(namespace: ns, name: 'name', **opts) # namespaced single object
-watch_foos(name: 'name', **opts) # global single object
-
-delete_foo('name', 'namespace', opts) # namespaced
-delete_foo('name', nil, opts) # global
-
-create_foo(Kubeclient::Resource.new({metadata: {name: 'name', namespace: 'namespace', ...}, ...}))
-create_foo(Kubeclient::Resource.new({metadata: {name: 'name', ...}, ...})) # global
-
-update_foo(Kubeclient::Resource.new({metadata: {name: 'name', namespace: 'namespace', ...}, ...}))
-update_foo(Kubeclient::Resource.new({metadata: {name: 'name', ...}, ...})) # global
-
-patch_foo('name', patch, 'namespace') # namespaced
-patch_foo('name', patch) # global
-
-apply_foo(Kubeclient::Resource.new({metadata: {name: 'name', namespace: 'namespace', ...}, ...}), field_manager: 'myapp', **opts)
-apply_foo(Kubeclient::Resource.new({metadata: {name: 'name', ...}, ...}), field_manager: 'myapp', **opts) # global
-```
-
-These grew to be quite inconsistent :confounded:, see https://github.com/abonas/kubeclient/issues/312 and https://github.com/abonas/kubeclient/issues/332 for improvement plans.
-
-### Get all instances of a specific entity type
-Such as: `get_pods`, `get_secrets`, `get_services`, `get_nodes`, `get_replication_controllers`, `get_resource_quotas`, `get_limit_ranges`, `get_persistent_volumes`, `get_persistent_volume_claims`, `get_component_statuses`, `get_service_accounts`
-
-```ruby
-pods = client.get_pods
-```
-
-Get all entities of a specific type in a namespace:
-
-```ruby
-services = client.get_services(namespace: 'development')
-```
-
-You can get entities which have specific labels by specifying a parameter named `label_selector` (named `labelSelector` in Kubernetes server):
-
-```ruby
-pods = client.get_pods(label_selector: 'name=redis-master')
-```
-
-You can specify multiple labels (that option will return entities which have both labels:
-
-```ruby
-pods = client.get_pods(label_selector: 'name=redis-master,app=redis')
-```
-
-There is also [a limited ability to filter by *some* fields](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/). Which fields are supported is not documented, you can try and see if you get an error...
-```ruby
-client.get_pods(field_selector: 'spec.nodeName=master-0')
-```
-
-You can ask for entities at a specific version by specifying a parameter named `resource_version`:
-```ruby
-pods = client.get_pods(resource_version: '0')
-```
-but it's not guaranteed you'll get it. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions to understand the semantics.
-
-With default (`as: :ros`) return format, the returned object acts like an array of the individual pods, but also supports a `.resourceVersion` method.
-
-With `:parsed` and `:parsed_symbolized` formats, the returned data structure matches kubernetes list structure: it's a hash containing `metadata` and `items` keys, the latter containing the individual pods.
-
-#### Get all entities of a specific type in chunks
-
-```ruby
-continue = nil
-loop do
- entities = client.get_pods(limit: 1_000, continue: continue)
- continue = entities.continue
-
- break if entities.last?
-end
-```
-
-See https://kubernetes.io/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks for more information.
-
-The continue tokens expire after a short amount of time, so similar to a watch if you don't request a subsequent page within aprox. 5 minutes of the previous page being returned the server will return a `410 Gone` error and the client must request the list from the start (i.e. omit the continue token for the next call).
-
-Support for chunking was added in v1.9 so previous versions will ignore the option and return the full collection.
-
-#### Get a specific instance of an entity (by name)
-Such as: `get_service "service name"` , `get_pod "pod name"` , `get_replication_controller "rc name"`, `get_secret "secret name"`, `get_resource_quota "resource quota name"`, `get_limit_range "limit range name"` , `get_persistent_volume "persistent volume name"` , `get_persistent_volume_claim "persistent volume claim name"`, `get_component_status "component name"`, `get_service_account "service account name"`
-
-The GET request should include the namespace name, except for nodes and namespaces entities.
-
-```ruby
-node = client.get_node "127.0.0.1"
-```
-
-```ruby
-service = client.get_service "guestbook", 'development'
-```
-
-Note - Kubernetes doesn't work with the uid, but rather with the 'name' property.
-Querying with uid causes 404.
-
-#### Getting raw responses
-
-To avoid overhead from parsing and building `RecursiveOpenStruct` objects for each reply, pass the `as: :raw` option when initializing `Kubeclient::Client` or when calling `get_` / `watch_` methods.
-The result can then be printed, or searched with a regex, or parsed via `JSON.parse(r)`.
-
-```ruby
-client = Kubeclient::Client.new(as: :raw)
-```
-
-or
-
-```ruby
-pods = client.get_pods as: :raw
-node = client.get_node "127.0.0.1", as: :raw
-```
-
-Other formats are:
- - `:ros` (default) for `RecursiveOpenStruct`
- - `:parsed` for `JSON.parse`
- - `:parsed_symbolized` for `JSON.parse(..., symbolize_names: true)`
-
-### Watch — Receive entities updates
-
-See https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes for an overview.
-
-It is possible to receive live update notices watching the relevant entities:
-
-```ruby
-client.watch_pods do |notice|
- # process notice data
-end
-```
-
-The notices have `.type` field which may be `'ADDED'`, `'MODIFIED'`, `'DELETED'`, or currently `'ERROR'`, and an `.object` field containing the object. **UPCOMING CHANGE**: In next major version, we plan to raise exceptions instead of passing on ERROR into the block.
-
-For namespaced entities, the default watches across all namespaces, and you can specify `client.watch_secrets(namespace: 'foo')` to only watch in a single namespace.
-
-You can narrow down using `label_selector:` and `field_selector:` params, like with `get_pods` methods.
-
-You can also watch a single object by specifying `name:` e.g. `client.watch_nodes(name: 'gandalf')` (not namespaced so a name is enough) or `client.watch_pods(namespace: 'foo', name: 'bar')` (namespaced, need both params).
-Note the method name is still plural! There is no `watch_pod`, only `watch_pods`. The yielded "type" remains the same — watch notices, it's just they'll always refer to the same object.
-
-You can use `as:` param to control the format of the yielded notices.
-
-#### All watches come to an end!
-
-While nominally the watch block *looks* like an infinite loop, that's unrealistic. Network connections eventually get severed, and kubernetes apiserver is known to terminate watches.
-
-Unfortunately, this sometimes raises an exception and sometimes the loop just exits. **UPCOMING CHANGE**: In next major version, non-deliberate termination will always raise an exception; the block will only exit silenty if stopped deliberately.
-
-#### Deliberately stopping a watch
-
-You can use `break` or `return` inside the watch block.
-
-It is possible to interrupt the watcher from another thread with:
-
-```ruby
-watcher = client.watch_pods
-
-watcher.each do |notice|
- # process notice data
-end
-# <- control will pass here after .finish is called
-
-### In another thread ###
-watcher.finish
-```
-
-#### Starting watch version
-
-You can specify version to start from, commonly used in "List+Watch" pattern:
-```
-list = client.get_pods
-collection_version = list.resourceVersion
-# or with other return formats:
-list = client.get_pods(as: :parsed)
-collection_version = list['metadata']['resourceVersion']
-
-# note spelling resource_version vs resourceVersion.
-client.watch_pods(resource_version: collection_version) do |notice|
- # process notice data
-end
-```
-It's important to understand [the effects of unset/0/specific resource_version](https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions) as it modifies the behavior of the watch — in some modes you'll first see a burst of synthetic 'ADDED' notices for all existing objects.
-
-If you re-try a terminated watch again without specific resourceVersion, you might see previously seen notices again, and might miss some events.
-
-To attempt resuming a watch from same point, you can try using last resourceVersion observed during the watch. Or do list+watch again.
-
-Whenever you ask for a specific version, you must be prepared for an 410 "Gone" error if the server no longer recognizes it.
-
-#### Watch events about a particular object
-Events are [entities in their own right](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1-core).
-You can use the `field_selector` option as part of the watch methods.
-
-```ruby
-client.watch_events(namespace: 'development', field_selector: 'involvedObject.name=redis-master') do |notice|
- # process notice date
-end
-```
-
-### Delete an entity (by name)
-
-For example: `delete_pod "pod name"` , `delete_replication_controller "rc name"`, `delete_node "node name"`, `delete_secret "secret name"`
-
-Input parameter - name (string) specifying service name, pod name, replication controller name.
-
-```ruby
-deleted = client.delete_service("redis-service")
-```
-
-If you want to cascade delete, for example a deployment, you can use the `delete_options` parameter.
-
-```ruby
-deployment_name = 'redis-deployment'
-namespace = 'default'
-delete_options = Kubeclient::Resource.new(
- apiVersion: 'meta/v1',
- gracePeriodSeconds: 0,
- kind: 'DeleteOptions',
- propagationPolicy: 'Foreground' # Orphan, Foreground, or Background
-)
-client.delete_deployment(deployment_name, namespace, delete_options: delete_options)
-```
-
-### Create an entity
-For example: `create_pod pod_object`, `create_replication_controller rc_obj`, `create_secret secret_object`, `create_resource_quota resource_quota_object`, `create_limit_range limit_range_object`, `create_persistent_volume persistent_volume_object`, `create_persistent_volume_claim persistent_volume_claim_object`, `create_service_account service_account_object`
-
-Input parameter - object of type `Service`, `Pod`, `ReplicationController`.
-
-The below example is for v1
-
-```ruby
-service = Kubeclient::Resource.new
-service.metadata = {}
-service.metadata.name = "redis-master"
-service.metadata.namespace = 'staging'
-service.spec = {}
-service.spec.ports = [{
- 'port' => 6379,
- 'targetPort' => 'redis-server'
-}]
-service.spec.selector = {}
-service.spec.selector.name = "redis"
-service.spec.selector.role = "master"
-service.metadata.labels = {}
-service.metadata.labels.app = 'redis'
-service.metadata.labels.role = 'slave'
-client.create_service(service)
-```
-
-### Update an entity
-For example: `update_pod`, `update_service`, `update_replication_controller`, `update_secret`, `update_resource_quota`, `update_limit_range`, `update_persistent_volume`, `update_persistent_volume_claim`, `update_service_account`
-
-Input parameter - object of type `Pod`, `Service`, `ReplicationController` etc.
-
-The below example is for v1
-
-```ruby
-updated = client.update_service(service1)
-```
-
-### Patch an entity (by name)
-For example: `patch_pod`, `patch_service`, `patch_secret`, `patch_resource_quota`, `patch_persistent_volume`
-
-Input parameters - name (string) specifying the entity name, patch (hash) to be applied to the resource, optional: namespace name (string)
-
-The PATCH request should include the namespace name, except for nodes and namespaces entities.
-
-The below example is for v1
-
-```ruby
-patched = client.patch_pod("docker-registry", {metadata: {annotations: {key: 'value'}}}, "default")
-```
-
-`patch_#{entity}` is called using a [strategic merge patch](https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#notes-on-the-strategic-merge-patch). `json_patch_#{entity}` and `merge_patch_#{entity}` are also available that use JSON patch and JSON merge patch, respectively. These strategies are useful for resources that do not support strategic merge patch, such as Custom Resources. Consult the [Kubernetes docs](https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment) for more information about the different patch strategies.
-
-### Apply an entity
-
-This is similar to `kubectl apply --server-side` (kubeclient doesn't implement logic for client-side apply). See https://kubernetes.io/docs/reference/using-api/api-concepts/#server-side-apply
-
-For example: `apply_pod`
-
-Input parameters - resource (Kubeclient::Resource) representing the desired state of the resource, field_manager (String) to identify the system managing the state of the resource, force (Boolean) whether or not to override a field managed by someone else.
-
-Example:
-
-```ruby
-service = Kubeclient::Resource.new(
- metadata: {
- name: 'redis-master',
- namespace: 'staging',
- },
- spec: {
- ...
- }
-)
-
-client.apply_service(service, field_manager: 'myapp')
-```
-
-### Get all entities of all types : all_entities
-
-Makes requests for all entities of each discovered kind (in this client's API group). This method is a convenience method instead of calling each entity's get method separately.
-
-Returns a hash with keys being the *singular* entity kind, in lowercase underscore style. For example for core API group may return keys `"node'`, `"secret"`, `"service"`, `"pod"`, `"replication_controller"`, `"namespace"`, `"resource_quota"`, `"limit_range"`, `"endpoint"`, `"event"`, `"persistent_volume"`, `"persistent_volume_claim"`, `"component_status"`, `"service_account"`. Each key points to an EntityList of same type.
-
-```ruby
-client.all_entities
-```
-
-### Get a proxy URL
-You can get a complete URL for connecting a kubernetes entity via the proxy.
-
-```ruby
-client.proxy_url('service', 'srvname', 'srvportname', 'ns')
-# => "https://localhost.localdomain:8443/api/v1/proxy/namespaces/ns/services/srvname:srvportname"
-```
-
-Note the third parameter, port, is a port name for services and an integer for pods:
-
-```ruby
-client.proxy_url('pod', 'podname', 5001, 'ns')
-# => "https://localhost.localdomain:8443/api/v1/namespaces/ns/pods/podname:5001/proxy"
-```
-
-### Get the logs of a pod
-You can get the logs of a running pod, specifying the name of the pod and the
-namespace where the pod is running:
-
-```ruby
-client.get_pod_log('pod-name', 'default')
-# => "Running...\nRunning...\nRunning...\n"
-```
-
-If that pod has more than one container, you must specify the container:
-
-```ruby
-client.get_pod_log('pod-name', 'default', container: 'ruby')
-# => "..."
-```
-
-If a container in a pod terminates, a new container is started, and you want to
-retrieve the logs of the dead container, you can pass in the `:previous` option:
-
-```ruby
-client.get_pod_log('pod-name', 'default', previous: true)
-# => "..."
-```
-
-Kubernetes can add timestamps to every log line or filter by lines time:
-```ruby
-client.get_pod_log('pod-name', 'default', timestamps: true, since_time: '2018-04-27T18:30:17.480321984Z')
-# => "..."
-```
-`since_time` can be a a `Time`, `DateTime` or `String` formatted according to RFC3339
-
-Kubernetes can fetch a specific number of lines from the end of the logs:
-```ruby
-client.get_pod_log('pod-name', 'default', tail_lines: 10)
-# => "..."
-```
-
-Kubernetes can fetch a specific number of bytes from the log, but the exact size is not guaranteed and last line may not be terminated:
-```ruby
-client.get_pod_log('pod-name', 'default', limit_bytes: 10)
-# => "..."
-```
-
-You can also watch the logs of a pod to get a stream of data:
-
-```ruby
-client.watch_pod_log('pod-name', 'default', container: 'ruby') do |line|
- puts line
-end
-```
-
-### OpenShift: Process a template
-Returns a processed template containing a list of objects to create.
-Input parameter - template (hash)
-Besides its metadata, the template should include a list of objects to be processed and a list of parameters
-to be substituted. Note that for a required parameter that does not provide a generated value, you must supply a value.
-
-##### Note: This functionality is not supported by K8s at this moment. See the following [issue](https://github.com/kubernetes/kubernetes/issues/23896)
-
-```ruby
-client.process_template template
-```
-
-## Upgrading
-
-Kubeclient release versioning follows [SemVer](https://semver.org/).
-See [CHANGELOG.md](CHANGELOG.md) for full changelog.
-
-#### past version 4.0
-
-Old kubernetes versions < 1.3 no longer supported.
-
-#### past version 3.0
-
-Ruby versions < 2.2 are no longer supported
-
-Specific entity classes mentioned in [past version 1.2.0](#past_version_1.2.0) have been dropped.
-Return values and expected classes are always Kubeclient::Resource.
-Checking the type of a resource can be done using:
-```
-> pod.kind
-=> "Pod"
-```
-
-update_* delete_* and patch_* now return a RecursiveOpenStruct like the get_* methods
-
-The `Kubeclient::Client` class raises `Kubeclient::HttpError` or subclasses now. Catching `KubeException` still works but is deprecated.
-
-`Kubeclient::Config#context` raises `KeyError` instead of `RuntimeError` for non-existent context name.
-
-<a name="past_version_1.2.0">
-
-#### past version 1.2.0
-Replace Specific Entity class references:
-
-```ruby
-Kubeclient::Service
-```
-
-with the generic
-
-```ruby
-Kubeclient::Resource.new
-```
-
-Where ever possible.
-
-## Contributing
-
-1. Fork it ( https://github.com/[my-github-username]/kubeclient/fork )
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Test your changes with `rake test rubocop`, add new tests if needed.
-4. If you added a new functionality, add it to README
-5. Commit your changes (`git commit -am 'Add some feature'`)
-6. Push to the branch (`git push origin my-new-feature`)
-7. Create a new Pull Request
-
-## Tests
-
-This client is tested with Minitest and also uses VCR recordings in some tests.
-Please run all tests before submitting a Pull Request, and add new tests for new functionality.
-
-Running tests:
-```ruby
-rake test
-```
diff --git a/vendor/gems/kubeclient/RELEASING.md b/vendor/gems/kubeclient/RELEASING.md
deleted file mode 100644
index c8a9a121eda..00000000000
--- a/vendor/gems/kubeclient/RELEASING.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Releasing Kubeclient
-
-## Versioning
-Kubeclient release versioning follows [SemVer](https://semver.org/).
-At some point in time it is decided to release version x.y.z.
-
-```bash
-RELEASE_BRANCH="master"
-```
-
-## 0. (once) Install gem-release, needed for several commands here:
-
-```bash
-gem install gem-release
-```
-
-## 1. PR(s) for changelog & bump
-
-Edit `CHANGELOG.md` as necessary. Even if all included changes remembered to update it, you should replace "Unreleased" section header with appropriate "x.y.z — 20yy-mm-dd" header.
-
-Bump `lib/kubeclient/version.rb` manually, or by using:
-```bash
-RELEASE_VERSION=x.y.z
-
-git checkout -b "release-$RELEASE_VERSION" $RELEASE_BRANCH
-# Won't work with uncommitted changes, you have to commit the changelog first.
-gem bump --version $RELEASE_VERSION
-git show # View version bump change.
-```
-
-Open a PR with target branch $RELEASE_BRANCH and get it reviewed & merged (if open for long, remember to update date in CHANGELOG to actual day of release).
-
-## 2. (once) Grabbing an authentication token for rubygems.org api
-```bash
-RUBYGEMS_USERNAME=bob
-curl -u $RUBYGEMS_USERNAME https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
-
-cat ~/.gem/credentials
-# Should look like this:
-:rubygems_api_key: ****
-```
-
-## 3. Actual release
-
-Make sure we're locally after the bump PR *merge commit*:
-```bash
-git checkout $RELEASE_BRANCH
-git status # Make sure there are no local changes
-git pull --ff-only https://github.com/abonas/kubeclient $RELEASE_BRANCH
-git log -n1
-```
-
-Last sanity check:
-```bash
-bundle install
-bundle exec rake test rubocop
-```
-
-Create and push the tag:
-```bash
-gem tag --no-push
-git push --tags --dry-run https://github.com/abonas/kubeclient # Check for unexpected tags
-git push --tags https://github.com/abonas/kubeclient
-```
-
-Release onto rubygems.org:
-```bash
-gem release
-```
diff --git a/vendor/gems/kubeclient/Rakefile b/vendor/gems/kubeclient/Rakefile
deleted file mode 100644
index a749a9c926e..00000000000
--- a/vendor/gems/kubeclient/Rakefile
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'bundler/gem_tasks'
-require 'rake/testtask'
-require 'rubocop/rake_task'
-require 'yaml'
-
-task default: %i[test rubocop] # same as .travis.yml
-
-Rake::TestTask.new
-RuboCop::RakeTask.new
diff --git a/vendor/gems/kubeclient/kubeclient.gemspec b/vendor/gems/kubeclient/kubeclient.gemspec
deleted file mode 100644
index 975db8cdb59..00000000000
--- a/vendor/gems/kubeclient/kubeclient.gemspec
+++ /dev/null
@@ -1,39 +0,0 @@
-# coding: utf-8
-
-lib = File.expand_path('../lib', __FILE__)
-$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
-require 'kubeclient/version'
-
-Gem::Specification.new do |spec|
- spec.name = 'kubeclient'
- spec.version = Kubeclient::VERSION
- spec.authors = ['Alissa Bonas']
- spec.email = ['abonas@redhat.com']
- spec.summary = 'A client for Kubernetes REST api'
- spec.description = 'A client for Kubernetes REST api'
- spec.homepage = 'https://github.com/abonas/kubeclient'
- spec.license = 'MIT'
-
- spec.files = Dir.glob("lib/**/*.*")
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
- spec.test_files = []
- spec.require_paths = ['lib']
- spec.required_ruby_version = '>= 2.2.0'
-
- spec.add_development_dependency 'bundler', '>= 1.6'
- spec.add_development_dependency 'rake', '~> 13.0'
- spec.add_development_dependency 'minitest', '~> 5.15.0'
- spec.add_development_dependency 'minitest-rg'
- spec.add_development_dependency 'webmock', '~> 3.0'
- spec.add_development_dependency 'vcr'
- spec.add_development_dependency 'rubocop', '= 0.49.1'
- spec.add_development_dependency 'googleauth', '~> 0.5.1'
- spec.add_development_dependency('mocha', '~> 1.5')
- spec.add_development_dependency 'openid_connect', '~> 1.1'
- spec.add_development_dependency 'net-smtp'
-
- spec.add_dependency 'jsonpath', '~> 1.0'
- spec.add_dependency 'rest-client', '~> 2.0'
- spec.add_dependency 'recursive-open-struct', '~> 1.1', '>= 1.1.1'
- spec.add_dependency 'http', '>= 3.0', '< 6.0'
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient.rb b/vendor/gems/kubeclient/lib/kubeclient.rb
deleted file mode 100644
index eed4872834e..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require 'json'
-require 'rest-client'
-
-require 'kubeclient/aws_eks_credentials'
-require 'kubeclient/common'
-require 'kubeclient/config'
-require 'kubeclient/entity_list'
-require 'kubeclient/exec_credentials'
-require 'kubeclient/gcp_auth_provider'
-require 'kubeclient/http_error'
-require 'kubeclient/missing_kind_compatibility'
-require 'kubeclient/oidc_auth_provider'
-require 'kubeclient/resource'
-require 'kubeclient/resource_not_found_error'
-require 'kubeclient/version'
-require 'kubeclient/watch_stream'
-
-module Kubeclient
- # Kubernetes Client
- class Client
- include ClientMixin
- def initialize(
- uri,
- version = 'v1',
- **options
- )
- initialize_client(
- uri,
- '/api',
- version,
- **options
- )
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/aws_eks_credentials.rb b/vendor/gems/kubeclient/lib/kubeclient/aws_eks_credentials.rb
deleted file mode 100644
index 9b54b9e06cc..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/aws_eks_credentials.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-module Kubeclient
- # Get a bearer token to authenticate against aws eks.
- class AmazonEksCredentials
- class AmazonEksDependencyError < LoadError # rubocop:disable Lint/InheritException
- end
-
- class << self
- def token(credentials, eks_cluster)
- begin
- require 'aws-sigv4'
- require 'base64'
- require 'cgi'
- rescue LoadError => e
- raise AmazonEksDependencyError,
- 'Error requiring aws gems. Kubeclient itself does not include the following ' \
- 'gems: [aws-sigv4]. To support auth-provider eks, you must ' \
- "include it in your calling application. Failed with: #{e.message}"
- end
- # https://github.com/aws/aws-sdk-ruby/pull/1848
- # Get a signer
- # Note - sts only has ONE endpoint (not regional) so 'us-east-1' hardcoding should be OK
- signer = Aws::Sigv4::Signer.new(
- service: 'sts',
- region: 'us-east-1',
- credentials: credentials
- )
-
- # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sigv4/Signer.html#presign_url-instance_method
- presigned_url_string = signer.presign_url(
- http_method: 'GET',
- url: 'https://sts.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15',
- body: '',
- credentials: credentials,
- expires_in: 60,
- headers: {
- 'X-K8s-Aws-Id' => eks_cluster
- }
- )
- kube_token = 'k8s-aws-v1.' + Base64.urlsafe_encode64(presigned_url_string.to_s).sub(/=*$/, '') # rubocop:disable Metrics/LineLength
- kube_token
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/common.rb b/vendor/gems/kubeclient/lib/kubeclient/common.rb
deleted file mode 100644
index 51087fbe888..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/common.rb
+++ /dev/null
@@ -1,661 +0,0 @@
-require 'json'
-require 'rest-client'
-
-module Kubeclient
- # Common methods
- # this is mixed in by other gems
- module ClientMixin
- ENTITY_METHODS = %w[get watch delete create update patch json_patch merge_patch apply].freeze
-
- DEFAULT_SSL_OPTIONS = {
- client_cert: nil,
- client_key: nil,
- ca_file: nil,
- cert_store: nil,
- verify_ssl: OpenSSL::SSL::VERIFY_PEER
- }.freeze
-
- DEFAULT_AUTH_OPTIONS = {
- username: nil,
- password: nil,
- bearer_token: nil,
- bearer_token_file: nil
- }.freeze
-
- DEFAULT_SOCKET_OPTIONS = {
- socket_class: nil,
- ssl_socket_class: nil
- }.freeze
-
- DEFAULT_TIMEOUTS = {
- # These do NOT affect watch, watching never times out.
- open: Net::HTTP.new('127.0.0.1').open_timeout, # depends on ruby version
- read: Net::HTTP.new('127.0.0.1').read_timeout
- }.freeze
-
- DEFAULT_HTTP_PROXY_URI = nil
- DEFAULT_HTTP_MAX_REDIRECTS = 10
-
- SEARCH_ARGUMENTS = {
- 'labelSelector' => :label_selector,
- 'fieldSelector' => :field_selector,
- 'resourceVersion' => :resource_version,
- 'limit' => :limit,
- 'continue' => :continue
- }.freeze
-
- WATCH_ARGUMENTS = {
- 'labelSelector' => :label_selector,
- 'fieldSelector' => :field_selector,
- 'resourceVersion' => :resource_version
- }.freeze
-
- attr_reader :api_endpoint
- attr_reader :ssl_options
- attr_reader :auth_options
- attr_reader :http_proxy_uri
- attr_reader :http_max_redirects
- attr_reader :headers
- attr_reader :discovered
-
- def initialize_client(
- uri,
- path,
- version,
- ssl_options: DEFAULT_SSL_OPTIONS,
- auth_options: DEFAULT_AUTH_OPTIONS,
- socket_options: DEFAULT_SOCKET_OPTIONS,
- timeouts: DEFAULT_TIMEOUTS,
- http_proxy_uri: DEFAULT_HTTP_PROXY_URI,
- http_max_redirects: DEFAULT_HTTP_MAX_REDIRECTS,
- as: :ros
- )
- validate_auth_options(auth_options)
- handle_uri(uri, path)
-
- @entities = {}
- @discovered = false
- @api_version = version
- @headers = {}
- @ssl_options = ssl_options
- @auth_options = auth_options
- @socket_options = socket_options
- # Allow passing partial timeouts hash, without unspecified
- # @timeouts[:foo] == nil resulting in infinite timeout.
- @timeouts = DEFAULT_TIMEOUTS.merge(timeouts)
- @http_proxy_uri = http_proxy_uri ? http_proxy_uri.to_s : nil
- @http_max_redirects = http_max_redirects
- @as = as
-
- if auth_options[:bearer_token]
- bearer_token(@auth_options[:bearer_token])
- elsif auth_options[:bearer_token_file]
- validate_bearer_token_file
- bearer_token(File.read(@auth_options[:bearer_token_file]))
- end
- end
-
- def method_missing(method_sym, *args, &block)
- if discovery_needed?(method_sym)
- discover
- send(method_sym, *args, &block)
- else
- super
- end
- end
-
- def respond_to_missing?(method_sym, include_private = false)
- if discovery_needed?(method_sym)
- discover
- respond_to?(method_sym, include_private)
- else
- super
- end
- end
-
- def discovery_needed?(method_sym)
- !@discovered && ENTITY_METHODS.any? { |x| method_sym.to_s.start_with?(x) }
- end
-
- def handle_exception
- yield
- rescue RestClient::Exception => e
- json_error_msg = begin
- JSON.parse(e.response || '') || {}
- rescue JSON::ParserError
- {}
- end
- err_message = json_error_msg['message'] || e.message
- error_klass = e.http_code == 404 ? ResourceNotFoundError : HttpError
- raise error_klass.new(e.http_code, err_message, e.response)
- end
-
- def discover
- load_entities
- define_entity_methods
- @discovered = true
- end
-
- def self.parse_definition(kind, name)
- # Kubernetes gives us 3 inputs:
- # kind: "ComponentStatus", "NetworkPolicy", "Endpoints"
- # name: "componentstatuses", "networkpolicies", "endpoints"
- # singularName: "componentstatus" etc (usually omitted, defaults to kind.downcase)
- # and want to derive singular and plural method names, with underscores:
- # "network_policy"
- # "network_policies"
- # kind's CamelCase word boundaries determine our placement of underscores.
-
- if IRREGULAR_NAMES[kind]
- # In a few cases, the given kind / singularName itself is still plural.
- # We require a distinct singular method name, so force it.
- method_names = IRREGULAR_NAMES[kind]
- else
- # TODO: respect singularName from discovery?
- # But how? If it differs from kind.downcase, kind's word boundaries don't apply.
- singular_name = kind.downcase
-
- if !(/[A-Z]/ =~ kind)
- # Some custom resources have a fully lowercase kind - can't infer underscores.
- method_names = [singular_name, name]
- else
- # Some plurals are not exact suffixes, e.g. NetworkPolicy -> networkpolicies.
- # So don't expect full last word to match.
- /^(?<prefix>(.*[A-Z]))(?<singular_suffix>[^A-Z]*)$/ =~ kind # "NetworkP", "olicy"
- if name.start_with?(prefix.downcase)
- plural_suffix = name[prefix.length..-1] # "olicies"
- prefix_underscores = ClientMixin.underscore_entity(prefix) # "network_p"
- method_names = [prefix_underscores + singular_suffix, # "network_policy"
- prefix_underscores + plural_suffix] # "network_policies"
- else
- method_names = resolve_unconventional_method_names(name, kind, singular_name)
- end
- end
- end
-
- OpenStruct.new(
- entity_type: kind,
- resource_name: name,
- method_names: method_names
- )
- end
-
- def self.resolve_unconventional_method_names(name, kind, singular_name)
- underscored_name = name.tr('-', '_')
- singular_underscores = ClientMixin.underscore_entity(kind)
- if underscored_name.start_with?(singular_underscores)
- [singular_underscores, underscored_name]
- else
- # fallback to lowercase, no separators for both names
- [singular_name, underscored_name.tr('_', '')]
- end
- end
-
- def handle_uri(uri, path)
- raise ArgumentError, 'Missing uri' unless uri
- @api_endpoint = (uri.is_a?(URI) ? uri : URI.parse(uri))
-
- # This regex will anchor at the last `/api`, `/oapi` or`/apis/:group`) part of the URL
- # The whole path will be matched and if existing, the api_group will be extracted.
- re = /^(?<path>.*\/o?api(?:s\/(?<apigroup>[^\/]+))?)$/mi
- match = re.match(@api_endpoint.path.chomp('/'))
-
- if match
- # Since `re` captures 2 groups, match will always have 3 elements
- # If thus we have a non-nil value in match 2, this is our api_group.
- @api_group = match[:apigroup].nil? ? '' : match[:apigroup] + '/'
- @api_endpoint.path = match[:path]
- else
- # This is a fallback, for when `/api` was not provided as part of the uri
- @api_group = ''
- @api_endpoint.path = @api_endpoint.path.chomp('/') + path
- end
- end
-
- def build_namespace_prefix(namespace)
- namespace.to_s.empty? ? '' : "namespaces/#{namespace}/"
- end
-
- # rubocop:disable Metrics/BlockLength
- def define_entity_methods
- @entities.values.each do |entity|
- # get all entities of a type e.g. get_nodes, get_pods, etc.
- define_singleton_method("get_#{entity.method_names[1]}") do |options = {}|
- get_entities(entity.entity_type, entity.resource_name, options)
- end
-
- # watch all entities of a type e.g. watch_nodes, watch_pods, etc.
- define_singleton_method("watch_#{entity.method_names[1]}") do |options = {}, &block|
- # This method used to take resource_version as a param, so
- # this conversion is to keep backwards compatibility
- options = { resource_version: options } unless options.is_a?(Hash)
-
- watch_entities(entity.resource_name, options, &block)
- end
-
- # get a single entity of a specific type by name
- define_singleton_method("get_#{entity.method_names[0]}") \
- do |name, namespace = nil, opts = {}|
- get_entity(entity.resource_name, name, namespace, opts)
- end
-
- define_singleton_method("delete_#{entity.method_names[0]}") \
- do |name, namespace = nil, opts = {}|
- delete_entity(entity.resource_name, name, namespace, **opts)
- end
-
- define_singleton_method("create_#{entity.method_names[0]}") do |entity_config|
- create_entity(entity.entity_type, entity.resource_name, entity_config)
- end
-
- define_singleton_method("update_#{entity.method_names[0]}") do |entity_config|
- update_entity(entity.resource_name, entity_config)
- end
-
- define_singleton_method("patch_#{entity.method_names[0]}") \
- do |name, patch, namespace = nil|
- patch_entity(entity.resource_name, name, patch, 'strategic-merge-patch', namespace)
- end
-
- define_singleton_method("json_patch_#{entity.method_names[0]}") \
- do |name, patch, namespace = nil|
- patch_entity(entity.resource_name, name, patch, 'json-patch', namespace)
- end
-
- define_singleton_method("merge_patch_#{entity.method_names[0]}") \
- do |name, patch, namespace = nil|
- patch_entity(entity.resource_name, name, patch, 'merge-patch', namespace)
- end
-
- define_singleton_method("apply_#{entity.method_names[0]}") do |resource, opts = {}|
- apply_entity(entity.resource_name, resource, **opts)
- end
- end
- end
- # rubocop:enable Metrics/BlockLength
-
- def self.underscore_entity(entity_name)
- entity_name.gsub(/([a-z])([A-Z])/, '\1_\2').downcase
- end
-
- def create_rest_client(path = nil)
- path ||= @api_endpoint.path
- options = {
- ssl_ca_file: @ssl_options[:ca_file],
- ssl_cert_store: @ssl_options[:cert_store],
- verify_ssl: @ssl_options[:verify_ssl],
- ssl_client_cert: @ssl_options[:client_cert],
- ssl_client_key: @ssl_options[:client_key],
- proxy: @http_proxy_uri,
- max_redirects: @http_max_redirects,
- user: @auth_options[:username],
- password: @auth_options[:password],
- open_timeout: @timeouts[:open],
- read_timeout: @timeouts[:read]
- }
- RestClient::Resource.new(@api_endpoint.merge(path).to_s, options)
- end
-
- def rest_client
- @rest_client ||= begin
- create_rest_client("#{@api_endpoint.path}/#{@api_version}")
- end
- end
-
- # Accepts the following options:
- # :namespace (string) - the namespace of the entity.
- # :name (string) - the name of the entity to watch.
- # :label_selector (string) - a selector to restrict the list of returned objects by labels.
- # :field_selector (string) - a selector to restrict the list of returned objects by fields.
- # :resource_version (string) - shows changes that occur after passed version of a resource.
- # :as (:raw|:ros) - defaults to :ros
- # :raw - return the raw response body as a string
- # :ros - return a collection of RecursiveOpenStruct objects
- # Accepts an optional block, that will be called with each entity,
- # otherwise returns a WatchStream
- def watch_entities(resource_name, options = {}, &block)
- ns = build_namespace_prefix(options[:namespace])
-
- path = "watch/#{ns}#{resource_name}"
- path += "/#{options[:name]}" if options[:name]
- uri = @api_endpoint.merge("#{@api_endpoint.path}/#{@api_version}/#{path}")
-
- params = {}
- WATCH_ARGUMENTS.each { |k, v| params[k] = options[v] if options[v] }
- uri.query = URI.encode_www_form(params) if params.any?
-
- watcher = Kubeclient::Common::WatchStream.new(
- uri,
- http_options(uri),
- formatter: ->(value) { format_response(options[:as] || @as, value) }
- )
-
- return_or_yield_to_watcher(watcher, &block)
- end
-
- # Accepts the following options:
- # :namespace (string) - the namespace of the entity.
- # :label_selector (string) - a selector to restrict the list of returned objects by labels.
- # :field_selector (string) - a selector to restrict the list of returned objects by fields.
- # :limit (integer) - a maximum number of items to return in each response
- # :continue (string) - a token used to retrieve the next chunk of entities
- # :as (:raw|:ros) - defaults to :ros
- # :raw - return the raw response body as a string
- # :ros - return a collection of RecursiveOpenStruct objects
- def get_entities(entity_type, resource_name, options = {})
- params = {}
- SEARCH_ARGUMENTS.each { |k, v| params[k] = options[v] if options[v] }
-
- ns_prefix = build_namespace_prefix(options[:namespace])
- response = handle_exception do
- rest_client[ns_prefix + resource_name]
- .get({ 'params' => params }.merge(@headers))
- end
- format_response(options[:as] || @as, response.body, entity_type)
- end
-
- # Accepts the following options:
- # :as (:raw|:ros) - defaults to :ros
- # :raw - return the raw response body as a string
- # :ros - return a collection of RecursiveOpenStruct objects
- def get_entity(resource_name, name, namespace = nil, options = {})
- ns_prefix = build_namespace_prefix(namespace)
- response = handle_exception do
- rest_client[ns_prefix + resource_name + "/#{name}"]
- .get(@headers)
- end
- format_response(options[:as] || @as, response.body)
- end
-
- # delete_options are passed as a JSON payload in the delete request
- def delete_entity(resource_name, name, namespace = nil, delete_options: {})
- delete_options_hash = delete_options.to_hash
- ns_prefix = build_namespace_prefix(namespace)
- payload = delete_options_hash.to_json unless delete_options_hash.empty?
- response = handle_exception do
- rs = rest_client[ns_prefix + resource_name + "/#{name}"]
- RestClient::Request.execute(
- rs.options.merge(
- method: :delete,
- url: rs.url,
- headers: { 'Content-Type' => 'application/json' }.merge(@headers),
- payload: payload
- )
- )
- end
- format_response(@as, response.body)
- end
-
- def create_entity(entity_type, resource_name, entity_config)
- # Duplicate the entity_config to a hash so that when we assign
- # kind and apiVersion, this does not mutate original entity_config obj.
- hash = entity_config.to_hash
-
- ns_prefix = build_namespace_prefix(hash[:metadata][:namespace])
-
- # TODO: temporary solution to add "kind" and apiVersion to request
- # until this issue is solved
- # https://github.com/GoogleCloudPlatform/kubernetes/issues/6439
- hash[:kind] = entity_type
- hash[:apiVersion] = @api_group + @api_version
- response = handle_exception do
- rest_client[ns_prefix + resource_name]
- .post(hash.to_json, { 'Content-Type' => 'application/json' }.merge(@headers))
- end
- format_response(@as, response.body)
- end
-
- def update_entity(resource_name, entity_config)
- name = entity_config[:metadata][:name]
- ns_prefix = build_namespace_prefix(entity_config[:metadata][:namespace])
- response = handle_exception do
- rest_client[ns_prefix + resource_name + "/#{name}"]
- .put(entity_config.to_h.to_json, { 'Content-Type' => 'application/json' }.merge(@headers))
- end
- format_response(@as, response.body)
- end
-
- def patch_entity(resource_name, name, patch, strategy, namespace)
- ns_prefix = build_namespace_prefix(namespace)
- response = handle_exception do
- rest_client[ns_prefix + resource_name + "/#{name}"]
- .patch(
- patch.to_json,
- { 'Content-Type' => "application/#{strategy}+json" }.merge(@headers)
- )
- end
- format_response(@as, response.body)
- end
-
- def apply_entity(resource_name, resource, field_manager:, force: true)
- name = "#{resource[:metadata][:name]}?fieldManager=#{field_manager}&force=#{force}"
- ns_prefix = build_namespace_prefix(resource[:metadata][:namespace])
- response = handle_exception do
- rest_client[ns_prefix + resource_name + "/#{name}"]
- .patch(
- resource.to_json,
- { 'Content-Type' => 'application/apply-patch+yaml' }.merge(@headers)
- )
- end
- format_response(@as, response.body)
- end
-
- def all_entities(options = {})
- discover unless @discovered
- @entities.values.each_with_object({}) do |entity, result_hash|
- # method call for get each entities
- # build hash of entity name to array of the entities
- method_name = "get_#{entity.method_names[1]}"
- begin
- result_hash[entity.method_names[0]] = send(method_name, options)
- rescue Kubeclient::HttpError
- next # do not fail due to resources not supporting get
- end
- end
- end
-
- def get_pod_log(pod_name, namespace,
- container: nil, previous: false,
- timestamps: false, since_time: nil, tail_lines: nil, limit_bytes: nil)
- params = {}
- params[:previous] = true if previous
- params[:container] = container if container
- params[:timestamps] = timestamps if timestamps
- params[:sinceTime] = format_datetime(since_time) if since_time
- params[:tailLines] = tail_lines if tail_lines
- params[:limitBytes] = limit_bytes if limit_bytes
-
- ns = build_namespace_prefix(namespace)
- handle_exception do
- rest_client[ns + "pods/#{pod_name}/log"]
- .get({ 'params' => params }.merge(@headers))
- end
- end
-
- def watch_pod_log(pod_name, namespace, container: nil, &block)
- # Adding the "follow=true" query param tells the Kubernetes API to keep
- # the connection open and stream updates to the log.
- params = { follow: true }
- params[:container] = container if container
-
- ns = build_namespace_prefix(namespace)
-
- uri = @api_endpoint.dup
- uri.path += "/#{@api_version}/#{ns}pods/#{pod_name}/log"
- uri.query = URI.encode_www_form(params)
-
- watcher = Kubeclient::Common::WatchStream.new(
- uri, http_options(uri), formatter: ->(value) { value }
- )
- return_or_yield_to_watcher(watcher, &block)
- end
-
- def proxy_url(kind, name, port, namespace = '')
- discover unless @discovered
- entity_name_plural =
- if %w[services pods nodes].include?(kind.to_s)
- kind.to_s
- else
- @entities[kind.to_s].resource_name
- end
- ns_prefix = build_namespace_prefix(namespace)
- rest_client["#{ns_prefix}#{entity_name_plural}/#{name}:#{port}/proxy"].url
- end
-
- def process_template(template)
- ns_prefix = build_namespace_prefix(template[:metadata][:namespace])
- response = handle_exception do
- rest_client[ns_prefix + 'processedtemplates']
- .post(template.to_h.to_json, { 'Content-Type' => 'application/json' }.merge(@headers))
- end
- JSON.parse(response)
- end
-
- def api_valid?
- result = api
- result.is_a?(Hash) && (result['versions'] || []).any? do |group|
- @api_group.empty? ? group.include?(@api_version) : group['version'] == @api_version
- end
- end
-
- def api
- response = handle_exception { create_rest_client.get(@headers) }
- JSON.parse(response)
- end
-
- private
-
- IRREGULAR_NAMES = {
- # In a few cases, the given kind itself is still plural.
- # https://github.com/kubernetes/kubernetes/issues/8115
- 'Endpoints' => %w[endpoint endpoints],
- 'SecurityContextConstraints' => %w[security_context_constraint
- security_context_constraints]
- }.freeze
-
- # Format datetime according to RFC3339
- def format_datetime(value)
- case value
- when DateTime, Time
- value.strftime('%FT%T.%9N%:z')
- when String
- value
- else
- raise ArgumentError, "unsupported type '#{value.class}' of time value '#{value}'"
- end
- end
-
- def format_response(as, body, list_type = nil)
- case as
- when :raw
- body
- when :parsed
- JSON.parse(body)
- when :parsed_symbolized
- JSON.parse(body, symbolize_names: true)
- when :ros
- result = JSON.parse(body)
-
- if list_type
- resource_version =
- result.fetch('resourceVersion') do
- result.fetch('metadata', {}).fetch('resourceVersion', nil)
- end
-
- # If 'limit' was passed save the continue token
- # see https://kubernetes.io/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks
- continue = result.fetch('metadata', {}).fetch('continue', nil)
-
- # result['items'] might be nil due to https://github.com/kubernetes/kubernetes/issues/13096
- collection = result['items'].to_a.map { |item| Kubeclient::Resource.new(item) }
-
- Kubeclient::Common::EntityList.new(list_type, resource_version, collection, continue)
- else
- Kubeclient::Resource.new(result)
- end
- else
- raise ArgumentError, "Unsupported format #{as.inspect}"
- end
- end
-
- def load_entities
- @entities = {}
- fetch_entities['resources'].each do |resource|
- next if resource['name'].include?('/')
- # Not a regular entity, special functionality covered by `process_template`.
- # https://github.com/openshift/origin/issues/21668
- next if resource['kind'] == 'Template' && resource['name'] == 'processedtemplates'
- resource['kind'] ||=
- Kubeclient::Common::MissingKindCompatibility.resource_kind(resource['name'])
- entity = ClientMixin.parse_definition(resource['kind'], resource['name'])
- @entities[entity.method_names[0]] = entity if entity
- end
- end
-
- def fetch_entities
- JSON.parse(handle_exception { rest_client.get(@headers) })
- end
-
- def bearer_token(bearer_token)
- @headers ||= {}
- @headers[:Authorization] = "Bearer #{bearer_token}"
- end
-
- def validate_auth_options(opts)
- # maintain backward compatibility:
- opts[:username] = opts[:user] if opts[:user]
-
- if %i[bearer_token bearer_token_file username].count { |key| opts[key] } > 1
- raise(
- ArgumentError,
- 'Invalid auth options: specify only one of username/password,' \
- ' bearer_token or bearer_token_file'
- )
- elsif %i[username password].count { |key| opts[key] } == 1
- raise ArgumentError, 'Basic auth requires both username & password'
- end
- end
-
- def validate_bearer_token_file
- msg = "Token file #{@auth_options[:bearer_token_file]} does not exist"
- raise ArgumentError, msg unless File.file?(@auth_options[:bearer_token_file])
-
- msg = "Cannot read token file #{@auth_options[:bearer_token_file]}"
- raise ArgumentError, msg unless File.readable?(@auth_options[:bearer_token_file])
- end
-
- def return_or_yield_to_watcher(watcher, &block)
- return watcher unless block_given?
-
- begin
- watcher.each(&block)
- ensure
- watcher.finish
- end
- end
-
- def http_options(uri)
- options = {
- basic_auth_user: @auth_options[:username],
- basic_auth_password: @auth_options[:password],
- headers: @headers,
- http_proxy_uri: @http_proxy_uri,
- http_max_redirects: http_max_redirects
- }
-
- if uri.scheme == 'https'
- options[:ssl] = {
- ca_file: @ssl_options[:ca_file],
- cert: @ssl_options[:client_cert],
- cert_store: @ssl_options[:cert_store],
- key: @ssl_options[:client_key],
- # ruby HTTP uses verify_mode instead of verify_ssl
- # http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html
- verify_mode: @ssl_options[:verify_ssl]
- }
- end
-
- options.merge(@socket_options)
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/config.rb b/vendor/gems/kubeclient/lib/kubeclient/config.rb
deleted file mode 100644
index 3598afe83fe..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/config.rb
+++ /dev/null
@@ -1,202 +0,0 @@
-require 'yaml'
-require 'base64'
-require 'pathname'
-
-module Kubeclient
- # Kubernetes client configuration class
- class Config
- # Kubernetes client configuration context class
- class Context
- attr_reader :api_endpoint, :api_version, :ssl_options, :auth_options, :namespace
-
- def initialize(api_endpoint, api_version, ssl_options, auth_options, namespace)
- @api_endpoint = api_endpoint
- @api_version = api_version
- @ssl_options = ssl_options
- @auth_options = auth_options
- @namespace = namespace
- end
- end
-
- # data (Hash) - Parsed kubeconfig data.
- # kcfg_path (string) - Base directory for resolving relative references to external files.
- # If set to nil, all external lookups & commands are disabled (even for absolute paths).
- # See also the more convenient Config.read
- def initialize(data, kcfg_path)
- @kcfg = data
- @kcfg_path = kcfg_path
- raise 'Unknown kubeconfig version' if @kcfg['apiVersion'] != 'v1'
- end
-
- # Builds Config instance by parsing given file, with lookups relative to file's directory.
- def self.read(filename)
- parsed =
- if RUBY_VERSION >= '2.6'
- YAML.safe_load(File.read(filename), permitted_classes: [Date, Time])
- else
- YAML.safe_load(File.read(filename), [Date, Time])
- end
- Config.new(parsed, File.dirname(filename))
- end
-
- def contexts
- @kcfg['contexts'].map { |x| x['name'] }
- end
-
- def context(context_name = nil)
- cluster, user, namespace = fetch_context(context_name || @kcfg['current-context'])
-
- if user.key?('exec')
- exec_opts = expand_command_option(user['exec'], 'command')
- user['exec_result'] = ExecCredentials.run(exec_opts)
- end
-
- client_cert_data = fetch_user_cert_data(user)
- client_key_data = fetch_user_key_data(user)
- auth_options = fetch_user_auth_options(user)
-
- ssl_options = {}
-
- ssl_options[:verify_ssl] = if cluster['insecure-skip-tls-verify'] == true
- OpenSSL::SSL::VERIFY_NONE
- else
- OpenSSL::SSL::VERIFY_PEER
- end
-
- if cluster_ca_data?(cluster)
- cert_store = OpenSSL::X509::Store.new
- populate_cert_store_from_cluster_ca_data(cluster, cert_store)
- ssl_options[:cert_store] = cert_store
- end
-
- unless client_cert_data.nil?
- ssl_options[:client_cert] = OpenSSL::X509::Certificate.new(client_cert_data)
- end
-
- unless client_key_data.nil?
- ssl_options[:client_key] = OpenSSL::PKey.read(client_key_data)
- end
-
- Context.new(cluster['server'], @kcfg['apiVersion'], ssl_options, auth_options, namespace)
- end
-
- private
-
- def allow_external_lookups?
- @kcfg_path != nil
- end
-
- def ext_file_path(path)
- unless allow_external_lookups?
- raise "Kubeclient::Config: external lookups disabled, can't load '#{path}'"
- end
- Pathname(path).absolute? ? path : File.join(@kcfg_path, path)
- end
-
- def ext_command_path(path)
- unless allow_external_lookups?
- raise "Kubeclient::Config: external lookups disabled, can't execute '#{path}'"
- end
- # Like go client https://github.com/kubernetes/kubernetes/pull/59495#discussion_r171138995,
- # distinguish 3 cases:
- # - absolute (e.g. /path/to/foo)
- # - $PATH-based (e.g. curl)
- # - relative to config file's dir (e.g. ./foo)
- if Pathname(path).absolute?
- path
- elsif File.basename(path) == path
- path
- else
- File.join(@kcfg_path, path)
- end
- end
-
- def fetch_context(context_name)
- context = @kcfg['contexts'].detect do |x|
- break x['context'] if x['name'] == context_name
- end
-
- raise KeyError, "Unknown context #{context_name}" unless context
-
- cluster = @kcfg['clusters'].detect do |x|
- break x['cluster'] if x['name'] == context['cluster']
- end
-
- raise KeyError, "Unknown cluster #{context['cluster']}" unless cluster
-
- user = @kcfg['users'].detect do |x|
- break x['user'] if x['name'] == context['user']
- end || {}
-
- namespace = context['namespace']
-
- [cluster, user, namespace]
- end
-
- def cluster_ca_data?(cluster)
- cluster.key?('certificate-authority') || cluster.key?('certificate-authority-data')
- end
-
- def populate_cert_store_from_cluster_ca_data(cluster, cert_store)
- if cluster.key?('certificate-authority')
- cert_store.add_file(ext_file_path(cluster['certificate-authority']))
- elsif cluster.key?('certificate-authority-data')
- ca_cert_data = Base64.decode64(cluster['certificate-authority-data'])
- cert_store.add_cert(OpenSSL::X509::Certificate.new(ca_cert_data))
- end
- end
-
- def fetch_user_cert_data(user)
- if user.key?('client-certificate')
- File.read(ext_file_path(user['client-certificate']))
- elsif user.key?('client-certificate-data')
- Base64.decode64(user['client-certificate-data'])
- elsif user.key?('exec_result') && user['exec_result'].key?('clientCertificateData')
- user['exec_result']['clientCertificateData']
- end
- end
-
- def fetch_user_key_data(user)
- if user.key?('client-key')
- File.read(ext_file_path(user['client-key']))
- elsif user.key?('client-key-data')
- Base64.decode64(user['client-key-data'])
- elsif user.key?('exec_result') && user['exec_result'].key?('clientKeyData')
- user['exec_result']['clientKeyData']
- end
- end
-
- def fetch_user_auth_options(user)
- options = {}
- if user.key?('token')
- options[:bearer_token] = user['token']
- elsif user.key?('exec_result') && user['exec_result'].key?('token')
- options[:bearer_token] = user['exec_result']['token']
- elsif user.key?('auth-provider')
- options[:bearer_token] = fetch_token_from_provider(user['auth-provider'])
- else
- %w[username password].each do |attr|
- options[attr.to_sym] = user[attr] if user.key?(attr)
- end
- end
- options
- end
-
- def fetch_token_from_provider(auth_provider)
- case auth_provider['name']
- when 'gcp'
- config = expand_command_option(auth_provider['config'], 'cmd-path')
- Kubeclient::GCPAuthProvider.token(config)
- when 'oidc'
- Kubeclient::OIDCAuthProvider.token(auth_provider['config'])
- end
- end
-
- def expand_command_option(config, key)
- config = config.dup
- config[key] = ext_command_path(config[key]) if config[key]
-
- config
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/entity_list.rb b/vendor/gems/kubeclient/lib/kubeclient/entity_list.rb
deleted file mode 100644
index 2f734560a4b..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/entity_list.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-require 'delegate'
-module Kubeclient
- module Common
- # Kubernetes Entity List
- class EntityList < DelegateClass(Array)
- attr_reader :continue, :kind, :resourceVersion
-
- def initialize(kind, resource_version, list, continue = nil)
- @kind = kind
- # rubocop:disable Style/VariableName
- @resourceVersion = resource_version
- @continue = continue
- super(list)
- end
-
- def last?
- continue.nil?
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/exec_credentials.rb b/vendor/gems/kubeclient/lib/kubeclient/exec_credentials.rb
deleted file mode 100644
index 016d48ae289..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/exec_credentials.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# frozen_string_literal: true
-
-module Kubeclient
- # An exec-based client auth provide
- # https://kubernetes.io/docs/reference/access-authn-authz/authentication/#configuration
- # Inspired by https://github.com/kubernetes/client-go/blob/master/plugin/pkg/client/auth/exec/exec.go
- class ExecCredentials
- class << self
- def run(opts)
- require 'open3'
- require 'json'
-
- raise ArgumentError, 'exec options are required' if opts.nil?
-
- cmd = opts['command']
- args = opts['args']
- env = map_env(opts['env'])
-
- # Validate exec options
- validate_opts(opts)
-
- out, err, st = Open3.capture3(env, cmd, *args)
-
- raise "exec command failed: #{err}" unless st.success?
-
- creds = JSON.parse(out)
- validate_credentials(opts, creds)
- creds['status']
- end
-
- private
-
- def validate_opts(opts)
- raise KeyError, 'exec command is required' unless opts['command']
- end
-
- def validate_client_credentials_status(status)
- has_client_cert_data = status.key?('clientCertificateData')
- has_client_key_data = status.key?('clientKeyData')
-
- if has_client_cert_data && !has_client_key_data
- raise 'exec plugin didn\'t return client key data'
- end
-
- if !has_client_cert_data && has_client_key_data
- raise 'exec plugin didn\'t return client certificate data'
- end
-
- has_client_cert_data && has_client_key_data
- end
-
- def validate_credentials_status(status)
- raise 'exec plugin didn\'t return a status field' if status.nil?
-
- has_client_credentials = validate_client_credentials_status(status)
- has_token = status.key?('token')
-
- if has_client_credentials && has_token
- raise 'exec plugin returned both token and client data'
- end
-
- return if has_client_credentials || has_token
-
- raise 'exec plugin didn\'t return a token or client data' unless has_token
- end
-
- def validate_credentials(opts, creds)
- # out should have ExecCredential structure
- raise 'invalid credentials' if creds.nil?
-
- # Verify apiVersion?
- api_version = opts['apiVersion']
- if api_version && api_version != creds['apiVersion']
- raise "exec plugin is configured to use API version #{api_version}, " \
- "plugin returned version #{creds['apiVersion']}"
- end
-
- validate_credentials_status(creds['status'])
- end
-
- # Transform name/value pairs to hash
- def map_env(env)
- return {} unless env
-
- Hash[env.map { |e| [e['name'], e['value']] }]
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/gcp_auth_provider.rb b/vendor/gems/kubeclient/lib/kubeclient/gcp_auth_provider.rb
deleted file mode 100644
index b28e54bfd88..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/gcp_auth_provider.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-require 'kubeclient/google_application_default_credentials'
-require 'kubeclient/gcp_command_credentials'
-
-module Kubeclient
- # Handle different ways to get a bearer token for Google Cloud Platform.
- class GCPAuthProvider
- class << self
- def token(config)
- if config.key?('cmd-path')
- Kubeclient::GCPCommandCredentials.token(config)
- else
- Kubeclient::GoogleApplicationDefaultCredentials.token
- end
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/gcp_command_credentials.rb b/vendor/gems/kubeclient/lib/kubeclient/gcp_command_credentials.rb
deleted file mode 100644
index 9c68c1a2847..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/gcp_command_credentials.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-module Kubeclient
- # Generates a bearer token for Google Cloud Platform.
- class GCPCommandCredentials
- class << self
- def token(config)
- require 'open3'
- require 'shellwords'
- require 'json'
- require 'jsonpath'
-
- cmd = config['cmd-path']
- args = config['cmd-args']
- token_key = config['token-key']
-
- out, err, st = Open3.capture3(cmd, *args.split(' '))
-
- raise "exec command failed: #{err}" unless st.success?
-
- extract_token(out, token_key)
- end
-
- private
-
- def extract_token(output, token_key)
- JsonPath.on(output, token_key.gsub(/^{|}$/, '')).first
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/google_application_default_credentials.rb b/vendor/gems/kubeclient/lib/kubeclient/google_application_default_credentials.rb
deleted file mode 100644
index 78f99ec9f32..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/google_application_default_credentials.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-module Kubeclient
- # Get a bearer token from the Google's application default credentials.
- class GoogleApplicationDefaultCredentials
- class GoogleDependencyError < LoadError # rubocop:disable Lint/InheritException
- end
-
- class << self
- def token
- begin
- require 'googleauth'
- rescue LoadError => e
- raise GoogleDependencyError,
- 'Error requiring googleauth gem. Kubeclient itself does not include the ' \
- 'googleauth gem. To support auth-provider gcp, you must include it in your ' \
- "calling application. Failed with: #{e.message}"
- end
-
- scopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- 'https://www.googleapis.com/auth/userinfo.email'
- ]
-
- authorization = Google::Auth.get_application_default(scopes)
- authorization.apply({})
- authorization.access_token
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/http_error.rb b/vendor/gems/kubeclient/lib/kubeclient/http_error.rb
deleted file mode 100644
index 121368c2f17..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/http_error.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# TODO: remove this on next major version bump
-# Deprected http exception
-class KubeException < StandardError
- attr_reader :error_code, :message, :response
-
- def initialize(error_code, message, response)
- @error_code = error_code
- @message = message
- @response = response
- end
-
- def to_s
- string = "HTTP status code #{@error_code}, #{@message}"
- if @response.is_a?(RestClient::Response) && @response.request
- string << " for #{@response.request.method.upcase} #{@response.request.url}"
- end
- string
- end
-end
-
-module Kubeclient
- # Exception that is raised when a http request fails
- class HttpError < KubeException
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/missing_kind_compatibility.rb b/vendor/gems/kubeclient/lib/kubeclient/missing_kind_compatibility.rb
deleted file mode 100644
index ec88960a546..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/missing_kind_compatibility.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-module Kubeclient
- module Common
- # Backward compatibility for old versions where kind is missing (e.g. OpenShift Enterprise 3.1)
- class MissingKindCompatibility
- MAPPING = {
- 'bindings' => 'Binding',
- 'componentstatuses' => 'ComponentStatus',
- 'endpoints' => 'Endpoints',
- 'events' => 'Event',
- 'limitranges' => 'LimitRange',
- 'namespaces' => 'Namespace',
- 'nodes' => 'Node',
- 'persistentvolumeclaims' => 'PersistentVolumeClaim',
- 'persistentvolumes' => 'PersistentVolume',
- 'pods' => 'Pod',
- 'podtemplates' => 'PodTemplate',
- 'replicationcontrollers' => 'ReplicationController',
- 'resourcequotas' => 'ResourceQuota',
- 'secrets' => 'Secret',
- 'securitycontextconstraints' => 'SecurityContextConstraints',
- 'serviceaccounts' => 'ServiceAccount',
- 'services' => 'Service',
- 'buildconfigs' => 'BuildConfig',
- 'builds' => 'Build',
- 'clusternetworks' => 'ClusterNetwork',
- 'clusterpolicies' => 'ClusterPolicy',
- 'clusterpolicybindings' => 'ClusterPolicyBinding',
- 'clusterrolebindings' => 'ClusterRoleBinding',
- 'clusterroles' => 'ClusterRole',
- 'deploymentconfigrollbacks' => 'DeploymentConfigRollback',
- 'deploymentconfigs' => 'DeploymentConfig',
- 'generatedeploymentconfigs' => 'DeploymentConfig',
- 'groups' => 'Group',
- 'hostsubnets' => 'HostSubnet',
- 'identities' => 'Identity',
- 'images' => 'Image',
- 'imagestreamimages' => 'ImageStreamImage',
- 'imagestreammappings' => 'ImageStreamMapping',
- 'imagestreams' => 'ImageStream',
- 'imagestreamtags' => 'ImageStreamTag',
- 'localresourceaccessreviews' => 'LocalResourceAccessReview',
- 'localsubjectaccessreviews' => 'LocalSubjectAccessReview',
- 'netnamespaces' => 'NetNamespace',
- 'oauthaccesstokens' => 'OAuthAccessToken',
- 'oauthauthorizetokens' => 'OAuthAuthorizeToken',
- 'oauthclientauthorizations' => 'OAuthClientAuthorization',
- 'oauthclients' => 'OAuthClient',
- 'policies' => 'Policy',
- 'policybindings' => 'PolicyBinding',
- 'processedtemplates' => 'Template',
- 'projectrequests' => 'ProjectRequest',
- 'projects' => 'Project',
- 'resourceaccessreviews' => 'ResourceAccessReview',
- 'rolebindings' => 'RoleBinding',
- 'roles' => 'Role',
- 'routes' => 'Route',
- 'subjectaccessreviews' => 'SubjectAccessReview',
- 'templates' => 'Template',
- 'useridentitymappings' => 'UserIdentityMapping',
- 'users' => 'User'
- }.freeze
-
- def self.resource_kind(name)
- MAPPING[name]
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/oidc_auth_provider.rb b/vendor/gems/kubeclient/lib/kubeclient/oidc_auth_provider.rb
deleted file mode 100644
index ffdfd7e2a5d..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/oidc_auth_provider.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: true
-
-module Kubeclient
- # Uses OIDC id-tokens and refreshes them if they are stale.
- class OIDCAuthProvider
- class OpenIDConnectDependencyError < LoadError # rubocop:disable Lint/InheritException
- end
-
- class << self
- def token(provider_config)
- begin
- require 'openid_connect'
- rescue LoadError => e
- raise OpenIDConnectDependencyError,
- 'Error requiring openid_connect gem. Kubeclient itself does not include the ' \
- 'openid_connect gem. To support auth-provider oidc, you must include it in your ' \
- "calling application. Failed with: #{e.message}"
- end
-
- issuer_url = provider_config['idp-issuer-url']
- discovery = OpenIDConnect::Discovery::Provider::Config.discover! issuer_url
-
- if provider_config.key? 'id-token'
- return provider_config['id-token'] unless expired?(provider_config['id-token'], discovery)
- end
-
- client = OpenIDConnect::Client.new(
- identifier: provider_config['client-id'],
- secret: provider_config['client-secret'],
- authorization_endpoint: discovery.authorization_endpoint,
- token_endpoint: discovery.token_endpoint,
- userinfo_endpoint: discovery.userinfo_endpoint
- )
- client.refresh_token = provider_config['refresh-token']
- client.access_token!.id_token
- end
-
- def expired?(id_token, discovery)
- decoded_token = OpenIDConnect::ResponseObject::IdToken.decode(
- id_token,
- discovery.jwks
- )
- # If token expired or expiring within 60 seconds
- Time.now.to_i + 60 > decoded_token.exp.to_i
- rescue JSON::JWK::Set::KidNotFound
- # Token cannot be verified: the kid it was signed with is not available for discovery
- # Consider it expired and fetch a new one.
- true
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/resource.rb b/vendor/gems/kubeclient/lib/kubeclient/resource.rb
deleted file mode 100644
index 08a50c3fe4f..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/resource.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'recursive_open_struct'
-
-module Kubeclient
- # Represents all the objects returned by Kubeclient
- class Resource < RecursiveOpenStruct
- def initialize(hash = nil, args = {})
- args[:recurse_over_arrays] = true
- super(hash, args)
- end
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/resource_not_found_error.rb b/vendor/gems/kubeclient/lib/kubeclient/resource_not_found_error.rb
deleted file mode 100644
index 045a83642d7..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/resource_not_found_error.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-module Kubeclient
- class ResourceNotFoundError < HttpError
- end
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/version.rb b/vendor/gems/kubeclient/lib/kubeclient/version.rb
deleted file mode 100644
index bff50841794..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/version.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# Kubernetes REST-API Client
-module Kubeclient
- VERSION = '4.9.4-gitlab1'.freeze
-end
diff --git a/vendor/gems/kubeclient/lib/kubeclient/watch_stream.rb b/vendor/gems/kubeclient/lib/kubeclient/watch_stream.rb
deleted file mode 100644
index ef676660d53..00000000000
--- a/vendor/gems/kubeclient/lib/kubeclient/watch_stream.rb
+++ /dev/null
@@ -1,97 +0,0 @@
-require 'json'
-require 'http'
-module Kubeclient
- module Common
- # HTTP Stream used to watch changes on entities
- class WatchStream
- def initialize(uri, http_options, formatter:)
- @uri = uri
- @http_client = nil
- @http_options = http_options
- @http_options[:http_max_redirects] ||= Kubeclient::Client::DEFAULT_HTTP_MAX_REDIRECTS
- @formatter = formatter
- end
-
- def each
- @finished = false
-
- @http_client = build_client
- response = @http_client.request(:get, @uri, build_client_options)
- unless response.code < 300
- raise Kubeclient::HttpError.new(response.code, response.reason, response)
- end
-
- buffer = ''
- response.body.each do |chunk|
- buffer << chunk
- while (line = buffer.slice!(/.+\n/))
- yield @formatter.call(line.chomp)
- end
- end
- rescue StandardError
- raise unless @finished
- end
-
- def finish
- @finished = true
- @http_client.close unless @http_client.nil?
- end
-
- private
-
- def max_hops
- @http_options[:http_max_redirects] + 1
- end
-
- def follow_option
- if max_hops > 1
- { max_hops: max_hops }
- else
- # i.e. Do not follow redirects as we have set http_max_redirects to 0
- # Setting `{ max_hops: 1 }` does not work FWIW
- false
- end
- end
-
- def build_client
- client = HTTP::Client.new(follow: follow_option)
-
- if @http_options[:basic_auth_user] && @http_options[:basic_auth_password]
- client = client.basic_auth(
- user: @http_options[:basic_auth_user],
- pass: @http_options[:basic_auth_password]
- )
- end
-
- client
- end
-
- def using_proxy
- proxy = @http_options[:http_proxy_uri]
- return nil unless proxy
- p_uri = URI.parse(proxy)
- {
- proxy_address: p_uri.hostname,
- proxy_port: p_uri.port,
- proxy_username: p_uri.user,
- proxy_password: p_uri.password
- }
- end
-
- def build_client_options
- client_options = {
- headers: @http_options[:headers],
- proxy: using_proxy
- }
- if @http_options[:ssl]
- client_options[:ssl] = @http_options[:ssl]
- socket_option = :ssl_socket_class
- else
- socket_option = :socket_class
- end
- client_options[socket_option] = @http_options[socket_option] if @http_options[socket_option]
- client_options
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/cassettes/kubernetes_guestbook.yml b/vendor/gems/kubeclient/test/cassettes/kubernetes_guestbook.yml
deleted file mode 100644
index 3829add6d75..00000000000
--- a/vendor/gems/kubeclient/test/cassettes/kubernetes_guestbook.yml
+++ /dev/null
@@ -1,879 +0,0 @@
----
-http_interactions:
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '253'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "namespaces \"kubeclient-ns\" not found",
- "reason": "NotFound",
- "details": {
- "name": "kubeclient-ns",
- "kind": "namespaces"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/guestbook
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '239'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "service \"guestbook\" not found",
- "reason": "NotFound",
- "details": {
- "name": "guestbook",
- "kind": "service"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/redis-master
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '245'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "service \"redis-master\" not found",
- "reason": "NotFound",
- "details": {
- "name": "redis-master",
- "kind": "service"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/redis-slave
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '243'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "service \"redis-slave\" not found",
- "reason": "NotFound",
- "details": {
- "name": "redis-slave",
- "kind": "service"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/guestbook
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '269'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "replicationControllers \"guestbook\" not found",
- "reason": "NotFound",
- "details": {
- "name": "guestbook",
- "kind": "replicationControllers"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-master
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '275'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "replicationControllers \"redis-master\" not found",
- "reason": "NotFound",
- "details": {
- "name": "redis-master",
- "kind": "replicationControllers"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-slave
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 404
- message: Not Found
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '273'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "replicationControllers \"redis-slave\" not found",
- "reason": "NotFound",
- "details": {
- "name": "redis-slave",
- "kind": "replicationControllers"
- },
- "code": 404
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces
- body:
- encoding: UTF-8
- string: '{"metadata":{"name":"kubeclient-ns"},"kind":"Namespace","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '74'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '297'
- body:
- encoding: UTF-8
- string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns","uid":"f41e6b27-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"534","creationTimestamp":"2015-08-09T10:03:59Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"name":"guestbook"},"name":"guestbook"},"spec":{"selector":{"app":"guestbook"},"ports":[{"port":3000,"targetPort":"http-server"}]},"type":"LoadBalancer","kind":"Service","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '239'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '521'
- body:
- encoding: UTF-8
- string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"guestbook","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/guestbook","uid":"f42187e1-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"538","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"name":"guestbook"}},"spec":{"ports":[{"protocol":"TCP","port":3000,"targetPort":"http-server","nodePort":0}],"selector":{"app":"guestbook"},"clusterIP":"10.0.0.80","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"app":"redis","role":"master"},"name":"redis-master"},"spec":{"selector":{"app":"redis","role":"master"},"ports":[{"port":6379,"targetPort":"redis-server"}]},"kind":"Service","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '244'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '552'
- body:
- encoding: UTF-8
- string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"redis-master","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/redis-master","uid":"f423bf8b-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"542","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"master"}},"spec":{"ports":[{"protocol":"TCP","port":6379,"targetPort":"redis-server","nodePort":0}],"selector":{"app":"redis","role":"master"},"clusterIP":"10.0.0.140","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"app":"redis","role":"slave"},"name":"redis-slave"},"spec":{"selector":{"app":"redis","role":"slave"},"ports":[{"port":6379,"targetPort":"redis-server"}]},"kind":"Service","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '241'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '548'
- body:
- encoding: UTF-8
- string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"redis-slave","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/redis-slave","uid":"f4264678-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"545","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"slave"}},"spec":{"ports":[{"protocol":"TCP","port":6379,"targetPort":"redis-server","nodePort":0}],"selector":{"app":"redis","role":"slave"},"clusterIP":"10.0.0.154","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"app":"guestbook","role":"slave"},"name":"guestbook"},"spec":{"selector":{"app":"guestbook"},"template":{"metadata":{"labels":{"app":"guestbook"}},"spec":{"containers":[{"name":"guestbook","image":"kubernetes/guestbook:v2","ports":[{"name":"http-server","containerPort":3000}]}]}},"replicas":3},"kind":"ReplicationController","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '395'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '815'
- body:
- encoding: UTF-8
- string: '{"kind":"ReplicationController","apiVersion":"v1","metadata":{"name":"guestbook","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/guestbook","uid":"f4287784-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"547","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"guestbook","role":"slave"}},"spec":{"replicas":3,"selector":{"app":"guestbook"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"guestbook"}},"spec":{"containers":[{"name":"guestbook","image":"kubernetes/guestbook:v2","ports":[{"name":"http-server","containerPort":3000,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":0}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"app":"redis","role":"master"},"name":"redis-master"},"spec":{"selector":{"app":"redis","role":"master"},"template":{"metadata":{"labels":{"app":"redis","role":"master"}},"spec":{"containers":[{"name":"redis-master","image":"redis","ports":[{"name":"redis-server","containerPort":6379}]}]}},"replicas":1},"kind":"ReplicationController","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '405'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '828'
- body:
- encoding: UTF-8
- string: '{"kind":"ReplicationController","apiVersion":"v1","metadata":{"name":"redis-master","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-master","uid":"f42a9800-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"558","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"master"}},"spec":{"replicas":1,"selector":{"app":"redis","role":"master"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"redis","role":"master"}},"spec":{"containers":[{"name":"redis-master","image":"redis","ports":[{"name":"redis-server","containerPort":6379,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":0}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: post
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers
- body:
- encoding: UTF-8
- string: '{"metadata":{"namespace":"kubeclient-ns","labels":{"app":"redis","role":"slave"},"name":"redis-slave"},"spec":{"selector":{"app":"redis","role":"slave"},"template":{"metadata":{"labels":{"app":"redis","role":"slave"}},"spec":{"containers":[{"name":"redis-slave","image":"kubernetes/redis-slave:v2","ports":[{"name":"redis-server","containerPort":6379}]}]}},"replicas":2},"kind":"ReplicationController","apiVersion":"v1"}'
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- Content-Length:
- - '420'
- User-Agent:
- - Ruby
- response:
- status:
- code: 201
- message: Created
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '842'
- body:
- encoding: UTF-8
- string: '{"kind":"ReplicationController","apiVersion":"v1","metadata":{"name":"redis-slave","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-slave","uid":"f42e1d09-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"567","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"slave"}},"spec":{"replicas":2,"selector":{"app":"redis","role":"slave"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"redis","role":"slave"}},"spec":{"containers":[{"name":"redis-slave","image":"kubernetes/redis-slave:v2","ports":[{"name":"redis-server","containerPort":6379,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":0}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: get
- uri: http://10.35.0.23:8080/api/v1/namespaces
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '629'
- body:
- encoding: UTF-8
- string: '{"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces","resourceVersion":"570"},"items":[{"metadata":{"name":"default","selfLink":"/api/v1/namespaces/default","uid":"37360c82-3e77-11e5-a75a-18037327aaeb","resourceVersion":"6","creationTimestamp":"2015-08-09T09:15:45Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns","uid":"f41e6b27-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"534","creationTimestamp":"2015-08-09T10:03:59Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: get
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '1661'
- body:
- encoding: UTF-8
- string: '{"kind":"ServiceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubeclient-ns/services","resourceVersion":"571"},"items":[{"metadata":{"name":"guestbook","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/guestbook","uid":"f42187e1-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"538","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"name":"guestbook"}},"spec":{"ports":[{"protocol":"TCP","port":3000,"targetPort":"http-server","nodePort":0}],"selector":{"app":"guestbook"},"clusterIP":"10.0.0.80","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},{"metadata":{"name":"redis-master","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/redis-master","uid":"f423bf8b-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"542","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"master"}},"spec":{"ports":[{"protocol":"TCP","port":6379,"targetPort":"redis-server","nodePort":0}],"selector":{"app":"redis","role":"master"},"clusterIP":"10.0.0.140","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},{"metadata":{"name":"redis-slave","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/services/redis-slave","uid":"f4264678-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"545","creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"slave"}},"spec":{"ports":[{"protocol":"TCP","port":6379,"targetPort":"redis-server","nodePort":0}],"selector":{"app":"redis","role":"slave"},"clusterIP":"10.0.0.154","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}}]}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: get
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Transfer-Encoding:
- - chunked
- body:
- encoding: UTF-8
- string: '{"kind":"ReplicationControllerList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers","resourceVersion":"571"},"items":[{"metadata":{"name":"guestbook","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/guestbook","uid":"f4287784-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"557","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"guestbook","role":"slave"}},"spec":{"replicas":3,"selector":{"app":"guestbook"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"guestbook"}},"spec":{"containers":[{"name":"guestbook","image":"kubernetes/guestbook:v2","ports":[{"name":"http-server","containerPort":3000,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":3,"observedGeneration":1}},{"metadata":{"name":"redis-master","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-master","uid":"f42a9800-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"565","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"master"}},"spec":{"replicas":1,"selector":{"app":"redis","role":"master"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"redis","role":"master"}},"spec":{"containers":[{"name":"redis-master","image":"redis","ports":[{"name":"redis-server","containerPort":6379,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":0,"observedGeneration":1}},{"metadata":{"name":"redis-slave","namespace":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-slave","uid":"f42e1d09-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"567","generation":1,"creationTimestamp":"2015-08-09T10:03:59Z","labels":{"app":"redis","role":"slave"}},"spec":{"replicas":2,"selector":{"app":"redis","role":"slave"},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"redis","role":"slave"}},"spec":{"containers":[{"name":"redis-slave","image":"kubernetes/redis-slave:v2","ports":[{"name":"redis-server","containerPort":6379,"protocol":"TCP"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}},"status":{"replicas":0}}]}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/guestbook
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/redis-master
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/services/redis-slave
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/guestbook
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-master
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns/replicationcontrollers/redis-slave
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '100'
- body:
- encoding: UTF-8
- string: |-
- {
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Success",
- "code": 200
- }
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: delete
- uri: http://10.35.0.23:8080/api/v1/namespaces/kubeclient-ns
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - '*/*; q=0.5, application/xml'
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - Ruby
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Sun, 09 Aug 2015 10:03:59 GMT
- Content-Length:
- - '345'
- body:
- encoding: UTF-8
- string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubeclient-ns","selfLink":"/api/v1/namespaces/kubeclient-ns","uid":"f41e6b27-3e7d-11e5-a75a-18037327aaeb","resourceVersion":"584","creationTimestamp":"2015-08-09T10:03:59Z","deletionTimestamp":"2015-08-09T10:03:59Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}}'
- http_version:
- recorded_at: Sun, 09 Aug 2015 10:00:02 GMT
-- request:
- method: get
- uri: http://10.35.0.23:8080/api/v1
- body:
- encoding: US-ASCII
- string: ''
- headers:
- Accept:
- - "*/*"
- Accept-Encoding:
- - gzip, deflate
- User-Agent:
- - rest-client/2.0.0 (linux-gnu x86_64) ruby/2.3.0p0
- Host:
- - localhost:8080
- response:
- status:
- code: 200
- message: OK
- headers:
- Content-Type:
- - application/json
- Date:
- - Mon, 29 Aug 2016 15:51:30 GMT
- Transfer-Encoding:
- - chunked
- body:
- encoding: UTF-8
- string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","namespaced":true,"kind":"Binding"},{"name":"componentstatuses","namespaced":false,"kind":"ComponentStatus"},{"name":"configmaps","namespaced":true,"kind":"ConfigMap"},{"name":"endpoints","namespaced":true,"kind":"Endpoints"},{"name":"events","namespaced":true,"kind":"Event"},{"name":"limitranges","namespaced":true,"kind":"LimitRange"},{"name":"namespaces","namespaced":false,"kind":"Namespace"},{"name":"namespaces/finalize","namespaced":false,"kind":"Namespace"},{"name":"namespaces/status","namespaced":false,"kind":"Namespace"},{"name":"nodes","namespaced":false,"kind":"Node"},{"name":"nodes/proxy","namespaced":false,"kind":"Node"},{"name":"nodes/status","namespaced":false,"kind":"Node"},{"name":"persistentvolumeclaims","namespaced":true,"kind":"PersistentVolumeClaim"},{"name":"persistentvolumeclaims/status","namespaced":true,"kind":"PersistentVolumeClaim"},{"name":"persistentvolumes","namespaced":false,"kind":"PersistentVolume"},{"name":"persistentvolumes/status","namespaced":false,"kind":"PersistentVolume"},{"name":"pods","namespaced":true,"kind":"Pod"},{"name":"pods/attach","namespaced":true,"kind":"Pod"},{"name":"pods/binding","namespaced":true,"kind":"Binding"},{"name":"pods/exec","namespaced":true,"kind":"Pod"},{"name":"pods/log","namespaced":true,"kind":"Pod"},{"name":"pods/portforward","namespaced":true,"kind":"Pod"},{"name":"pods/proxy","namespaced":true,"kind":"Pod"},{"name":"pods/status","namespaced":true,"kind":"Pod"},{"name":"podtemplates","namespaced":true,"kind":"PodTemplate"},{"name":"replicationcontrollers","namespaced":true,"kind":"ReplicationController"},{"name":"replicationcontrollers/scale","namespaced":true,"kind":"Scale"},{"name":"replicationcontrollers/status","namespaced":true,"kind":"ReplicationController"},{"name":"resourcequotas","namespaced":true,"kind":"ResourceQuota"},{"name":"resourcequotas/status","namespaced":true,"kind":"ResourceQuota"},{"name":"secrets","namespaced":true,"kind":"Secret"},{"name":"serviceaccounts","namespaced":true,"kind":"ServiceAccount"},{"name":"services","namespaced":true,"kind":"Service"},{"name":"services/proxy","namespaced":true,"kind":"Service"},{"name":"services/status","namespaced":true,"kind":"Service"}]}
-
-'
- http_version:
- recorded_at: Mon, 29 Aug 2016 15:51:30 GMT
-recorded_with: VCR 3.0.3
diff --git a/vendor/gems/kubeclient/test/config/allinone.kubeconfig b/vendor/gems/kubeclient/test/config/allinone.kubeconfig
deleted file mode 100644
index f06db6af123..00000000000
--- a/vendor/gems/kubeclient/test/config/allinone.kubeconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:6443
- certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvekNDQWVlZ0F3SUJBZ0lUUGJmcHkyOWFCRzY3Q2hSZEI2bEplZ1RrbURBTkJna3Foa2lHOXcwQkFRc0YKQURBWU1SWXdGQVlEVlFRREV3MXJkV0psY201bGRHVnpMV05oTUI0WERUSXlNREl5TVRBNU1ESXdNRm9YRFRNeQpNREl4T1RBNU1ESXdNRm93R0RFV01CUUdBMVVFQXhNTmEzVmlaWEp1WlhSbGN5MWpZVENDQVNJd0RRWUpLb1pJCmh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTUxqWjJjRkJhbHpvaW1hRWNwVDlKejJKbWRnc0hNT2FnVmQKSXQ3T1FwVHdEWjNucElJQ1ZwZ3VFaDl4dG92UjhtOC9IWU0rL2E0dk1RSFQrM3A4SFBqaURhUllHZzdPWjlMKwpGcC85emhCdWlhSXZnOForQmJ5czlROVV1ajZWRXdmRkpCY05INlRtemRpRGdRVXM1L2srNi92dHVKNHlzM3NECktrQU94cVBYRGFCb0FObkxwSXhkSU1RRGNXU0xGQTB3bUZoZFpKcTNLRUFvSnBFTDBXWW8xWlJCVjNpSDc3eWYKc0RiTjFPQnUydk5uUlorRHJWMFpKNUFwbWJGWFBYOGk0S0phVzlsQ0I2MkZOMGo1WHNORG95VGVBVnBlc2ZOcwp6WXVmVnBCZHFOWkZrT0tnOWRpTXVUTWlrYTJhWWZEdWlWemRlYkRnY3A5YU1sb0t0YkVDQXdFQUFhTkNNRUF3CkRnWURWUjBQQVFIL0JBUURBZ0VHTUE4R0ExVWRFd0VCL3dRRk1BTUJBZjh3SFFZRFZSME9CQllFRkJkT2l5Z0MKTGN1SnJxOHJOYTF4QURyNVNwN0NNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUJBUURDeTRJbGhBU2g2QnI1WEVjSQpUcFA1VGhEMU95UnpRbnNQZTZQMXFnV1Aza0JYSy9BY3NTbCtWR3RhWnAyb0VoSm9VbnN6N2tFOHlXM2dLK1BBCjUxelk0YUhUaUY5eGt5ZDV6T0NBR0IrY2ZwOVlzK3N6V3p5dTBRUTlJQmpKNCtlRGpnN1cwL1MrQk0yUW4xaUwKalRGSWUyQmRmK1EvSjI0L3Eza3NUWEsxN1VOdW4xNHZEUnNKZ3NOY3JGdC9ydW1mSFB4MXl0d3NpcUt5RUtWNwprRnhTd2EzZDgvQXZoR2dGcFBtZlJqVTdnQUpDRmNIejUwMXpoaTJhNkw1VFlCVGVjVlJicVpvZUhpWjBZTldJCmlzNWc0Vm1WQitCeE1BTTJXRWQyOXY0bC8zb0kxUGV5OXJ2dDdOSnFTZTFpbTl1cVpnVkRlZy92UDh6S3MvZEYKWll3OAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURXVENDQWtHZ0F3SUJBZ0lVS08xZVJtWG1DYyt2dk0rTG9CeVpFMElNR0Q4d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0dERVdNQlFHQTFVRUF4TU5hM1ZpWlhKdVpYUmxjeTFqWVRBZUZ3MHlNakF5TWpFd09UQXlNREJhRncweQpNekF5TWpFd09UQXlNREJhTURReEZ6QVZCZ05WQkFvVERuTjVjM1JsYlRwdFlYTjBaWEp6TVJrd0Z3WURWUVFECkV4QnJkV0psY201bGRHVnpMV0ZrYldsdU1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0MKQVFFQXdodzF6SmFBWVcwa0ljbjVtV3lYTm03SVlEYStRTXpIM0hWWnJnd1l5Y0NaWlA5MGJZSmo0VEYrKyszbgpQTVoydU1mWkVYY21OcEdYQ0lxek5ZSlF6dlQrYTF6Q011VVQ5K3YxZzM0My9WYVlweFJ6R3VlQ1ZGK3B2Qi9nCmpJMFU0bDFZbUpJRWs1WGNETTl4RStob1Vrd3FWYWhNbXJ2c3E4aHluWWp6V0V0bDBtSitUTzg5LzFaandBdVEKdDRvaE5PMXBRdTNyNEhDdTNIR2JGU1RQSjZFNG94UmdkTXFIbHFzd3BHMCtaTFJYVmtvZ1VidGxJVUx0Y3RvVQpUNjdmaHNUaFJDWXUyQUFpbitMMjBncjNUY3A0VXRNV3RUY1o2NnZsTDJFcDZUa1dpdXRiMDRML0JvNDZWZnhPCnNLQkNkTjFqeXNPZVRQZ1RXS2gwODh2TTB3SURBUUFCbzM4d2ZUQU9CZ05WSFE4QkFmOEVCQU1DQmFBd0hRWUQKVlIwbEJCWXdGQVlJS3dZQkJRVUhBd0VHQ0NzR0FRVUZCd01DTUF3R0ExVWRFd0VCL3dRQ01BQXdIUVlEVlIwTwpCQllFRko2NzV6N0dDSXVKY2JHeEo3YkxJM0pBTDNCZU1COEdBMVVkSXdRWU1CYUFGQmRPaXlnQ0xjdUpycThyCk5hMXhBRHI1U3A3Q01BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ1hHQ2hlbytWVXhsRlJQRVhSU3B3NDgwbGIKMm12ZHpCNE8vck9JRzJIOXZ6Z2poeGJkQ0pOVmVka0d6bUhaNzVlRUh6djFFa0luZWJTR0xGejUvUDNCUVVYdwp4eXU4NGpOSmVyOVJlMmdlbVYwdDJtd3pIV0NmUUdMS0c0QUppN00rY3haNDlYaHVtWlJWa3c3aU9SRitxWU9qCmhTbG9CLzRrZnlxM1VhcHJLQ3ZocWpFc0tKcURuZHdsT3dLTFZNaWMzbFFETExYb0thNVRpdjZpaEJpQ1ZXQUkKWFV5NWwyZG9EdlpoemdFakxlUTBDR0hiNTl2Q3Zkb3RUYzBiN0hKNFp3MjFBTHoyQ0Y3eGt3WGpQNXVVSXE1Ngo2UG1RK2dwSFhrbGJOSklPRHRrZi85STRyTWxIVXplSzVEVllZNWtkeEpUemgybng0UjBpY0Z4MWpuYzAKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
- client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVBd2h3MXpKYUFZVzBrSWNuNW1XeVhObTdJWURhK1FNekgzSFZacmd3WXljQ1paUDkwCmJZSmo0VEYrKyszblBNWjJ1TWZaRVhjbU5wR1hDSXF6TllKUXp2VCthMXpDTXVVVDkrdjFnMzQzL1ZhWXB4UnoKR3VlQ1ZGK3B2Qi9nakkwVTRsMVltSklFazVYY0RNOXhFK2hvVWt3cVZhaE1tcnZzcThoeW5ZanpXRXRsMG1KKwpUTzg5LzFaandBdVF0NG9oTk8xcFF1M3I0SEN1M0hHYkZTVFBKNkU0b3hSZ2RNcUhscXN3cEcwK1pMUlhWa29nClVidGxJVUx0Y3RvVVQ2N2Zoc1RoUkNZdTJBQWluK0wyMGdyM1RjcDRVdE1XdFRjWjY2dmxMMkVwNlRrV2l1dGIKMDRML0JvNDZWZnhPc0tCQ2ROMWp5c09lVFBnVFdLaDA4OHZNMHdJREFRQUJBb0lCQVFEQlhHQ3JRSEQ2bkVJVgo5cURSR0w4NDFmcDgvWXRmK1o1T0dnZ1B2TFVrcE5zcEpOL1NCc1dBR2xJb204QnhaakgxdC82ZnkxVWhucjRaCklER002QmVmVWFYdlJTT2VsMXZnNkFoVnlISDF4MEdoamxsclA1c3dlV3NYbjVtTDZTNFlvR3dVNzcvblZLMHoKaGFGYTkzU1VKcE0xYU1XR2poVWd1amlTZlU0TGNMRFJWS0RFUk80OFhQOEZpQ0E2UEIySUpYUDBTOUJhTVZLUQpIQVJDV05HWDV6aU5hbzFyb0l2UFFORU1EVHRuV2JiNHo0U3ZSbXBjRjYwRS9mNEpwMDZTSDAwUU5lVHY3bjU3CkR6U1hZZGNxbGZMUjlRU1RkVmt0U094UThjSGFsVGN5NXNVMnh5RndjMVM5YVpaOG56UnBiRnUxVllGQ0lWY2YKRTRRVnYxVUJBb0dCQU1XZzRuWlRIaUd0aGY2S3l6T0draDFyMmtCU21WeTlCY1lqQjhUYnpRYnJOVXk3WUFsVAppN2VPbkYrdVRLY2FWYzV2blVyVjBsN3pEM1dTV3UxQVJiOUs2WnBWTDV3allObW0venVyUittSmM4TEtsN2Q2CjU0ejFjMTExVDVpaXZNMWJZUm5VME91akhEb1g1WkQ1V0dzeE1LYUh0TGFHV1gvZ0s0OWhQYmZ6QW9HQkFQdHgKVFdRSGlPcS91VnNrMFFuWWtLWkV3ZXpmZEMyZGFWSm9BeURBVjVnY1U0TnNONjJVS2ZnVHJhRCtDaG15SjVSNwpqT1NMOGJVWDMzUVFFdm1LOVdZWE1WQnd6MjhIclp5cHVCeVFFRWM4ZTl5eTRZUStSWVoxTDJrbUdkYWVaOE16CmlEZmZMclhieTdOWnA0eGNmTVpXWW1Md2RHRVNZbzhqenVjaTFLK2hBb0dCQUpESXprQmJvbTZQM3VQZHNRTGQKcXZ4TkFJY3hQRlA1MDFvV1hlRzJHaDNnZ1pybWgzUXR0ZVZUWUhLa2tsbTE3SGtod2oyS0t1WU84aHR6anBQVQpDNFVhajh2V2J0dlgrMk5aZWhHdjZTNUoyZm95VERaS240cmdZNVZybFZYQW04dGpEOTlKejRsaVpSS1dZVVAxCnVQWkhBbHB1ZjFGZFdnSmFLKytPRVJaTEFvR0FLSmQ5K3V3TWVubEJIeW11Wlh5RXZaTFVDNzEzTC9YOWpzUWoKM1NHd0FtcHdRUU16YWQ1RmVEc1ZDS3g2VFBPcDJCcXFBQ3RuZGVqSXRoL3lNRDd5cHV5UGxZRGd1L2Z0V3lFNwpDOEZtSDFud1ZReTd3M0dhSDc3RFRLSk9BWXZKRElaQk0yUGdVcE9OS3dNS1BXcWc2aFFBQmlEemFNaGpDT0NyCkFqMXBRSUVDZ1lFQWw2THZncFl6enlUVThtRmFYazUrQXVaVHB1dlZzNXNOVEUwQmdyUWJBN0haL0hjT3hLaWQKYkxPU1diVzNaZ05aV0xXOFNhdWlURCt4L2lmVGR6UUJHQnZOaGFJaklGNnltdFlwTzNaWCs2MG15L1hUZmJGUQordUJ3UDducU1JUnNuQjUzRlc0S3VWcWljMDVEbGdvRWJ5NWM1eTlPQjlyWUQzUnJTT01EbGFzPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
diff --git a/vendor/gems/kubeclient/test/config/another-ca1.pem b/vendor/gems/kubeclient/test/config/another-ca1.pem
deleted file mode 100644
index 50825d47519..00000000000
--- a/vendor/gems/kubeclient/test/config/another-ca1.pem
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDADCCAeigAwIBAgIUQZjM/5qoAF78qIDyc+rKi4qBdOIwDQYJKoZIhvcNAQEL
-BQAwGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTAeFw0yMjAzMjIxNDQzMDBaFw0z
-MjAzMTkxNDQzMDBaMBgxFjAUBgNVBAMTDWt1YmVybmV0ZXMtY2EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGkG7g+UjpDhZ7A4Pm7Hme+RWs5IHz4I2X
-IclvtO3LuJ26yzz2S8VaXFFeUqzEPb2G1RxFGvoAVN7qrTw0n5MQJCFLAA4dI7oY
-8XLRJ7KgTBBIw1jYpgKb2zyHPIJE6VmslliKUiX+QDovdRU/dsbdup2EucrnGw4+
-QNNAc3XMbXgm6lubA6znYZlSpcQ8BKer3tq75q4KUZicIjS6gKQyZjk9a6fcOuCS
-ybtlAKp9lYzcwxZkNrx+V1PJMQ1qaJWPnMAVi7Oj5Dm3Jmf1WHBcNEh52Q/0vYlt
-4WSaeM5t/Py/m/7c4Ve97f5m2X6EhYyUbzov4qeZOnIJI3MnU1FxAgMBAAGjQjBA
-MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSl1qyt
-jd96WstRE8h9x5qkCvZUvjANBgkqhkiG9w0BAQsFAAOCAQEAJt55qYvBaniAwvgO
-tbO79g1FcQGrxpMX45TuoCE/K+MWDjrr6bp+FbLOqT8MwOsbGwwJIRTHGvkEkVso
-5AWI5aSNs3hWnltOdz27ZSHeX77WB4daK1tLK6ggZrp3v9iIpbBwWBFdmAqsPvEs
-H17K2BgAzdh6xRKPQd0BGTUpJBfk50R2gDMj7FKyIzBN69IOGytBfAXBhHzEGy4+
-MvtTEIMUjR//KgCrpNeyDuaWHttR5FdnuRxFO7O3BAfyNSaNmd/IEHQf7DIGgzOy
-+xWLyH/HRHj5C70qAqjbnrgBODI99BsA9U7oXTuyPLdIboAcFt2zD5DIYgZET52X
-53w4jA==
------END CERTIFICATE-----
diff --git a/vendor/gems/kubeclient/test/config/another-ca2.pem b/vendor/gems/kubeclient/test/config/another-ca2.pem
deleted file mode 100644
index 53be72e87d7..00000000000
--- a/vendor/gems/kubeclient/test/config/another-ca2.pem
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDADCCAeigAwIBAgIUHW3OPnmuTquJ0YgbGpmm/blsY2QwDQYJKoZIhvcNAQEL
-BQAwGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTAeFw0yMjAzMjIxNDQ0MDBaFw0z
-MjAzMTkxNDQ0MDBaMBgxFjAUBgNVBAMTDWt1YmVybmV0ZXMtY2EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLMEJs5agS0hNQBxPTtsI6dIhIi/pY8liI
-sNukbi5KwKf80FYNyRXqE8ufDVyTFzOc+MG96jnHjDaBWjrVN9On0PgUBo4nPyd4
-DtyvYx2jMzwToSEIo/Z1aroMx1oGywCgdS4/3FWAbhlSbyXKJmhfh6gX0TxWz+dV
-zqNuqQq9EWuRhOMg9vgzjfp3mjiPE10lW8pT0j5JT3PI/eGO+C2Z7z33LJXb6GM2
-nXvhGFMGY+7XG65pqJ3L8g1mk+LjPiwyIItw8wPtrnrZ2VXMklMd5Mn+jgCTNe1B
-om0nPpPIiTblCr6gcNcVjy5WGN37OKlqrT0JTuSPHcxSUp05LFjDAgMBAAGjQjBA
-MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQvV/sB
-wbR3UwjkLAMN+6P3fZ/3OjANBgkqhkiG9w0BAQsFAAOCAQEACAk4EQwCkw2EBsSR
-2SKoa1SjYFkZzIr/0/TB2YcMUvHF+RpvlD5vQ8/RJjeAl1kc6/niZ9TWCemjBLqI
-hPoFe49zr49DyQjC2ZfsXVJvFCr6g7o4q4DtQ6ltyBuTJbkn1hI+aB8zgvpofG44
-mKj18Y7tPvgXtRua4SaeBq777+22AOvKxPied9p4PTrMN4RKTP6+yIbLflej7dBD
-zQDjfmmYsH0T2ZRtBpE1dYrUbU3tkizcMZRJBgreoxoff+r5coibMIm/7gh+YoSb
-BCItCaeuGSKQ8CJb8DElcPUd6nKUjmeiQL68ztsG/+CXLiL/TZb914VaaCXvPInw
-49jJ7w==
------END CERTIFICATE-----
diff --git a/vendor/gems/kubeclient/test/config/concatenated-ca.kubeconfig b/vendor/gems/kubeclient/test/config/concatenated-ca.kubeconfig
deleted file mode 100644
index ed20e4dde50..00000000000
--- a/vendor/gems/kubeclient/test/config/concatenated-ca.kubeconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- certificate-authority: concatenated-ca.pem
- server: https://localhost:6443
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/concatenated-ca.pem b/vendor/gems/kubeclient/test/config/concatenated-ca.pem
deleted file mode 100644
index 1117298ff2d..00000000000
--- a/vendor/gems/kubeclient/test/config/concatenated-ca.pem
+++ /dev/null
@@ -1,57 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDADCCAeigAwIBAgIUQZjM/5qoAF78qIDyc+rKi4qBdOIwDQYJKoZIhvcNAQEL
-BQAwGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTAeFw0yMjAzMjIxNDQzMDBaFw0z
-MjAzMTkxNDQzMDBaMBgxFjAUBgNVBAMTDWt1YmVybmV0ZXMtY2EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGkG7g+UjpDhZ7A4Pm7Hme+RWs5IHz4I2X
-IclvtO3LuJ26yzz2S8VaXFFeUqzEPb2G1RxFGvoAVN7qrTw0n5MQJCFLAA4dI7oY
-8XLRJ7KgTBBIw1jYpgKb2zyHPIJE6VmslliKUiX+QDovdRU/dsbdup2EucrnGw4+
-QNNAc3XMbXgm6lubA6znYZlSpcQ8BKer3tq75q4KUZicIjS6gKQyZjk9a6fcOuCS
-ybtlAKp9lYzcwxZkNrx+V1PJMQ1qaJWPnMAVi7Oj5Dm3Jmf1WHBcNEh52Q/0vYlt
-4WSaeM5t/Py/m/7c4Ve97f5m2X6EhYyUbzov4qeZOnIJI3MnU1FxAgMBAAGjQjBA
-MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSl1qyt
-jd96WstRE8h9x5qkCvZUvjANBgkqhkiG9w0BAQsFAAOCAQEAJt55qYvBaniAwvgO
-tbO79g1FcQGrxpMX45TuoCE/K+MWDjrr6bp+FbLOqT8MwOsbGwwJIRTHGvkEkVso
-5AWI5aSNs3hWnltOdz27ZSHeX77WB4daK1tLK6ggZrp3v9iIpbBwWBFdmAqsPvEs
-H17K2BgAzdh6xRKPQd0BGTUpJBfk50R2gDMj7FKyIzBN69IOGytBfAXBhHzEGy4+
-MvtTEIMUjR//KgCrpNeyDuaWHttR5FdnuRxFO7O3BAfyNSaNmd/IEHQf7DIGgzOy
-+xWLyH/HRHj5C70qAqjbnrgBODI99BsA9U7oXTuyPLdIboAcFt2zD5DIYgZET52X
-53w4jA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIC/zCCAeegAwIBAgITPbfpy29aBG67ChRdB6lJegTkmDANBgkqhkiG9w0BAQsF
-ADAYMRYwFAYDVQQDEw1rdWJlcm5ldGVzLWNhMB4XDTIyMDIyMTA5MDIwMFoXDTMy
-MDIxOTA5MDIwMFowGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAMLjZ2cFBalzoimaEcpT9Jz2JmdgsHMOagVd
-It7OQpTwDZ3npIICVpguEh9xtovR8m8/HYM+/a4vMQHT+3p8HPjiDaRYGg7OZ9L+
-Fp/9zhBuiaIvg8Z+Bbys9Q9Uuj6VEwfFJBcNH6TmzdiDgQUs5/k+6/vtuJ4ys3sD
-KkAOxqPXDaBoANnLpIxdIMQDcWSLFA0wmFhdZJq3KEAoJpEL0WYo1ZRBV3iH77yf
-sDbN1OBu2vNnRZ+DrV0ZJ5ApmbFXPX8i4KJaW9lCB62FN0j5XsNDoyTeAVpesfNs
-zYufVpBdqNZFkOKg9diMuTMika2aYfDuiVzdebDgcp9aMloKtbECAwEAAaNCMEAw
-DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFBdOiygC
-LcuJrq8rNa1xADr5Sp7CMA0GCSqGSIb3DQEBCwUAA4IBAQDCy4IlhASh6Br5XEcI
-TpP5ThD1OyRzQnsPe6P1qgWP3kBXK/AcsSl+VGtaZp2oEhJoUnsz7kE8yW3gK+PA
-51zY4aHTiF9xkyd5zOCAGB+cfp9Ys+szWzyu0QQ9IBjJ4+eDjg7W0/S+BM2Qn1iL
-jTFIe2Bdf+Q/J24/q3ksTXK17UNun14vDRsJgsNcrFt/rumfHPx1ytwsiqKyEKV7
-kFxSwa3d8/AvhGgFpPmfRjU7gAJCFcHz501zhi2a6L5TYBTecVRbqZoeHiZ0YNWI
-is5g4VmVB+BxMAM2WEd29v4l/3oI1Pey9rvt7NJqSe1im9uqZgVDeg/vP8zKs/dF
-ZYw8
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDADCCAeigAwIBAgIUHW3OPnmuTquJ0YgbGpmm/blsY2QwDQYJKoZIhvcNAQEL
-BQAwGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTAeFw0yMjAzMjIxNDQ0MDBaFw0z
-MjAzMTkxNDQ0MDBaMBgxFjAUBgNVBAMTDWt1YmVybmV0ZXMtY2EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLMEJs5agS0hNQBxPTtsI6dIhIi/pY8liI
-sNukbi5KwKf80FYNyRXqE8ufDVyTFzOc+MG96jnHjDaBWjrVN9On0PgUBo4nPyd4
-DtyvYx2jMzwToSEIo/Z1aroMx1oGywCgdS4/3FWAbhlSbyXKJmhfh6gX0TxWz+dV
-zqNuqQq9EWuRhOMg9vgzjfp3mjiPE10lW8pT0j5JT3PI/eGO+C2Z7z33LJXb6GM2
-nXvhGFMGY+7XG65pqJ3L8g1mk+LjPiwyIItw8wPtrnrZ2VXMklMd5Mn+jgCTNe1B
-om0nPpPIiTblCr6gcNcVjy5WGN37OKlqrT0JTuSPHcxSUp05LFjDAgMBAAGjQjBA
-MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQvV/sB
-wbR3UwjkLAMN+6P3fZ/3OjANBgkqhkiG9w0BAQsFAAOCAQEACAk4EQwCkw2EBsSR
-2SKoa1SjYFkZzIr/0/TB2YcMUvHF+RpvlD5vQ8/RJjeAl1kc6/niZ9TWCemjBLqI
-hPoFe49zr49DyQjC2ZfsXVJvFCr6g7o4q4DtQ6ltyBuTJbkn1hI+aB8zgvpofG44
-mKj18Y7tPvgXtRua4SaeBq777+22AOvKxPied9p4PTrMN4RKTP6+yIbLflej7dBD
-zQDjfmmYsH0T2ZRtBpE1dYrUbU3tkizcMZRJBgreoxoff+r5coibMIm/7gh+YoSb
-BCItCaeuGSKQ8CJb8DElcPUd6nKUjmeiQL68ztsG/+CXLiL/TZb914VaaCXvPInw
-49jJ7w==
------END CERTIFICATE-----
diff --git a/vendor/gems/kubeclient/test/config/execauth.kubeconfig b/vendor/gems/kubeclient/test/config/execauth.kubeconfig
deleted file mode 100644
index c9a9773fe5e..00000000000
--- a/vendor/gems/kubeclient/test/config/execauth.kubeconfig
+++ /dev/null
@@ -1,61 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:6443
- name: localhost:6443
-contexts:
-- context:
- cluster: localhost:6443
- namespace: default
- user: system:admin:exec-search-path
- name: localhost/system:admin:exec-search-path
-- context:
- cluster: localhost:6443
- namespace: default
- user: system:admin:exec-relative-path
- name: localhost/system:admin:exec-relative-path
-- context:
- cluster: localhost:6443
- namespace: default
- user: system:admin:exec-absolute-path
- name: localhost/system:admin:exec-absolute-path
-kind: Config
-preferences: {}
-users:
-- name: system:admin:exec-search-path
- user:
- exec:
- # Command to execute. Required.
- command: "example-exec-plugin"
-
- # API version to use when decoding the ExecCredentials resource. Required.
- #
- # The API version returned by the plugin MUST match the version listed here.
- #
- # To integrate with tools that support multiple versions (such as client.authentication.k8s.io/v1alpha1),
- # set an environment variable or pass an argument to the tool that indicates which version the exec plugin expects.
- apiVersion: "client.authentication.k8s.io/v1beta1"
-
- # Environment variables to set when executing the plugin. Optional.
- env:
- - name: "FOO"
- value: "bar"
-
- # Arguments to pass when executing the plugin. Optional.
- args:
- - "arg1"
- - "arg2"
-
-- name: system:admin:exec-relative-path
- user:
- exec:
- # Command to execute. Required.
- command: "dir/example-exec-plugin"
- apiVersion: "client.authentication.k8s.io/v1beta1"
-
-- name: system:admin:exec-absolute-path
- user:
- exec:
- # Command to execute. Required.
- command: "/abs/path/example-exec-plugin"
- apiVersion: "client.authentication.k8s.io/v1beta1"
diff --git a/vendor/gems/kubeclient/test/config/external-ca.pem b/vendor/gems/kubeclient/test/config/external-ca.pem
deleted file mode 100644
index f1c8a8b615d..00000000000
--- a/vendor/gems/kubeclient/test/config/external-ca.pem
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC/zCCAeegAwIBAgITPbfpy29aBG67ChRdB6lJegTkmDANBgkqhkiG9w0BAQsF
-ADAYMRYwFAYDVQQDEw1rdWJlcm5ldGVzLWNhMB4XDTIyMDIyMTA5MDIwMFoXDTMy
-MDIxOTA5MDIwMFowGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAMLjZ2cFBalzoimaEcpT9Jz2JmdgsHMOagVd
-It7OQpTwDZ3npIICVpguEh9xtovR8m8/HYM+/a4vMQHT+3p8HPjiDaRYGg7OZ9L+
-Fp/9zhBuiaIvg8Z+Bbys9Q9Uuj6VEwfFJBcNH6TmzdiDgQUs5/k+6/vtuJ4ys3sD
-KkAOxqPXDaBoANnLpIxdIMQDcWSLFA0wmFhdZJq3KEAoJpEL0WYo1ZRBV3iH77yf
-sDbN1OBu2vNnRZ+DrV0ZJ5ApmbFXPX8i4KJaW9lCB62FN0j5XsNDoyTeAVpesfNs
-zYufVpBdqNZFkOKg9diMuTMika2aYfDuiVzdebDgcp9aMloKtbECAwEAAaNCMEAw
-DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFBdOiygC
-LcuJrq8rNa1xADr5Sp7CMA0GCSqGSIb3DQEBCwUAA4IBAQDCy4IlhASh6Br5XEcI
-TpP5ThD1OyRzQnsPe6P1qgWP3kBXK/AcsSl+VGtaZp2oEhJoUnsz7kE8yW3gK+PA
-51zY4aHTiF9xkyd5zOCAGB+cfp9Ys+szWzyu0QQ9IBjJ4+eDjg7W0/S+BM2Qn1iL
-jTFIe2Bdf+Q/J24/q3ksTXK17UNun14vDRsJgsNcrFt/rumfHPx1ytwsiqKyEKV7
-kFxSwa3d8/AvhGgFpPmfRjU7gAJCFcHz501zhi2a6L5TYBTecVRbqZoeHiZ0YNWI
-is5g4VmVB+BxMAM2WEd29v4l/3oI1Pey9rvt7NJqSe1im9uqZgVDeg/vP8zKs/dF
-ZYw8
------END CERTIFICATE-----
diff --git a/vendor/gems/kubeclient/test/config/external-cert.pem b/vendor/gems/kubeclient/test/config/external-cert.pem
deleted file mode 100644
index 6c8b5232d7a..00000000000
--- a/vendor/gems/kubeclient/test/config/external-cert.pem
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDWTCCAkGgAwIBAgIUKO1eRmXmCc+vvM+LoByZE0IMGD8wDQYJKoZIhvcNAQEL
-BQAwGDEWMBQGA1UEAxMNa3ViZXJuZXRlcy1jYTAeFw0yMjAyMjEwOTAyMDBaFw0y
-MzAyMjEwOTAyMDBaMDQxFzAVBgNVBAoTDnN5c3RlbTptYXN0ZXJzMRkwFwYDVQQD
-ExBrdWJlcm5ldGVzLWFkbWluMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEAwhw1zJaAYW0kIcn5mWyXNm7IYDa+QMzH3HVZrgwYycCZZP90bYJj4TF+++3n
-PMZ2uMfZEXcmNpGXCIqzNYJQzvT+a1zCMuUT9+v1g343/VaYpxRzGueCVF+pvB/g
-jI0U4l1YmJIEk5XcDM9xE+hoUkwqVahMmrvsq8hynYjzWEtl0mJ+TO89/1ZjwAuQ
-t4ohNO1pQu3r4HCu3HGbFSTPJ6E4oxRgdMqHlqswpG0+ZLRXVkogUbtlIULtctoU
-T67fhsThRCYu2AAin+L20gr3Tcp4UtMWtTcZ66vlL2Ep6TkWiutb04L/Bo46VfxO
-sKBCdN1jysOeTPgTWKh088vM0wIDAQABo38wfTAOBgNVHQ8BAf8EBAMCBaAwHQYD
-VR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0O
-BBYEFJ675z7GCIuJcbGxJ7bLI3JAL3BeMB8GA1UdIwQYMBaAFBdOiygCLcuJrq8r
-Na1xADr5Sp7CMA0GCSqGSIb3DQEBCwUAA4IBAQCXGCheo+VUxlFRPEXRSpw480lb
-2mvdzB4O/rOIG2H9vzgjhxbdCJNVedkGzmHZ75eEHzv1EkInebSGLFz5/P3BQUXw
-xyu84jNJer9Re2gemV0t2mwzHWCfQGLKG4AJi7M+cxZ49XhumZRVkw7iORF+qYOj
-hSloB/4kfyq3UaprKCvhqjEsKJqDndwlOwKLVMic3lQDLLXoKa5Tiv6ihBiCVWAI
-XUy5l2doDvZhzgEjLeQ0CGHb59vCvdotTc0b7HJ4Zw21ALz2CF7xkwXjP5uUIq56
-6PmQ+gpHXklbNJIODtkf/9I4rMlHUzeK5DVYY5kdxJTzh2nx4R0icFx1jnc0
------END CERTIFICATE-----
diff --git a/vendor/gems/kubeclient/test/config/external-key.rsa b/vendor/gems/kubeclient/test/config/external-key.rsa
deleted file mode 100644
index c79c1f2c310..00000000000
--- a/vendor/gems/kubeclient/test/config/external-key.rsa
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAwhw1zJaAYW0kIcn5mWyXNm7IYDa+QMzH3HVZrgwYycCZZP90
-bYJj4TF+++3nPMZ2uMfZEXcmNpGXCIqzNYJQzvT+a1zCMuUT9+v1g343/VaYpxRz
-GueCVF+pvB/gjI0U4l1YmJIEk5XcDM9xE+hoUkwqVahMmrvsq8hynYjzWEtl0mJ+
-TO89/1ZjwAuQt4ohNO1pQu3r4HCu3HGbFSTPJ6E4oxRgdMqHlqswpG0+ZLRXVkog
-UbtlIULtctoUT67fhsThRCYu2AAin+L20gr3Tcp4UtMWtTcZ66vlL2Ep6TkWiutb
-04L/Bo46VfxOsKBCdN1jysOeTPgTWKh088vM0wIDAQABAoIBAQDBXGCrQHD6nEIV
-9qDRGL841fp8/Ytf+Z5OGggPvLUkpNspJN/SBsWAGlIom8BxZjH1t/6fy1Uhnr4Z
-IDGM6BefUaXvRSOel1vg6AhVyHH1x0GhjllrP5sweWsXn5mL6S4YoGwU77/nVK0z
-haFa93SUJpM1aMWGjhUgujiSfU4LcLDRVKDERO48XP8FiCA6PB2IJXP0S9BaMVKQ
-HARCWNGX5ziNao1roIvPQNEMDTtnWbb4z4SvRmpcF60E/f4Jp06SH00QNeTv7n57
-DzSXYdcqlfLR9QSTdVktSOxQ8cHalTcy5sU2xyFwc1S9aZZ8nzRpbFu1VYFCIVcf
-E4QVv1UBAoGBAMWg4nZTHiGthf6KyzOGkh1r2kBSmVy9BcYjB8TbzQbrNUy7YAlT
-i7eOnF+uTKcaVc5vnUrV0l7zD3WSWu1ARb9K6ZpVL5wjYNmm/zurR+mJc8LKl7d6
-54z1c111T5iivM1bYRnU0OujHDoX5ZD5WGsxMKaHtLaGWX/gK49hPbfzAoGBAPtx
-TWQHiOq/uVsk0QnYkKZEwezfdC2daVJoAyDAV5gcU4NsN62UKfgTraD+ChmyJ5R7
-jOSL8bUX33QQEvmK9WYXMVBwz28HrZypuByQEEc8e9yy4YQ+RYZ1L2kmGdaeZ8Mz
-iDffLrXby7NZp4xcfMZWYmLwdGESYo8jzuci1K+hAoGBAJDIzkBbom6P3uPdsQLd
-qvxNAIcxPFP501oWXeG2Gh3ggZrmh3QtteVTYHKkklm17Hkhwj2KKuYO8htzjpPU
-C4Uaj8vWbtvX+2NZehGv6S5J2foyTDZKn4rgY5VrlVXAm8tjD99Jz4liZRKWYUP1
-uPZHAlpuf1FdWgJaK++OERZLAoGAKJd9+uwMenlBHymuZXyEvZLUC713L/X9jsQj
-3SGwAmpwQQMzad5FeDsVCKx6TPOp2BqqACtndejIth/yMD7ypuyPlYDgu/ftWyE7
-C8FmH1nwVQy7w3GaH77DTKJOAYvJDIZBM2PgUpONKwMKPWqg6hQABiDzaMhjCOCr
-Aj1pQIECgYEAl6LvgpYzzyTU8mFaXk5+AuZTpuvVs5sNTE0BgrQbA7HZ/HcOxKid
-bLOSWbW3ZgNZWLW8SauiTD+x/ifTdzQBGBvNhaIjIF6ymtYpO3ZX+60my/XTfbFQ
-+uBwP7nqMIRsnB53FW4KuVqic05DlgoEby5c5y9OB9rYD3RrSOMDlas=
------END RSA PRIVATE KEY-----
diff --git a/vendor/gems/kubeclient/test/config/external-without-ca.kubeconfig b/vendor/gems/kubeclient/test/config/external-without-ca.kubeconfig
deleted file mode 100644
index 1f3d617a40d..00000000000
--- a/vendor/gems/kubeclient/test/config/external-without-ca.kubeconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- # Not defining custom `certificate-authority`.
- # Without it, the localhost cert should be rejected.
- server: https://localhost:6443
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/external.kubeconfig b/vendor/gems/kubeclient/test/config/external.kubeconfig
deleted file mode 100644
index ef2dca61348..00000000000
--- a/vendor/gems/kubeclient/test/config/external.kubeconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- certificate-authority: external-ca.pem
- server: https://localhost:6443
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/gcpauth.kubeconfig b/vendor/gems/kubeclient/test/config/gcpauth.kubeconfig
deleted file mode 100644
index 0ee387ebb16..00000000000
--- a/vendor/gems/kubeclient/test/config/gcpauth.kubeconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:8443
- name: localhost:8443
-contexts:
-- context:
- cluster: localhost:8443
- namespace: default
- user: application-default-credentials
- name: localhost/application-default-credentials
-kind: Config
-preferences: {}
-users:
-- name: application-default-credentials
- user:
- auth-provider:
- config:
- access-token: <fake_token>
- expiry: 2019-02-19T11:07:29.827352-05:00
- name: gcp
diff --git a/vendor/gems/kubeclient/test/config/gcpcmdauth.kubeconfig b/vendor/gems/kubeclient/test/config/gcpcmdauth.kubeconfig
deleted file mode 100644
index 2e2db395834..00000000000
--- a/vendor/gems/kubeclient/test/config/gcpcmdauth.kubeconfig
+++ /dev/null
@@ -1,25 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:8443
- name: localhost:8443
-contexts:
-- context:
- cluster: localhost:8443
- namespace: default
- user: application-default-credentials
- name: localhost/application-default-credentials
-kind: Config
-preferences: {}
-users:
-- name: application-default-credentials
- user:
- auth-provider:
- config:
- access-token: <fake_token>
- cmd-args: config config-helper --format=json
- cmd-path: /path/to/gcloud
- expiry: 2019-04-09T19:26:18Z
- expiry-key: '{.credential.token_expiry}'
- token-key: '{.credential.access_token}'
- name: gcp
diff --git a/vendor/gems/kubeclient/test/config/insecure-custom-ca.kubeconfig b/vendor/gems/kubeclient/test/config/insecure-custom-ca.kubeconfig
deleted file mode 100644
index 06c803c16bf..00000000000
--- a/vendor/gems/kubeclient/test/config/insecure-custom-ca.kubeconfig
+++ /dev/null
@@ -1,22 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- # This is a silly configuration, skip-tls-verify makes CA data useless, but testing for completeness.
- certificate-authority: external-ca.pem
- server: https://localhost:6443
- insecure-skip-tls-verify: true
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/insecure.kubeconfig b/vendor/gems/kubeclient/test/config/insecure.kubeconfig
deleted file mode 100644
index d7c28087a92..00000000000
--- a/vendor/gems/kubeclient/test/config/insecure.kubeconfig
+++ /dev/null
@@ -1,25 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:6443
- insecure-skip-tls-verify: true
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- # Providing ANY credentials in `insecure-skip-tls-verify` mode is unwise due to MITM risk.
- # At least client certs are not as catastrophic as bearer tokens.
- #
- # This combination of insecure + client certs was once broken in kubernetes but
- # is meaningful since 2015 (https://github.com/kubernetes/kubernetes/pull/15430).
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/nouser.kubeconfig b/vendor/gems/kubeclient/test/config/nouser.kubeconfig
deleted file mode 100644
index 9289895cc81..00000000000
--- a/vendor/gems/kubeclient/test/config/nouser.kubeconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:6443
- name: localhost:6443
-contexts:
-- context:
- cluster: localhost:6443
- namespace: default
- user: ""
- name: default/localhost:6443/nouser
-current-context: default/localhost:6443/nouser
-kind: Config
-preferences: {}
-users: []
diff --git a/vendor/gems/kubeclient/test/config/oidcauth.kubeconfig b/vendor/gems/kubeclient/test/config/oidcauth.kubeconfig
deleted file mode 100644
index e1f389da46f..00000000000
--- a/vendor/gems/kubeclient/test/config/oidcauth.kubeconfig
+++ /dev/null
@@ -1,24 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:8443
- name: localhost:8443
-contexts:
-- context:
- cluster: localhost:8443
- namespace: default
- user: oidc-auth-provider
- name: localhost/oidc-auth-provider
-kind: Config
-preferences: {}
-users:
-- name: oidc-auth-provider
- user:
- auth-provider:
- config:
- client-id: fake-client-id
- client-secret: fake-client-secret
- id-token: fake-id-token
- idp-issuer-url: https://accounts.google.com
- refresh-token: fake-refresh-token
- name: oidc
diff --git a/vendor/gems/kubeclient/test/config/secure-without-ca.kubeconfig b/vendor/gems/kubeclient/test/config/secure-without-ca.kubeconfig
deleted file mode 100644
index 1b1acefe905..00000000000
--- a/vendor/gems/kubeclient/test/config/secure-without-ca.kubeconfig
+++ /dev/null
@@ -1,22 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- # Not defining custom `certificate-authority`.
- # Without it, the localhost cert should be rejected.
- server: https://localhost:6443
- insecure-skip-tls-verify: false # Same as external-without-ca.kubeconfig but with explicit false here.
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/secure.kubeconfig b/vendor/gems/kubeclient/test/config/secure.kubeconfig
deleted file mode 100644
index b0a00bb8d0d..00000000000
--- a/vendor/gems/kubeclient/test/config/secure.kubeconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- certificate-authority: external-ca.pem
- server: https://localhost:6443
- insecure-skip-tls-verify: false # Same as external.kubeconfig but with explicit false here.
- name: local
-contexts:
-- context:
- cluster: local
- namespace: default
- user: user
- name: Default
-current-context: Default
-kind: Config
-preferences: {}
-users:
-- name: user
- user:
- client-certificate: external-cert.pem
- client-key: external-key.rsa
diff --git a/vendor/gems/kubeclient/test/config/timestamps.kubeconfig b/vendor/gems/kubeclient/test/config/timestamps.kubeconfig
deleted file mode 100644
index 7b718da21e9..00000000000
--- a/vendor/gems/kubeclient/test/config/timestamps.kubeconfig
+++ /dev/null
@@ -1,25 +0,0 @@
-apiVersion: v1
-users:
-- name: gke_username
- user:
- auth-provider:
- config:
- access-token: REDACTED
- cmd-args: config config-helper --format=json
- cmd-path: /Users/tannerbruce/opt/google-cloud-sdk/bin/gcloud
- expiry: 2018-07-07T18:25:36Z
- expiry-key: '{.credential.token_expiry}'
- token-key: '{.credential.access_token}'
- name: gcp
-
-# More syntaxes from go-yaml tests, hopefully covering all types possible in kubeconfig
-IPv4: 1.2.3.4
-Duration: 3s
-date_only: 2015-01-01
-rfc3339: 2015-02-24T18:19:39Z
-longer: 2015-02-24T18:19:39.123456789-03:00
-shorter: 2015-2-3T3:4:5Z
-iso_lower_t: 2015-02-24t18:19:39Z
-space_no_tz: 2015-02-24 18:19:39
-space_tz: 2001-12-14 21:59:43.10 -5
-timestamp_like_string: "2015-02-24T18:19:39Z"
diff --git a/vendor/gems/kubeclient/test/config/update_certs_k0s.rb b/vendor/gems/kubeclient/test/config/update_certs_k0s.rb
deleted file mode 100755
index 2632d72685c..00000000000
--- a/vendor/gems/kubeclient/test/config/update_certs_k0s.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env ruby
-# https://docs.k0sproject.io/latest/k0s-in-docker/
-# Runs in --prividged mode, only run this if you trust the k0s distribution.
-
-require 'English'
-
-# Like Kernel#system, returns true iff exit status == 0
-def sh?(*cmd)
- puts("+ #{cmd.join(' ')}")
- system(*cmd)
-end
-
-# Raises if exit status != 0
-def sh!(*cmd)
- sh?(*cmd) || raise("returned #{$CHILD_STATUS}")
-end
-
-# allow DOCKER='sudo docker', DOCKER=podman etc.
-DOCKER = ENV['DOCKER'] || 'docker'
-
-CONTAINER = 'k0s'.freeze
-
-sh! "#{DOCKER} container inspect #{CONTAINER} --format='exists' ||
- #{DOCKER} run -d --name #{CONTAINER} --hostname k0s --privileged -v /var/lib/k0s -p 6443:6443 \
- ghcr.io/k0sproject/k0s/k0s:v1.23.3-k0s.1"
-
-# sh! "#{DOCKER} exec #{CONTAINER} kubectl config view --raw"
-# is another way to dump kubeconfig but succeeds with dummy output even before admin.conf exists;
-# so accessing the file is better way as it lets us poll until ready:
-sleep(1) until sh?("#{DOCKER} exec #{CONTAINER} ls -l /var/lib/k0s/pki/admin.conf")
-
-sh! "#{DOCKER} exec #{CONTAINER} cat /var/lib/k0s/pki/admin.conf > test/config/allinone.kubeconfig"
-# The rest could easily be extracted from allinone.kubeconfig, but the test is more robust
-# if we don't reuse YAML and/or Kubeclient::Config parsing to construct test data.
-sh! "#{DOCKER} exec #{CONTAINER} cat /var/lib/k0s/pki/ca.crt > test/config/external-ca.pem"
-sh! 'cat test/config/another-ca1.pem test/config/external-ca.pem '\
- ' test/config/another-ca2.pem > test/config/concatenated-ca.pem'
-sh! "#{DOCKER} exec #{CONTAINER} cat /var/lib/k0s/pki/admin.crt > test/config/external-cert.pem"
-sh! "#{DOCKER} exec #{CONTAINER} cat /var/lib/k0s/pki/admin.key > test/config/external-key.rsa"
-
-# Wait for apiserver to be up. To speed startup, this only retries connection errors;
-# without `--fail-with-body` curl still returns 0 for well-formed 4xx or 5xx responses.
-sleep(1) until sh?(
- 'curl --cacert test/config/external-ca.pem ' \
- '--key test/config/external-key.rsa ' \
- '--cert test/config/external-cert.pem https://127.0.0.1:6443/healthz'
-)
-
-sh! 'env KUBECLIENT_TEST_REAL_CLUSTER=true bundle exec rake test'
-
-sh! "#{DOCKER} rm -f #{CONTAINER}"
-
-puts 'If you run this only for tests, cleanup by running: git restore test/config/'
diff --git a/vendor/gems/kubeclient/test/config/userauth.kubeconfig b/vendor/gems/kubeclient/test/config/userauth.kubeconfig
deleted file mode 100644
index 604e3bda920..00000000000
--- a/vendor/gems/kubeclient/test/config/userauth.kubeconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-apiVersion: v1
-clusters:
-- cluster:
- server: https://localhost:6443
- name: localhost:6443
-contexts:
-- context:
- cluster: localhost:6443
- namespace: default
- user: system:admin:token
- name: localhost/system:admin:token
-- context:
- cluster: localhost:6443
- namespace: default
- user: system:admin:userpass
- name: localhost/system:admin:userpass
-current-context: localhost/system:admin:token
-kind: Config
-preferences: {}
-users:
-- name: system:admin:token
- user:
- token: 0123456789ABCDEF0123456789ABCDEF
-- name: system:admin:userpass
- user:
- username: admin
- password: pAssw0rd123
diff --git a/vendor/gems/kubeclient/test/json/bindings_list.json b/vendor/gems/kubeclient/test/json/bindings_list.json
deleted file mode 100644
index 260748c3aa4..00000000000
--- a/vendor/gems/kubeclient/test/json/bindings_list.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "the server could not find the requested resource",
- "reason": "NotFound",
- "details": {},
- "code": 404
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/component_status.json b/vendor/gems/kubeclient/test/json/component_status.json
deleted file mode 100644
index 109936d3dac..00000000000
--- a/vendor/gems/kubeclient/test/json/component_status.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "kind": "ComponentStatus",
- "apiVersion": "v1",
- "metadata": {
- "name": "etcd-0",
- "selfLink": "/api/v1/namespaces/componentstatuses/etcd-0",
- "creationTimestamp": null
- },
- "conditions": [
- {
- "type": "Healthy",
- "status": "True",
- "message": "{\"health\": \"true\"}",
- "error": "nil"
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/component_status_list.json b/vendor/gems/kubeclient/test/json/component_status_list.json
deleted file mode 100644
index 1849f489eb2..00000000000
--- a/vendor/gems/kubeclient/test/json/component_status_list.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "kind": "ComponentStatusList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/componentstatuses"
- },
- "items": [
- {
- "metadata": {
- "name": "controller-manager",
- "selfLink": "/api/v1/namespaces/componentstatuses/controller-manager",
- "creationTimestamp": null
- },
- "conditions": [
- {
- "type": "Healthy",
- "status": "Unknown",
- "error": "Get http://127.0.0.1:10252/healthz: dial tcp 127.0.0.1:10252: connection refused"
- }
- ]
- },
- {
- "metadata": {
- "name": "scheduler",
- "selfLink": "/api/v1/namespaces/componentstatuses/scheduler",
- "creationTimestamp": null
- },
- "conditions": [
- {
- "type": "Healthy",
- "status": "Unknown",
- "error": "Get http://127.0.0.1:10251/healthz: dial tcp 127.0.0.1:10251: connection refused"
- }
- ]
- },
- {
- "metadata": {
- "name": "etcd-0",
- "selfLink": "/api/v1/namespaces/componentstatuses/etcd-0",
- "creationTimestamp": null
- },
- "conditions": [
- {
- "type": "Healthy",
- "status": "True",
- "message": "{\"health\": \"true\"}",
- "error": "nil"
- }
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/config.istio.io_api_resource_list.json b/vendor/gems/kubeclient/test/json/config.istio.io_api_resource_list.json
deleted file mode 100644
index 5317e865b63..00000000000
--- a/vendor/gems/kubeclient/test/json/config.istio.io_api_resource_list.json
+++ /dev/null
@@ -1,679 +0,0 @@
-{
- "kind": "APIResourceList",
- "apiVersion": "v1",
- "groupVersion": "config.istio.io/v1alpha2",
- "resources": [
- {
- "name": "metrics",
- "singularName": "metric",
- "namespaced": true,
- "kind": "metric",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "servicecontrolreports",
- "singularName": "servicecontrolreport",
- "namespaced": true,
- "kind": "servicecontrolreport",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "opas",
- "singularName": "opa",
- "namespaced": true,
- "kind": "opa",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "redisquotas",
- "singularName": "redisquota",
- "namespaced": true,
- "kind": "redisquota",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "authorizations",
- "singularName": "authorization",
- "namespaced": true,
- "kind": "authorization",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "listentries",
- "singularName": "listentry",
- "namespaced": true,
- "kind": "listentry",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "logentries",
- "singularName": "logentry",
- "namespaced": true,
- "kind": "logentry",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "tracespans",
- "singularName": "tracespan",
- "namespaced": true,
- "kind": "tracespan",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "quotaspecs",
- "singularName": "quotaspec",
- "namespaced": true,
- "kind": "QuotaSpec",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "fluentds",
- "singularName": "fluentd",
- "namespaced": true,
- "kind": "fluentd",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "rbacs",
- "singularName": "rbac",
- "namespaced": true,
- "kind": "rbac",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "checknothings",
- "singularName": "checknothing",
- "namespaced": true,
- "kind": "checknothing",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "edges",
- "singularName": "edge",
- "namespaced": true,
- "kind": "edge",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "apikeys",
- "singularName": "apikey",
- "namespaced": true,
- "kind": "apikey",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "kuberneteses",
- "singularName": "kubernetes",
- "namespaced": true,
- "kind": "kubernetes",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "httpapispecs",
- "singularName": "httpapispec",
- "namespaced": true,
- "kind": "HTTPAPISpec",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "attributemanifests",
- "singularName": "attributemanifest",
- "namespaced": true,
- "kind": "attributemanifest",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "kubernetesenvs",
- "singularName": "kubernetesenv",
- "namespaced": true,
- "kind": "kubernetesenv",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "listcheckers",
- "singularName": "listchecker",
- "namespaced": true,
- "kind": "listchecker",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "quotas",
- "singularName": "quota",
- "namespaced": true,
- "kind": "quota",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "instances",
- "singularName": "instance",
- "namespaced": true,
- "kind": "instance",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "memquotas",
- "singularName": "memquota",
- "namespaced": true,
- "kind": "memquota",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "noops",
- "singularName": "noop",
- "namespaced": true,
- "kind": "noop",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "prometheuses",
- "singularName": "prometheus",
- "namespaced": true,
- "kind": "prometheus",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "solarwindses",
- "singularName": "solarwinds",
- "namespaced": true,
- "kind": "solarwinds",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "cloudwatches",
- "singularName": "cloudwatch",
- "namespaced": true,
- "kind": "cloudwatch",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "reportnothings",
- "singularName": "reportnothing",
- "namespaced": true,
- "kind": "reportnothing",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "stackdrivers",
- "singularName": "stackdriver",
- "namespaced": true,
- "kind": "stackdriver",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "statsds",
- "singularName": "statsd",
- "namespaced": true,
- "kind": "statsd",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "httpapispecbindings",
- "singularName": "httpapispecbinding",
- "namespaced": true,
- "kind": "HTTPAPISpecBinding",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "quotaspecbindings",
- "singularName": "quotaspecbinding",
- "namespaced": true,
- "kind": "QuotaSpecBinding",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "bypasses",
- "singularName": "bypass",
- "namespaced": true,
- "kind": "bypass",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "circonuses",
- "singularName": "circonus",
- "namespaced": true,
- "kind": "circonus",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "deniers",
- "singularName": "denier",
- "namespaced": true,
- "kind": "denier",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "signalfxs",
- "singularName": "signalfx",
- "namespaced": true,
- "kind": "signalfx",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "adapters",
- "singularName": "adapter",
- "namespaced": true,
- "kind": "adapter",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "servicecontrols",
- "singularName": "servicecontrol",
- "namespaced": true,
- "kind": "servicecontrol",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "templates",
- "singularName": "template",
- "namespaced": true,
- "kind": "template",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "handlers",
- "singularName": "handler",
- "namespaced": true,
- "kind": "handler",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "rules",
- "singularName": "rule",
- "namespaced": true,
- "kind": "rule",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "dogstatsds",
- "singularName": "dogstatsd",
- "namespaced": true,
- "kind": "dogstatsd",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- },
- {
- "name": "stdios",
- "singularName": "stdio",
- "namespaced": true,
- "kind": "stdio",
- "verbs": [
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "create",
- "update",
- "watch"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/config_map_list.json b/vendor/gems/kubeclient/test/json/config_map_list.json
deleted file mode 100644
index 85e0e30d7fe..00000000000
--- a/vendor/gems/kubeclient/test/json/config_map_list.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "kind": "ConfigMapList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/configmaps",
- "resourceVersion": "665"
- },
- "items": []
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/core_api_resource_list.json b/vendor/gems/kubeclient/test/json/core_api_resource_list.json
deleted file mode 100644
index 395acb249df..00000000000
--- a/vendor/gems/kubeclient/test/json/core_api_resource_list.json
+++ /dev/null
@@ -1,181 +0,0 @@
-{
- "kind": "APIResourceList",
- "groupVersion": "v1",
- "resources": [
- {
- "name": "bindings",
- "namespaced": true,
- "kind": "Binding"
- },
- {
- "name": "componentstatuses",
- "namespaced": false,
- "kind": "ComponentStatus"
- },
- {
- "name": "configmaps",
- "namespaced": true,
- "kind": "ConfigMap"
- },
- {
- "name": "endpoints",
- "namespaced": true,
- "kind": "Endpoints"
- },
- {
- "name": "events",
- "namespaced": true,
- "kind": "Event"
- },
- {
- "name": "limitranges",
- "namespaced": true,
- "kind": "LimitRange"
- },
- {
- "name": "namespaces",
- "namespaced": false,
- "kind": "Namespace"
- },
- {
- "name": "namespaces/finalize",
- "namespaced": false,
- "kind": "Namespace"
- },
- {
- "name": "namespaces/status",
- "namespaced": false,
- "kind": "Namespace"
- },
- {
- "name": "nodes",
- "namespaced": false,
- "kind": "Node"
- },
- {
- "name": "nodes/proxy",
- "namespaced": false,
- "kind": "Node"
- },
- {
- "name": "nodes/status",
- "namespaced": false,
- "kind": "Node"
- },
- {
- "name": "persistentvolumeclaims",
- "namespaced": true,
- "kind": "PersistentVolumeClaim"
- },
- {
- "name": "persistentvolumeclaims/status",
- "namespaced": true,
- "kind": "PersistentVolumeClaim"
- },
- {
- "name": "persistentvolumes",
- "namespaced": false,
- "kind": "PersistentVolume"
- },
- {
- "name": "persistentvolumes/status",
- "namespaced": false,
- "kind": "PersistentVolume"
- },
- {
- "name": "pods",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/attach",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/binding",
- "namespaced": true,
- "kind": "Binding"
- },
- {
- "name": "pods/exec",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/log",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/portforward",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/proxy",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "pods/status",
- "namespaced": true,
- "kind": "Pod"
- },
- {
- "name": "podtemplates",
- "namespaced": true,
- "kind": "PodTemplate"
- },
- {
- "name": "replicationcontrollers",
- "namespaced": true,
- "kind": "ReplicationController"
- },
- {
- "name": "replicationcontrollers/scale",
- "namespaced": true,
- "kind": "Scale"
- },
- {
- "name": "replicationcontrollers/status",
- "namespaced": true,
- "kind": "ReplicationController"
- },
- {
- "name": "resourcequotas",
- "namespaced": true,
- "kind": "ResourceQuota"
- },
- {
- "name": "resourcequotas/status",
- "namespaced": true,
- "kind": "ResourceQuota"
- },
- {
- "name": "secrets",
- "namespaced": true,
- "kind": "Secret"
- },
- {
- "name": "serviceaccounts",
- "namespaced": true,
- "kind": "ServiceAccount"
- },
- {
- "name": "services",
- "namespaced": true,
- "kind": "Service"
- },
- {
- "name": "services/proxy",
- "namespaced": true,
- "kind": "Service"
- },
- {
- "name": "services/status",
- "namespaced": true,
- "kind": "Service"
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/core_api_resource_list_without_kind.json b/vendor/gems/kubeclient/test/json/core_api_resource_list_without_kind.json
deleted file mode 100644
index f60e113d6e5..00000000000
--- a/vendor/gems/kubeclient/test/json/core_api_resource_list_without_kind.json
+++ /dev/null
@@ -1,129 +0,0 @@
-{
- "groupVersion": "v1",
- "resources": [
- {
- "name": "bindings",
- "namespaced": true
- },
- {
- "name": "componentstatuses",
- "namespaced": true
- },
- {
- "name": "endpoints",
- "namespaced": true
- },
- {
- "name": "events",
- "namespaced": true
- },
- {
- "name": "limitranges",
- "namespaced": true
- },
- {
- "name": "namespaces",
- "namespaced": false
- },
- {
- "name": "namespaces/finalize",
- "namespaced": false
- },
- {
- "name": "namespaces/status",
- "namespaced": false
- },
- {
- "name": "nodes",
- "namespaced": false
- },
- {
- "name": "nodes/status",
- "namespaced": false
- },
- {
- "name": "persistentvolumeclaims",
- "namespaced": true
- },
- {
- "name": "persistentvolumeclaims/status",
- "namespaced": true
- },
- {
- "name": "persistentvolumes",
- "namespaced": false
- },
- {
- "name": "persistentvolumes/status",
- "namespaced": false
- },
- {
- "name": "pods",
- "namespaced": true
- },
- {
- "name": "pods/attach",
- "namespaced": true
- },
- {
- "name": "pods/binding",
- "namespaced": true
- },
- {
- "name": "pods/exec",
- "namespaced": true
- },
- {
- "name": "pods/log",
- "namespaced": true
- },
- {
- "name": "pods/portforward",
- "namespaced": true
- },
- {
- "name": "pods/proxy",
- "namespaced": true
- },
- {
- "name": "pods/status",
- "namespaced": true
- },
- {
- "name": "podtemplates",
- "namespaced": true
- },
- {
- "name": "replicationcontrollers",
- "namespaced": true
- },
- {
- "name": "replicationcontrollers/status",
- "namespaced": true
- },
- {
- "name": "resourcequotas",
- "namespaced": true
- },
- {
- "name": "resourcequotas/status",
- "namespaced": true
- },
- {
- "name": "secrets",
- "namespaced": true
- },
- {
- "name": "securitycontextconstraints",
- "namespaced": false
- },
- {
- "name": "serviceaccounts",
- "namespaced": true
- },
- {
- "name": "services",
- "namespaced": true
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/core_oapi_resource_list_without_kind.json b/vendor/gems/kubeclient/test/json/core_oapi_resource_list_without_kind.json
deleted file mode 100644
index a902a6a7fd1..00000000000
--- a/vendor/gems/kubeclient/test/json/core_oapi_resource_list_without_kind.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "groupVersion": "v1",
- "resources": [
- {
- "name": "buildconfigs",
- "namespaced": true
- },
- {
- "name": "buildconfigs/instantiate",
- "namespaced": true
- },
- {
- "name": "buildconfigs/instantiatebinary",
- "namespaced": true
- },
- {
- "name": "buildconfigs/webhooks",
- "namespaced": true
- },
- {
- "name": "builds",
- "namespaced": true
- },
- {
- "name": "builds/clone",
- "namespaced": true
- },
- {
- "name": "builds/details",
- "namespaced": true
- },
- {
- "name": "builds/log",
- "namespaced": true
- },
- {
- "name": "clusternetworks",
- "namespaced": false
- },
- {
- "name": "clusterpolicies",
- "namespaced": false
- },
- {
- "name": "clusterpolicybindings",
- "namespaced": false
- },
- {
- "name": "clusterrolebindings",
- "namespaced": false
- },
- {
- "name": "clusterroles",
- "namespaced": false
- },
- {
- "name": "deploymentconfigrollbacks",
- "namespaced": true
- },
- {
- "name": "deploymentconfigs",
- "namespaced": true
- },
- {
- "name": "deploymentconfigs/log",
- "namespaced": true
- },
- {
- "name": "deploymentconfigs/scale",
- "namespaced": true
- },
- {
- "name": "generatedeploymentconfigs",
- "namespaced": true
- },
- {
- "name": "groups",
- "namespaced": false
- },
- {
- "name": "hostsubnets",
- "namespaced": false
- },
- {
- "name": "identities",
- "namespaced": false
- },
- {
- "name": "images",
- "namespaced": false
- },
- {
- "name": "imagestreamimages",
- "namespaced": true
- },
- {
- "name": "imagestreammappings",
- "namespaced": true
- },
- {
- "name": "imagestreams",
- "namespaced": true
- },
- {
- "name": "imagestreams/status",
- "namespaced": true
- },
- {
- "name": "imagestreamtags",
- "namespaced": true
- },
- {
- "name": "localresourceaccessreviews",
- "namespaced": true
- },
- {
- "name": "localsubjectaccessreviews",
- "namespaced": true
- },
- {
- "name": "netnamespaces",
- "namespaced": false
- },
- {
- "name": "oauthaccesstokens",
- "namespaced": false
- },
- {
- "name": "oauthauthorizetokens",
- "namespaced": false
- },
- {
- "name": "oauthclientauthorizations",
- "namespaced": false
- },
- {
- "name": "oauthclients",
- "namespaced": false
- },
- {
- "name": "policies",
- "namespaced": true
- },
- {
- "name": "policybindings",
- "namespaced": true
- },
- {
- "name": "processedtemplates",
- "namespaced": true
- },
- {
- "name": "projectrequests",
- "namespaced": false
- },
- {
- "name": "projects",
- "namespaced": false
- },
- {
- "name": "resourceaccessreviews",
- "namespaced": true
- },
- {
- "name": "rolebindings",
- "namespaced": true
- },
- {
- "name": "roles",
- "namespaced": true
- },
- {
- "name": "routes",
- "namespaced": true
- },
- {
- "name": "routes/status",
- "namespaced": true
- },
- {
- "name": "subjectaccessreviews",
- "namespaced": true
- },
- {
- "name": "templates",
- "namespaced": true
- },
- {
- "name": "useridentitymappings",
- "namespaced": false
- },
- {
- "name": "users",
- "namespaced": false
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/created_endpoint.json b/vendor/gems/kubeclient/test/json/created_endpoint.json
deleted file mode 100644
index 1e0fd7dc41d..00000000000
--- a/vendor/gems/kubeclient/test/json/created_endpoint.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "kind": "Endpoints",
- "apiVersion": "v1",
- "metadata": {
- "name": "myendpoint",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/endpoints/myendpoint",
- "uid": "59d05b48-dadb-11e5-937e-18037327aaeb",
- "resourceVersion": "393",
- "creationTimestamp": "2016-02-24T09:45:34Z"
- },
- "subsets": [
- {
- "addresses": [
- {
- "ip": "172.17.0.25"
- }
- ],
- "ports": [
- {
- "name": "https",
- "port": 6443,
- "protocol": "TCP"
- }
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/created_namespace.json b/vendor/gems/kubeclient/test/json/created_namespace.json
deleted file mode 100644
index 218bc000aa8..00000000000
--- a/vendor/gems/kubeclient/test/json/created_namespace.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-"kind": "Namespace",
-"apiVersion": "v1",
-"metadata": {
-"name": "development",
-"selfLink": "/api/v1/namespaces/development",
-"uid": "13d820d6-df5b-11e4-bd42-f8b156af4ae1",
-"resourceVersion": "2533",
-"creationTimestamp": "2015-04-10T08:24:59Z"
-},
-"spec": {
-"finalizers": [
-"kubernetes"
-]
-},
-"status": {
-"phase": "Active"
-}
-}
-
diff --git a/vendor/gems/kubeclient/test/json/created_secret.json b/vendor/gems/kubeclient/test/json/created_secret.json
deleted file mode 100644
index bcea8848335..00000000000
--- a/vendor/gems/kubeclient/test/json/created_secret.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "kind": "Secret",
- "apiVersion": "v1",
- "metadata": {
- "name": "test-secret",
- "namespace": "dev",
- "selfLink": "/api/v1/namespaces/dev/secrets/test-secret",
- "uid": "4e38a198-2bcb-11e5-a483-0e840567604d",
- "resourceVersion": "245569",
- "creationTimestamp": "2015-07-16T14:59:49Z"
- },
- "data": {
- "super-secret": "Y2F0J3MgYXJlIGF3ZXNvbWUK"
- },
- "type": "Opaque"
-}
diff --git a/vendor/gems/kubeclient/test/json/created_security_context_constraint.json b/vendor/gems/kubeclient/test/json/created_security_context_constraint.json
deleted file mode 100644
index c2981712cb5..00000000000
--- a/vendor/gems/kubeclient/test/json/created_security_context_constraint.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "allowHostDirVolumePlugin": false,
- "allowHostIPC": false,
- "allowHostNetwork": false,
- "allowHostPID": false,
- "allowHostPorts": false,
- "allowPrivilegedContainer": false,
- "allowedCapabilities": null,
- "allowedFlexVolumes": null,
- "apiVersion": "security.openshift.io/v1",
- "defaultAddCapabilities": null,
- "fsGroup": {
- "type": "RunAsAny"
- },
- "groups": [],
- "kind": "SecurityContextConstraints",
- "metadata": {
- "creationTimestamp": "2018-11-23T10:01:42Z",
- "name": "teleportation",
- "resourceVersion": "5274",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/teleportation",
- "uid": "c6e8e2ec-ef06-11e8-b4c0-68f728fac3ab"
- },
- "priority": null,
- "readOnlyRootFilesystem": false,
- "requiredDropCapabilities": null,
- "runAsUser": {
- "type": "MustRunAs"
- },
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "users": [],
- "volumes": [
- "awsElasticBlockStore",
- "azureDisk",
- "azureFile",
- "cephFS",
- "cinder",
- "configMap",
- "downwardAPI",
- "emptyDir",
- "fc",
- "flexVolume",
- "flocker",
- "gcePersistentDisk",
- "gitRepo",
- "glusterfs",
- "iscsi",
- "nfs",
- "persistentVolumeClaim",
- "photonPersistentDisk",
- "portworxVolume",
- "projected",
- "quobyte",
- "rbd",
- "scaleIO",
- "secret",
- "storageOS",
- "vsphere"
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/created_service.json b/vendor/gems/kubeclient/test/json/created_service.json
deleted file mode 100644
index 4c2bc7d7196..00000000000
--- a/vendor/gems/kubeclient/test/json/created_service.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "kind": "Service",
- "apiVersion": "v1",
- "metadata": {
- "name": "guestbook",
- "namespace": "staging",
- "selfLink": "/api/v1/namespaces/staging/services/guestbook",
- "uid": "29885239-df58-11e4-bd42-f8b156af4ae1",
- "resourceVersion": "1908",
- "creationTimestamp": "2015-04-10T08:04:07Z",
- "labels": {
- "name": "guestbook"
- }
- },
- "spec": {
- "ports": [
- {
- "name": "",
- "protocol": "TCP",
- "port": 3000,
- "targetPort": "http-server"
- }
- ],
- "selector": {
- "name": "guestbook"
- },
- "clusterIP": "10.0.0.99",
- "sessionAffinity": "None"
- },
- "status": {}
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/empty_pod_list.json b/vendor/gems/kubeclient/test/json/empty_pod_list.json
deleted file mode 100644
index a82cba1148f..00000000000
--- a/vendor/gems/kubeclient/test/json/empty_pod_list.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "kind": "PodList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/pods",
- "resourceVersion": "565"
- },
- "items": []
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/endpoint_list.json b/vendor/gems/kubeclient/test/json/endpoint_list.json
deleted file mode 100644
index bd6c00ab678..00000000000
--- a/vendor/gems/kubeclient/test/json/endpoint_list.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "kind": "EndpointsList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces/endpoints",
- "resourceVersion": "39"
- },
- "items": [
- {
- "metadata": {
- "name": "example",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/endpoints/example",
- "uid": "db467530-b6aa-11e4-974a-525400c903c1",
- "resourceVersion": "38",
- "creationTimestamp": "2015-02-17T08:42:46-05:00"
- },
- "endpoints": [
- "172.17.0.63:80",
- "172.17.0.64:80"
- ]
- },
- {
- "metadata": {
- "name": "kubernetes",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes",
- "resourceVersion": "8",
- "creationTimestamp": null
- },
- "endpoints": [
- "192.168.122.4:6443"
- ]
- },
- {
- "metadata": {
- "name": "kubernetes-ro",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes-ro",
- "resourceVersion": "7",
- "creationTimestamp": null
- },
- "endpoints": [
- "192.168.122.4:7080"
- ]
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/entity_list.json b/vendor/gems/kubeclient/test/json/entity_list.json
deleted file mode 100644
index 3dd140d38c8..00000000000
--- a/vendor/gems/kubeclient/test/json/entity_list.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "kind": "ServiceList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/services",
- "resourceVersion": "59"
- },
- "items": [
- {
- "metadata": {
- "name": "kubernetes",
- "namespace": "default",
- "selfLink": "/api/v1/services/kubernetes?namespace=default",
- "uid": "016e9dcd-ce39-11e4-ac24-3c970e4a436a",
- "resourceVersion": "6",
- "creationTimestamp": "2015-03-19T15:08:16+02:00",
- "labels": {
- "component": "apiserver",
- "provider": "kubernetes"
- }
- },
- "spec": {
- "port": 443,
- "protocol": "TCP",
- "selector": null,
- "clusterIP": "10.0.0.2",
- "containerPort": 0,
- "sessionAffinity": "None"
- },
- "status": {}
- },
- {
- "metadata": {
- "name": "kubernetes-ro",
- "namespace": "default",
- "selfLink": "/api/v1/services/kubernetes-ro?namespace=default",
- "uid": "015b78bf-ce39-11e4-ac24-3c970e4a436a",
- "resourceVersion": "5",
- "creationTimestamp": "2015-03-19T15:08:15+02:00",
- "labels": {
- "component": "apiserver",
- "provider": "kubernetes"
- }
- },
- "spec": {
- "port": 80,
- "protocol": "TCP",
- "selector": null,
- "clusterIP": "10.0.0.1",
- "containerPort": 0,
- "sessionAffinity": "None"
- },
- "status": {}
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/event_list.json b/vendor/gems/kubeclient/test/json/event_list.json
deleted file mode 100644
index 45abfccc278..00000000000
--- a/vendor/gems/kubeclient/test/json/event_list.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "kind": "EventList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/events",
- "resourceVersion": "152"
- },
- "items": [
- {
- "metadata": {
- "name": "php.13c130f78da4641e",
- "namespace": "default",
- "selfLink": "/api/v1/events/php.13c130f78da4641e?namespace=default",
- "uid": "f3a454d2-b03a-11e4-89e4-525400c903c1",
- "resourceVersion": "178",
- "creationTimestamp": "2015-02-09T04:06:37-05:00"
- },
- "involvedObject": {
- "kind": "BoundPod",
- "namespace": "default",
- "name": "php",
- "uid": "64273d20-b03a-11e4-89e4-525400c903c1",
- "apiVersion": "v1beta1",
- "fieldPath": "spec.containers{nginx}"
- },
- "reason": "created",
- "message": "Created with docker id 9ba2a714411d2d0dd1e826b2fe5c3222b5cbfd9dd9133c841585cbb96b8c2c0f",
- "source": {
- "component": "kubelet",
- "host": "127.0.0.1"
- },
- "timestamp": "2015-02-09T04:06:37-05:00"
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/extensions_v1beta1_api_resource_list.json b/vendor/gems/kubeclient/test/json/extensions_v1beta1_api_resource_list.json
deleted file mode 100644
index 16fc80cf4d7..00000000000
--- a/vendor/gems/kubeclient/test/json/extensions_v1beta1_api_resource_list.json
+++ /dev/null
@@ -1,217 +0,0 @@
-{
- "kind": "APIResourceList",
- "groupVersion": "extensions/v1beta1",
- "resources": [
- {
- "name": "daemonsets",
- "singularName": "",
- "namespaced": true,
- "kind": "DaemonSet",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "ds"
- ]
- },
- {
- "name": "daemonsets/status",
- "singularName": "",
- "namespaced": true,
- "kind": "DaemonSet",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "deployments",
- "singularName": "",
- "namespaced": true,
- "kind": "Deployment",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "deploy"
- ]
- },
- {
- "name": "deployments/rollback",
- "singularName": "",
- "namespaced": true,
- "kind": "DeploymentRollback",
- "verbs": [
- "create"
- ]
- },
- {
- "name": "deployments/scale",
- "singularName": "",
- "namespaced": true,
- "group": "extensions",
- "version": "v1beta1",
- "kind": "Scale",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "deployments/status",
- "singularName": "",
- "namespaced": true,
- "kind": "Deployment",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "ingresses",
- "singularName": "",
- "namespaced": true,
- "kind": "Ingress",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "ing"
- ]
- },
- {
- "name": "ingresses/status",
- "singularName": "",
- "namespaced": true,
- "kind": "Ingress",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "networkpolicies",
- "singularName": "",
- "namespaced": true,
- "kind": "NetworkPolicy",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "netpol"
- ]
- },
- {
- "name": "podsecuritypolicies",
- "singularName": "",
- "namespaced": false,
- "kind": "PodSecurityPolicy",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "psp"
- ]
- },
- {
- "name": "replicasets",
- "singularName": "",
- "namespaced": true,
- "kind": "ReplicaSet",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "rs"
- ]
- },
- {
- "name": "replicasets/scale",
- "singularName": "",
- "namespaced": true,
- "group": "extensions",
- "version": "v1beta1",
- "kind": "Scale",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "replicasets/status",
- "singularName": "",
- "namespaced": true,
- "kind": "ReplicaSet",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "replicationcontrollers",
- "singularName": "",
- "namespaced": true,
- "kind": "ReplicationControllerDummy",
- "verbs": []
- },
- {
- "name": "replicationcontrollers/scale",
- "singularName": "",
- "namespaced": true,
- "kind": "Scale",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/limit_range.json b/vendor/gems/kubeclient/test/json/limit_range.json
deleted file mode 100644
index ac2e21aa744..00000000000
--- a/vendor/gems/kubeclient/test/json/limit_range.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "kind": "LimitRange",
- "apiVersion": "v1",
- "metadata": {
- "name": "limits",
- "namespace": "quota-example",
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/limits",
- "uid": "7a76a44c-3e9d-11e5-8214-0aaeec44370e",
- "resourceVersion": "103384",
- "creationTimestamp": "2015-08-09T13:49:39Z"
- },
- "spec": {
- "limits": [
- {
- "type": "Container",
- "default": {
- "cpu": "100m",
- "memory": "512Mi"
- }
- }
- ]
- }
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/limit_range_list.json b/vendor/gems/kubeclient/test/json/limit_range_list.json
deleted file mode 100644
index 7986ec861d8..00000000000
--- a/vendor/gems/kubeclient/test/json/limit_range_list.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "kind": "LimitRangeList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/",
- "resourceVersion": "103421"
- },
- "items": [
- {
- "metadata": {
- "name": "limits",
- "namespace": "quota-example",
- "selfLink": "/api/v1/namespaces/quota-example/limitranges/limits",
- "uid": "7a76a44c-3e9d-11e5-8214-0aaeec44370e",
- "resourceVersion": "103384",
- "creationTimestamp": "2015-08-09T13:49:39Z"
- },
- "spec": {
- "limits": [
- {
- "type": "Container",
- "default": {
- "cpu": "100m",
- "memory": "512Mi"
- }
- }
- ]
- }
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/namespace.json b/vendor/gems/kubeclient/test/json/namespace.json
deleted file mode 100644
index 5a856730188..00000000000
--- a/vendor/gems/kubeclient/test/json/namespace.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "kind": "Namespace",
- "apiVersion": "v1",
- "metadata": {
- "name": "staging",
- "selfLink": "/api/v1/namespaces/staging",
- "uid": "e388bc10-c021-11e4-a514-3c970e4a436a",
- "resourceVersion": "1168",
- "creationTimestamp": "2015-03-01T16:47:31+02:00"
- },
- "spec": {},
- "status": {}
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/namespace_exception.json b/vendor/gems/kubeclient/test/json/namespace_exception.json
deleted file mode 100644
index 555ef24cabb..00000000000
--- a/vendor/gems/kubeclient/test/json/namespace_exception.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "kind": "Status",
- "apiVersion": "v1",
- "metadata": {},
- "status": "Failure",
- "message": "converting to : type names don't match (Pod, Namespace)",
- "code": 500
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/namespace_list.json b/vendor/gems/kubeclient/test/json/namespace_list.json
deleted file mode 100644
index af6feb7485c..00000000000
--- a/vendor/gems/kubeclient/test/json/namespace_list.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "kind": "NamespaceList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces",
- "resourceVersion": "1707"
- },
- "items": [
- {
- "metadata": {
- "name": "default",
- "selfLink": "/api/v1/namespaces/default",
- "uid": "56c3eb7c-c009-11e4-a514-3c970e4a436a",
- "resourceVersion": "4",
- "creationTimestamp": "2015-03-01T13:51:47+02:00"
- },
- "spec": {},
- "status": {}
- },
- {
- "metadata": {
- "name": "staging",
- "selfLink": "/api/v1/namespaces/staging",
- "uid": "e388bc10-c021-11e4-a514-3c970e4a436a",
- "resourceVersion": "1168",
- "creationTimestamp": "2015-03-01T16:47:31+02:00"
- },
- "spec": {},
- "status": {}
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/node.json b/vendor/gems/kubeclient/test/json/node.json
deleted file mode 100644
index bb4772c3f20..00000000000
--- a/vendor/gems/kubeclient/test/json/node.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "kind": "Node",
- "apiVersion": "v1",
- "metadata": {
- "name": "127.0.0.1",
- "selfLink": "/api/v1/nodes/127.0.0.1",
- "uid": "041143c5-ce39-11e4-ac24-3c970e4a436a",
- "resourceVersion": "1724",
- "creationTimestamp": "2015-03-19T15:08:20+02:00"
- },
- "spec": {
- "capacity": {
- "cpu": "1",
- "memory": "3Gi"
- }
- },
- "status": {
- "hostIP": "127.0.0.1",
- "conditions": [
- {
- "kind": "Ready",
- "status": "None",
- "lastProbeTime": "2015-03-20T14:16:52+02:00",
- "lastTransitionTime": "2015-03-19T15:08:20+02:00",
- "reason": "Node health check failed: kubelet /healthz endpoint returns not ok"
- }
- ]
- }
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/node_list.json b/vendor/gems/kubeclient/test/json/node_list.json
deleted file mode 100644
index a5c7cbb77a3..00000000000
--- a/vendor/gems/kubeclient/test/json/node_list.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "kind": "NodeList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/nodes",
- "resourceVersion": "137"
- },
- "items": [
- {
- "metadata": {
- "name": "127.0.0.1",
- "selfLink": "/api/v1/nodes/127.0.0.1",
- "uid": "041143c5-ce39-11e4-ac24-3c970e4a436a",
- "resourceVersion": "137",
- "creationTimestamp": "2015-03-19T15:08:20+02:00"
- },
- "spec": {
- "capacity": {
- "cpu": "1",
- "memory": "3Gi"
- }
- },
- "status": {
- "hostIP": "127.0.0.1",
- "conditions": [
- {
- "kind": "Ready",
- "status": "None",
- "lastProbeTime": "2015-03-19T15:29:33+02:00",
- "lastTransitionTime": "2015-03-19T15:08:20+02:00",
- "reason": "Node health check failed: kubelet /healthz endpoint returns not ok"
- }
- ]
- }
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/node_notice.json b/vendor/gems/kubeclient/test/json/node_notice.json
deleted file mode 100644
index 69ee438ecc2..00000000000
--- a/vendor/gems/kubeclient/test/json/node_notice.json
+++ /dev/null
@@ -1,160 +0,0 @@
-{
- "type": "ADDED",
- "object": {
- "apiVersion": "v1",
- "kind": "Node",
- "metadata": {
- "annotations": {
- "volumes.kubernetes.io/controller-managed-attach-detach": "true"
- },
- "creationTimestamp": "2017-12-11T12:00:13Z",
- "labels": {
- "beta.kubernetes.io/arch": "amd64",
- "beta.kubernetes.io/os": "linux",
- "kubernetes.io/hostname": "openshift.local",
- "openshift-infra": "apiserver"
- },
- "name": "openshift.local",
- "resourceVersion": "367410",
- "selfLink": "/api/v1/nodes/openshift.local",
- "uid": "d88c7af6-de6a-11e7-8725-52540080f1d2"
- },
- "spec": {
- "externalID": "openshift.local"
- },
- "status": {
- "addresses": [
- {
- "address": "192.168.122.40",
- "type": "InternalIP"
- },
- {
- "address": "openshift.local",
- "type": "Hostname"
- }
- ],
- "allocatable": {
- "cpu": "2",
- "memory": "8072896Ki",
- "pods": "20"
- },
- "capacity": {
- "cpu": "2",
- "memory": "8175296Ki",
- "pods": "20"
- },
- "conditions": [
- {
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
- "lastTransitionTime": "2017-12-11T12:00:13Z",
- "message": "kubelet has sufficient disk space available",
- "reason": "KubeletHasSufficientDisk",
- "status": "False",
- "type": "OutOfDisk"
- },
- {
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
- "lastTransitionTime": "2017-12-11T12:00:13Z",
- "message": "kubelet has sufficient memory available",
- "reason": "KubeletHasSufficientMemory",
- "status": "False",
- "type": "MemoryPressure"
- },
- {
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
- "lastTransitionTime": "2017-12-11T12:00:13Z",
- "message": "kubelet has no disk pressure",
- "reason": "KubeletHasNoDiskPressure",
- "status": "False",
- "type": "DiskPressure"
- },
- {
- "lastHeartbeatTime": "2017-12-15T00:36:13Z",
- "lastTransitionTime": "2017-12-14T15:43:39Z",
- "message": "kubelet is posting ready status",
- "reason": "KubeletReady",
- "status": "True",
- "type": "Ready"
- }
- ],
- "daemonEndpoints": {
- "kubeletEndpoint": {
- "Port": 10250
- }
- },
- "images": [
- {
- "names": [
- "docker.io/openshift/origin@sha256:908c6c9ccf0e0feefe2658899656c6e73d2854777fa340738fb903f0a40c328d",
- "docker.io/openshift/origin:latest"
- ],
- "sizeBytes": 1222636603
- },
- {
- "names": [
- "docker.io/openshift/origin-deployer@sha256:3d324bce1870047edc418041cefdec88e0a5bbb5b3b9f6fd35b43f14919a656c",
- "docker.io/openshift/origin-deployer:v3.7.0"
- ],
- "sizeBytes": 1098951248
- },
- {
- "names": [
- "docker.io/cockpit/kubernetes@sha256:a8e58cd5e6f5a4d12d1e2dfd339686b74f3c22586952ca7aa184dc254ab49714",
- "docker.io/cockpit/kubernetes:latest"
- ],
- "sizeBytes": 375926556
- },
- {
- "names": [
- "docker.io/cockpit/kubernetes@sha256:0745b3823efc57e03a5ef378614dfcb6c2b1e3964220bbf908fb3046a91cef70"
- ],
- "sizeBytes": 350062743
- },
- {
- "names": [
- "docker.io/openshift/origin-service-catalog@sha256:ef851e06276af96838a93320d0e4be51cc8de6e5afb2fb0efd4e56cec114b937"
- ],
- "sizeBytes": 284732029
- },
- {
- "names": [
- "docker.io/openshift/origin-service-catalog@sha256:8addfd742d92d8da819b091d6bda40edc45e88d1446ffd1ad658b6d21b3c36fd"
- ],
- "sizeBytes": 284731998
- },
- {
- "names": [
- "docker.io/openshift/origin-service-catalog@sha256:b3a737cc346b3cae85ef2f5d020b607781a1cac38fe70678cb78fee2c2a3bf8a"
- ],
- "sizeBytes": 284731943
- },
- {
- "names": [
- "docker.io/openshift/origin-service-catalog@sha256:957934537721da33362693d4f1590dc79dc5da7438799bf14d645165768e53ef",
- "docker.io/openshift/origin-service-catalog:latest"
- ],
- "sizeBytes": 283929631
- },
- {
- "names": [
- "docker.io/openshift/origin-pod@sha256:2c257d83a01607b229ef5e3dca09f52c3a2a2788c09dc33f0444ec4e572a9e1d",
- "docker.io/openshift/origin-pod:v3.7.0"
- ],
- "sizeBytes": 218423400
- }
- ],
- "nodeInfo": {
- "architecture": "amd64",
- "bootID": "75be791d-88a2-4f56-a588-c071a80bf7cf",
- "containerRuntimeVersion": "docker://1.12.6",
- "kernelVersion": "3.10.0-693.11.1.el7.x86_64",
- "kubeProxyVersion": "v1.7.6+a08f5eeb62",
- "kubeletVersion": "v1.7.6+a08f5eeb62",
- "machineID": "adf09ffc2de2624aa5ed335727c7400d",
- "operatingSystem": "linux",
- "osImage": "CentOS Linux 7 (Core)",
- "systemUUID": "FC9FF0AD-E22D-4A62-A5ED-335727C7400D"
- }
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/persistent_volume.json b/vendor/gems/kubeclient/test/json/persistent_volume.json
deleted file mode 100644
index 612d9df1564..00000000000
--- a/vendor/gems/kubeclient/test/json/persistent_volume.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "kind": "PersistentVolume",
- "apiVersion": "v1",
- "metadata": {
- "name": "pv0001",
- "selfLink": "/api/v1/persistentvolumes/pv0001",
- "uid": "c83eece1-4b38-11e5-8d27-28d2447dcefe",
- "resourceVersion": "1585",
- "creationTimestamp": "2015-08-25T14:51:35Z",
- "labels": {
- "type": "local"
- }
- },
- "spec": {
- "capacity": {
- "storage": "10Gi"
- },
- "hostPath": {
- "path": "/tmp/data01"
- },
- "accessModes": [
- "ReadWriteOnce"
- ],
- "claimRef": {
- "kind": "PersistentVolumeClaim",
- "namespace": "default",
- "name": "myclaim-1",
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
- "apiVersion": "v1",
- "resourceVersion": "1582"
- },
- "persistentVolumeReclaimPolicy": "Retain"
- },
- "status": {
- "phase": "Bound"
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/persistent_volume_claim.json b/vendor/gems/kubeclient/test/json/persistent_volume_claim.json
deleted file mode 100644
index 65154685348..00000000000
--- a/vendor/gems/kubeclient/test/json/persistent_volume_claim.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "kind": "PersistentVolumeClaim",
- "apiVersion": "v1",
- "metadata": {
- "name": "myclaim-1",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/persistentvolumeclaims/myclaim-1",
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
- "resourceVersion": "1584",
- "creationTimestamp": "2015-08-25T14:51:55Z"
- },
- "spec": {
- "accessModes": [
- "ReadWriteOnce"
- ],
- "resources": {
- "requests": {
- "storage": "3Gi"
- }
- },
- "volumeName": "pv0001"
- },
- "status": {
- "phase": "Bound",
- "accessModes": [
- "ReadWriteOnce"
- ],
- "capacity": {
- "storage": "10Gi"
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/persistent_volume_claim_list.json b/vendor/gems/kubeclient/test/json/persistent_volume_claim_list.json
deleted file mode 100644
index 9533d75603b..00000000000
--- a/vendor/gems/kubeclient/test/json/persistent_volume_claim_list.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "kind": "PersistentVolumeClaimList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/persistentvolumeclaims",
- "resourceVersion": "3188"
- },
- "items": [
- {
- "metadata": {
- "name": "myclaim-1",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/persistentvolumeclaims/myclaim-1",
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
- "resourceVersion": "1584",
- "creationTimestamp": "2015-08-25T14:51:55Z"
- },
- "spec": {
- "accessModes": [
- "ReadWriteOnce"
- ],
- "resources": {
- "requests": {
- "storage": "3Gi"
- }
- },
- "volumeName": "pv0001"
- },
- "status": {
- "phase": "Bound",
- "accessModes": [
- "ReadWriteOnce"
- ],
- "capacity": {
- "storage": "10Gi"
- }
- }
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/persistent_volume_claims_nil_items.json b/vendor/gems/kubeclient/test/json/persistent_volume_claims_nil_items.json
deleted file mode 100644
index b23ff4dcffd..00000000000
--- a/vendor/gems/kubeclient/test/json/persistent_volume_claims_nil_items.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "kind": "PersistentVolumeClaimList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/persistentvolumeclaims",
- "resourceVersion": "1089012"
- }
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/persistent_volume_list.json b/vendor/gems/kubeclient/test/json/persistent_volume_list.json
deleted file mode 100644
index fa7e53cb914..00000000000
--- a/vendor/gems/kubeclient/test/json/persistent_volume_list.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "kind": "PersistentVolumeList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/persistentvolumes",
- "resourceVersion": "2999"
- },
- "items": [
- {
- "metadata": {
- "name": "pv0001",
- "selfLink": "/api/v1/persistentvolumes/pv0001",
- "uid": "c83eece1-4b38-11e5-8d27-28d2447dcefe",
- "resourceVersion": "1585",
- "creationTimestamp": "2015-08-25T14:51:35Z",
- "labels": {
- "type": "local"
- }
- },
- "spec": {
- "capacity": {
- "storage": "10Gi"
- },
- "hostPath": {
- "path": "/tmp/data01"
- },
- "accessModes": [
- "ReadWriteOnce"
- ],
- "claimRef": {
- "kind": "PersistentVolumeClaim",
- "namespace": "default",
- "name": "myclaim-1",
- "uid": "d47384a3-4b38-11e5-8d27-28d2447dcefe",
- "apiVersion": "v1",
- "resourceVersion": "1582"
- },
- "persistentVolumeReclaimPolicy": "Retain"
- },
- "status": {
- "phase": "Bound"
- }
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/pod.json b/vendor/gems/kubeclient/test/json/pod.json
deleted file mode 100644
index 913c2146f6a..00000000000
--- a/vendor/gems/kubeclient/test/json/pod.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "kind": "Pod",
- "apiVersion": "v1",
- "metadata": {
- "name": "redis-master3",
- "namespace": "default",
- "selfLink": "/api/v1/pods/redis-master3?namespace=default",
- "uid": "a344023f-a23c-11e4-a36b-3c970e4a436a",
- "resourceVersion": "9",
- "creationTimestamp": "2015-01-22T15:43:24+02:00",
- "labels": {
- "name": "redis-master"
- }
- },
- "spec": {
- "volumes": null,
- "containers": [
- {
- "name": "master",
- "image": "dockerfile/redis",
- "ports": [
- {
- "hostPort": 6379,
- "containerPort": 6379,
- "protocol": "TCP"
- }
- ],
- "memory": "0",
- "cpu": "100m",
- "imagePullPolicy": ""
- },
- {
- "name": "php-redis",
- "image": "kubernetes/example-guestbook-php-redis",
- "ports": [
- {
- "hostPort": 8000,
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "memory": "50000000",
- "cpu": "100m",
- "imagePullPolicy": ""
- }
- ],
- "restartPolicy": {
- "always": {
-
- }
- },
- "dnsPolicy": "ClusterFirst"
- },
- "status": {
- "phase": "Running",
- "host": "127.0.0.1",
- "podIP": "172.17.0.2",
- "info": {
- "master": {
- "state": {
- "running": {
- "startedAt": "2015-01-22T13:43:29Z"
- }
- },
- "restartCount": 0,
- "containerID": "docker://87458d9a12f9dc9a01b52c1eee5f09cf48939380271c0eaf31af298ce67b125e",
- "image": "dockerfile/redis"
- },
- "net": {
- "state": {
- "running": {
- "startedAt": "2015-01-22T13:43:27Z"
- }
- },
- "restartCount": 0,
- "containerID": "docker://3bb5ced1f831322d370f70b58137e1dd41216c2960b7a99394542b5230cbd259",
- "podIP": "172.17.0.2",
- "image": "kubernetes/pause:latest"
- },
- "php-redis": {
- "state": {
- "running": {
- "startedAt": "2015-01-22T13:43:31Z"
- }
- },
- "restartCount": 0,
- "containerID": "docker://5f08685c0a7a5c974d438a52c6560d72bb0aae7e805d2a34302b9b460f1297c7",
- "image": "kubernetes/example-guestbook-php-redis"
- }
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/pod_list.json b/vendor/gems/kubeclient/test/json/pod_list.json
deleted file mode 100644
index d08bbdce0c0..00000000000
--- a/vendor/gems/kubeclient/test/json/pod_list.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "kind": "PodList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/pods",
- "resourceVersion": "1315"
- },
- "items": [
- {
- "metadata": {
- "name": "redis-master3",
- "namespace": "default",
- "selfLink": "/api/v1/pods/redis-master3?namespace=default",
- "uid": "1da148b4-cef5-11e4-ac24-3c970e4a436a",
- "resourceVersion": "1301",
- "creationTimestamp": "2015-03-20T13:34:48+02:00",
- "labels": {
- "mylabel": "mylabelvalue",
- "role": "pod"
- }
- },
- "spec": {
- "volumes": null,
- "containers": [
- {
- "name": "master",
- "image": "dockerfile/redis",
- "ports": [
- {
- "hostPort": 6379,
- "containerPort": 6379,
- "protocol": "TCP"
- }
- ],
- "resources": {
- "limits": {
- "cpu": "100m"
- }
- },
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent",
- "securityContext": {
- "capabilities": {}
- }
- },
- {
- "name": "php-redis",
- "image": "kubernetes/example-guestbook-php-redis",
- "ports": [
- {
- "hostPort": 8000,
- "containerPort": 80,
- "protocol": "TCP"
- }
- ],
- "resources": {
- "limits": {
- "cpu": "100m",
- "memory": "50000000"
- }
- },
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent",
- "securityContext": {
- "capabilities": {}
- }
- }
- ],
- "restartPolicy": {
- "always": {}
- },
- "dnsPolicy": "ClusterFirst"
- },
- "status": {
- "phase": "Pending"
- }
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/pod_template_list.json b/vendor/gems/kubeclient/test/json/pod_template_list.json
deleted file mode 100644
index 5acb2c2f83a..00000000000
--- a/vendor/gems/kubeclient/test/json/pod_template_list.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "kind": "PodTemplateList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/podtemplates",
- "resourceVersion": "672"
- },
- "items": []
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/pods_1.json b/vendor/gems/kubeclient/test/json/pods_1.json
deleted file mode 100644
index ec00bd3b5cc..00000000000
--- a/vendor/gems/kubeclient/test/json/pods_1.json
+++ /dev/null
@@ -1,265 +0,0 @@
-{
- "kind":"PodList",
- "apiVersion":"v1",
- "metadata":{
- "selfLink":"/api/v1/pods",
- "resourceVersion":"53225946",
- "continue":"eyJ2IjoibWV0YS5rOHMua"
- },
- "items":[
- {
- "metadata":{
- "name":"my-ruby-project-2-build",
- "namespace":"my-project",
- "selfLink":"/api/v1/namespaces/my-project/pods/my-ruby-project-2-build",
- "uid":"0c478b50-babb-11e8-ba7e-d094660d31fb",
- "resourceVersion":"42398462",
- "creationTimestamp":"2018-09-17T20:48:36Z",
- "deletionTimestamp":"2018-09-19T13:22:50Z",
- "deletionGracePeriodSeconds":0,
- "labels":{
- "openshift.io/build.name":"my-ruby-project-2"
- },
- "annotations":{
- "openshift.io/build.name":"my-ruby-project-2",
- "openshift.io/scc":"privileged"
- },
- "ownerReferences":[
- {
- "apiVersion":"build.openshift.io/v1",
- "kind":"Build",
- "name":"my-ruby-project-2",
- "uid":"0c450e6d-babb-11e8-ba7e-d094660d31fb",
- "controller":true
- }
- ],
- "finalizers":[
- "foregroundDeletion"
- ]
- },
- "spec":{
- "volumes":[
- {
- "name":"buildworkdir",
- "emptyDir":{
-
- }
- },
- {
- "name":"docker-socket",
- "hostPath":{
- "path":"/var/run/docker.sock",
- "type":""
- }
- },
- {
- "name":"crio-socket",
- "hostPath":{
- "path":"/var/run/crio/crio.sock",
- "type":""
- }
- },
- {
- "name":"builder-dockercfg-rjgnm-push",
- "secret":{
- "secretName":"builder-dockercfg-rjgnm",
- "defaultMode":384
- }
- },
- {
- "name":"builder-token-zkpb6",
- "secret":{
- "secretName":"builder-token-zkpb6",
- "defaultMode":420
- }
- }
- ],
- "containers":[
- {
- "name":"sti-build",
- "image":"openshift3/ose-sti-builder:v3.9.25",
- "command":[
- "openshift-sti-build"
- ]
- }
- ],
- "restartPolicy":"Never",
- "terminationGracePeriodSeconds":30,
- "dnsPolicy":"ClusterFirst",
- "nodeSelector":{
- "node-role.kubernetes.io/compute":"true"
- },
- "serviceAccountName":"builder",
- "serviceAccount":"builder",
- "nodeName":"dell-r430-20.example.com",
- "securityContext":{
-
- },
- "imagePullSecrets":[
- {
- "name":"builder-dockercfg-rjgnm"
- }
- ],
- "schedulerName":"default-scheduler"
- },
- "status":{
- "phase":"Failed",
- "conditions":[
- {
- "type":"Initialized",
- "status":"True",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-09-17T20:48:49Z"
- },
- {
- "type":"Ready",
- "status":"False",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-09-17T20:49:08Z",
- "reason":"ContainersNotReady",
- "message":"containers with unready status: [sti-build]"
- },
- {
- "type":"PodScheduled",
- "status":"True",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-09-17T20:48:36Z"
- }
- ],
- "hostIP":"10.8.96.55",
- "podIP":"10.129.0.207",
- "startTime":"2018-09-17T20:48:36Z",
- "qosClass":"BestEffort"
- }
- },
- {
- "metadata":{
- "name":"redis-1-94zxb",
- "generateName":"redis-1-",
- "namespace":"customer-logging",
- "selfLink":"/api/v1/namespaces/customer-logging/pods/redis-1-94zxb",
- "uid":"a8aea5f4-5f91-11e8-ba7e-d094660d31fb",
- "resourceVersion":"47622190",
- "creationTimestamp":"2018-05-24T20:33:03Z",
- "labels":{
- "app":"elastic-log-ripper",
- "deployment":"redis-1",
- "deploymentconfig":"redis",
- "name":"redis"
- },
- "annotations":{
- "openshift.io/deployment-config.latest-version":"1",
- "openshift.io/deployment-config.name":"redis",
- "openshift.io/deployment.name":"redis-1",
- "openshift.io/generated-by":"OpenShiftNewApp",
- "openshift.io/scc":"restricted"
- },
- "ownerReferences":[
- {
- "apiVersion":"v1",
- "kind":"ReplicationController",
- "name":"redis-1",
- "uid":"9e2e46b3-5f91-11e8-ba7e-d094660d31fb",
- "controller":true,
- "blockOwnerDeletion":true
- }
- ]
- },
- "spec":{
- "volumes":[
- {
- "name":"default-token-n2wzs",
- "secret":{
- "secretName":"default-token-n2wzs",
- "defaultMode":420
- }
- }
- ],
- "containers":[
- {
- "name":"redis",
- "image":"manageiq/redis:latest",
- "ports":[
- {
- "containerPort":6379,
- "protocol":"TCP"
- }
- ],
- "resources":{
-
- },
- "volumeMounts":[
- {
- "name":"default-token-n2wzs",
- "readOnly":true,
- "mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"
- }
- ],
- "terminationMessagePath":"/dev/termination-log",
- "terminationMessagePolicy":"File",
- "imagePullPolicy":"Always",
- "securityContext":{
- "capabilities":{
- "drop":[
- "KILL",
- "MKNOD",
- "SETGID",
- "SETUID"
- ]
- },
- "runAsUser":1000260000
- }
- }
- ],
- "restartPolicy":"Always",
- "terminationGracePeriodSeconds":30,
- "dnsPolicy":"ClusterFirst",
- "nodeSelector":{
- "node-role.kubernetes.io/compute":"true"
- },
- "serviceAccountName":"default",
- "serviceAccount":"default",
- "nodeName":"dell-r430-20.example.com",
- "securityContext":{
- "seLinuxOptions":{
- "level":"s0:c16,c10"
- },
- "fsGroup":1000260000
- },
- "imagePullSecrets":[
- {
- "name":"default-dockercfg-ck286"
- }
- ],
- "schedulerName":"default-scheduler"
- },
- "status":{
- "phase":"Running",
- "conditions":[
- {
- "type":"Initialized",
- "status":"True",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-05-24T20:33:04Z"
- },
- {
- "type":"Ready",
- "status":"True",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-09-18T12:06:18Z"
- },
- {
- "type":"PodScheduled",
- "status":"True",
- "lastProbeTime":null,
- "lastTransitionTime":"2018-05-24T20:33:03Z"
- }
- ],
- "hostIP":"10.8.96.55",
- "podIP":"10.129.0.222",
- "startTime":"2018-05-24T20:33:04Z",
- "qosClass":"BestEffort"
- }
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/pods_2.json b/vendor/gems/kubeclient/test/json/pods_2.json
deleted file mode 100644
index fd6085bc5de..00000000000
--- a/vendor/gems/kubeclient/test/json/pods_2.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "kind":"PodList",
- "apiVersion":"v1",
- "metadata":{
- "selfLink":"/api/v1/pods",
- "resourceVersion":"53226147"
- },
- "items":[
- {
- "metadata":{
- "name":"topological-inventory-persister-9-hznds",
- "generateName":"topological-inventory-persister-9-",
- "namespace":"topological-inventory-ci",
- "selfLink":"/api/v1/namespaces/topological-inventory-ci/pods/topological-inventory-persister-9-hznds",
- "uid":"0c114dde-d865-11e8-ba7e-d094660d31fb",
- "resourceVersion":"51987342",
- "creationTimestamp":"2018-10-25T14:48:34Z",
- "labels":{
- "name":"topological-inventory-persister"
- }
- },
- "spec":{
- "volumes":[
- {
- "name":"default-token-5pdjl",
- "secret":{
- "secretName":"default-token-5pdjl",
- "defaultMode":420
- }
- }
- ],
- "containers":[
- {
- "name":"topological-inventory-persister",
- "image":"docker-registry.default.svc:5000/topological-inventory-ci/topological-inventory-persister@sha256:0f654ea09e749019cf3bcc4b8ee43b8dd813fcbf487843b917cf190213741927",
- "resources":{
- }
- }
- ],
- "restartPolicy":"Always",
- "terminationGracePeriodSeconds":30,
- "dnsPolicy":"ClusterFirst",
- "nodeSelector":{
- "node-role.kubernetes.io/compute":"true"
- },
- "serviceAccountName":"default",
- "serviceAccount":"default",
- "nodeName":"dell-r430-20.example.com",
- "schedulerName":"default-scheduler"
- },
- "status":{
- "phase":"Running",
- "hostIP":"10.8.96.55",
- "podIP":"10.129.1.108",
- "startTime":"2018-10-25T14:48:34Z",
- "qosClass":"BestEffort"
- }
- },
- {
- "metadata":{
- "name":"topological-inventory-persister-9-vzr6h",
- "generateName":"topological-inventory-persister-9-",
- "namespace":"topological-inventory-ci",
- "selfLink":"/api/v1/namespaces/topological-inventory-ci/pods/topological-inventory-persister-9-vzr6h",
- "uid":"3065d8ce-d86a-11e8-ba7e-d094660d31fb",
- "resourceVersion":"51996115",
- "creationTimestamp":"2018-10-25T15:25:22Z",
- "labels":{
- "name":"topological-inventory-persister"
- }
- },
- "spec":{
- "volumes":null,
- "containers":[
- {
- "name":"topological-inventory-persister",
- "image":"docker-registry.default.svc:5000/topological-inventory-ci/topological-inventory-persister@sha256:0f654ea09e749019cf3bcc4b8ee43b8dd813fcbf487843b917cf190213741927",
- "resources":{
- }
- }
- ],
- "restartPolicy":"Always",
- "terminationGracePeriodSeconds":30,
- "dnsPolicy":"ClusterFirst",
- "nodeSelector":{
- "node-role.kubernetes.io/compute":"true"
- },
- "serviceAccountName":"default",
- "serviceAccount":"default",
- "nodeName":"dell-r430-20.example.com",
- "schedulerName":"default-scheduler"
- },
- "status":{
- "phase":"Running",
- "hostIP":"10.8.96.55",
- "podIP":"10.129.1.168",
- "startTime":"2018-10-25T15:25:22Z",
- "qosClass":"BestEffort"
- }
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/pods_410.json b/vendor/gems/kubeclient/test/json/pods_410.json
deleted file mode 100644
index eb1a31937b7..00000000000
--- a/vendor/gems/kubeclient/test/json/pods_410.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "kind":"Status",
- "apiVersion":"v1",
- "metadata":{},
- "status":"Failure",
- "message":"The provided from parameter is too old to display a consistent list result. You must start a new list without the from.",
- "reason":"Expired",
- "code":410
-}
diff --git a/vendor/gems/kubeclient/test/json/processed_template.json b/vendor/gems/kubeclient/test/json/processed_template.json
deleted file mode 100644
index 66c6e32ea70..00000000000
--- a/vendor/gems/kubeclient/test/json/processed_template.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "kind": "Template",
- "apiVersion": "v1",
- "metadata": {
- "name": "my-templtae",
- "namespace": "default",
- "selfLink": "/oapi/v1/namespaces/default/processedtemplates/my-templtae",
- "uid": "2240c61c-8f70-11e5-a806-001a4a231290",
- "resourceVersion": "1399",
- "creationTimestamp": "2015-11-20T10:19:07Z"
- },
- "objects": [
- {
- "apiVersion": "v1",
- "kind": "Service",
- "metadata": {
- "name": "test/my-service"
- }
- }
- ],
- "parameters": [
- {
- "name": "NAME_PREFIX",
- "value": "test/"
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/replication_controller.json b/vendor/gems/kubeclient/test/json/replication_controller.json
deleted file mode 100644
index 26ac7a9a39e..00000000000
--- a/vendor/gems/kubeclient/test/json/replication_controller.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "kind": "ReplicationController",
- "apiVersion": "v1",
- "metadata": {
- "name": "guestbook-controller",
- "namespace": "default",
- "selfLink": "/api/v1/replicationcontrollers/guestbook-controller?namespace=default",
- "uid": "c71aa4c0-a240-11e4-a265-3c970e4a436a",
- "resourceVersion": "8",
- "creationTimestamp": "2015-01-22T16:13:02+02:00",
- "labels": {
- "name": "guestbook"
- }
- },
- "spec": {
- "replicas": 3,
- "selector": {
- "name": "guestbook"
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "name": "guestbook"
- }
- },
- "spec": {
- "volumes": null,
- "containers": [
- {
- "name": "guestbook",
- "image": "kubernetes/guestbook",
- "ports": [
- {
- "name": "http-server",
- "containerPort": 3000,
- "protocol": "TCP"
- }
- ],
- "memory": "0",
- "cpu": "0m",
- "imagePullPolicy": ""
- }
- ],
- "restartPolicy": {
- "always": {
-
- }
- },
- "dnsPolicy": "ClusterFirst"
- }
- }
- },
- "status": {
- "replicas": 3
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/replication_controller_list.json b/vendor/gems/kubeclient/test/json/replication_controller_list.json
deleted file mode 100644
index b7f2f7bd521..00000000000
--- a/vendor/gems/kubeclient/test/json/replication_controller_list.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "kind": "ReplicationControllerList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces/default/replicationcontrollers",
- "resourceVersion": "1636"
- },
- "items": [
- {
- "metadata": {
- "name": "redis-master-controller",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/replicationcontrollers/redis-master-controller?namespace=default",
- "uid": "108eb547-cefa-11e4-ac24-3c970e4a436a",
- "resourceVersion": "1631",
- "creationTimestamp": "2015-03-20T14:10:14+02:00",
- "labels": {
- "name": "redis-master"
- }
- },
- "spec": {
- "replicas": 1,
- "selector": {
- "name": "redis-master"
- },
- "template": {
- "metadata": {
- "creationTimestamp": null,
- "labels": {
- "app": "redis",
- "name": "redis-master"
- }
- },
- "spec": {
- "volumes": null,
- "containers": [
- {
- "name": "redis-master",
- "image": "dockerfile/redis",
- "ports": [
- {
- "containerPort": 6379,
- "protocol": "TCP"
- }
- ],
- "resources": {},
- "terminationMessagePath": "/dev/termination-log",
- "imagePullPolicy": "IfNotPresent",
- "securityContext": {
- "capabilities": {}
- }
- }
- ],
- "restartPolicy": {
- "always": {}
- },
- "dnsPolicy": "ClusterFirst"
- }
- }
- },
- "status": {
- "replicas": 1
- }
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/resource_quota.json b/vendor/gems/kubeclient/test/json/resource_quota.json
deleted file mode 100644
index 75b40391d68..00000000000
--- a/vendor/gems/kubeclient/test/json/resource_quota.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "kind": "ResourceQuota",
- "apiVersion": "v1",
- "metadata": {
- "name": "quota",
- "namespace": "quota-example",
- "selfLink": "/api/v1/namespaces/quota-example/resourcequotas/quota",
- "uid": "ab9f24a4-3c43-11e5-8214-0aaeec44370e",
- "resourceVersion": "12919",
- "creationTimestamp": "2015-08-06T14:01:44Z"
- },
- "spec": {
- "hard": {
- "cpu": "20",
- "memory": "1Gi",
- "persistentvolumeclaims": "10",
- "pods": "10",
- "replicationcontrollers": "20",
- "resourcequotas": "1",
- "secrets": "10",
- "services": "5"
- }
- },
- "status": {
- "hard": {
- "cpu": "20",
- "memory": "1Gi",
- "persistentvolumeclaims": "10",
- "pods": "10",
- "replicationcontrollers": "20",
- "resourcequotas": "1",
- "secrets": "10",
- "services": "5"
- },
- "used": {
- "cpu": "0",
- "memory": "0",
- "persistentvolumeclaims": "0",
- "pods": "0",
- "replicationcontrollers": "1",
- "resourcequotas": "1",
- "secrets": "9",
- "services": "0"
- }
- }
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/resource_quota_list.json b/vendor/gems/kubeclient/test/json/resource_quota_list.json
deleted file mode 100644
index 371f3feb649..00000000000
--- a/vendor/gems/kubeclient/test/json/resource_quota_list.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "kind": "ResourceQuotaList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/namespaces/quota-example/resourcequotas/",
- "resourceVersion": "102452"
- },
- "items": [
- {
- "metadata": {
- "name": "quota",
- "namespace": "quota-example",
- "selfLink": "/api/v1/namespaces/quota-example/resourcequotas/quota",
- "uid": "ab9f24a4-3c43-11e5-8214-0aaeec44370e",
- "resourceVersion": "12919",
- "creationTimestamp": "2015-08-06T14:01:44Z"
- },
- "spec": {
- "hard": {
- "cpu": "20",
- "memory": "1Gi",
- "persistentvolumeclaims": "10",
- "pods": "10",
- "replicationcontrollers": "20",
- "resourcequotas": "1",
- "secrets": "10",
- "services": "5"
- }
- },
- "status": {
- "hard": {
- "cpu": "20",
- "memory": "1Gi",
- "persistentvolumeclaims": "10",
- "pods": "10",
- "replicationcontrollers": "20",
- "resourcequotas": "1",
- "secrets": "10",
- "services": "5"
- },
- "used": {
- "cpu": "0",
- "memory": "0",
- "persistentvolumeclaims": "0",
- "pods": "0",
- "replicationcontrollers": "1",
- "resourcequotas": "1",
- "secrets": "9",
- "services": "0"
- }
- }
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/secret_list.json b/vendor/gems/kubeclient/test/json/secret_list.json
deleted file mode 100644
index bfd7661b390..00000000000
--- a/vendor/gems/kubeclient/test/json/secret_list.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "kind": "SecretList",
- "apiVersion":"v1",
- "metadata":{
- "selfLink":"/api/v1/secrets",
- "resourceVersion":"256788"
- },
- "items": [
- {
- "metadata": {
- "name":"default-token-my2pi",
- "namespace":"default",
- "selfLink":"/api/v1/namespaces/default/secrets/default-token-my2pi",
- "uid":"07b60654-2a65-11e5-a483-0e840567604d",
- "resourceVersion":"11",
- "creationTimestamp":"2015-07-14T20:15:11Z",
- "annotations": {
- "kubernetes.io/service-account.name":"default",
- "kubernetes.io/service-account.uid":"07b350a0-2a65-11e5-a483-0e840567604d"
- }
- },
- "data":{
- "ca.crt":"Y2F0J3MgYXJlIGF3ZXNvbWUK",
- "token":"Y2F0J3MgYXJlIGF3ZXNvbWUK"
- },
- "type":"kubernetes.io/service-account-token"
- },
- {
- "metadata": {
- "name": "test-secret",
- "namespace": "dev",
- "selfLink": "/api/v1/namespaces/dev/secrets/test-secret",
- "uid": "4e38a198-2bcb-11e5-a483-0e840567604d",
- "resourceVersion": "245569",
- "creationTimestamp": "2015-07-16T14:59:49Z"
- },
- "data": {
- "super-secret": "Y2F0J3MgYXJlIGF3ZXNvbWUK"
- },
- "type": "Opaque"
- }
- ]
-}
-
diff --git a/vendor/gems/kubeclient/test/json/security.openshift.io_api_resource_list.json b/vendor/gems/kubeclient/test/json/security.openshift.io_api_resource_list.json
deleted file mode 100644
index 18e2021cff5..00000000000
--- a/vendor/gems/kubeclient/test/json/security.openshift.io_api_resource_list.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "kind": "APIResourceList",
- "apiVersion": "v1",
- "groupVersion": "security.openshift.io/v1",
- "resources": [
- {
- "name": "podsecuritypolicyreviews",
- "singularName": "",
- "namespaced": true,
- "kind": "PodSecurityPolicyReview",
- "verbs": [
- "create"
- ]
- },
- {
- "name": "podsecuritypolicyselfsubjectreviews",
- "singularName": "",
- "namespaced": true,
- "kind": "PodSecurityPolicySelfSubjectReview",
- "verbs": [
- "create"
- ]
- },
- {
- "name": "podsecuritypolicysubjectreviews",
- "singularName": "",
- "namespaced": true,
- "kind": "PodSecurityPolicySubjectReview",
- "verbs": [
- "create"
- ]
- },
- {
- "name": "rangeallocations",
- "singularName": "",
- "namespaced": false,
- "kind": "RangeAllocation",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ]
- },
- {
- "name": "securitycontextconstraints",
- "singularName": "",
- "namespaced": false,
- "kind": "SecurityContextConstraints",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ],
- "shortNames": [
- "scc"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/security_context_constraint_list.json b/vendor/gems/kubeclient/test/json/security_context_constraint_list.json
deleted file mode 100644
index 1e9d4c474a7..00000000000
--- a/vendor/gems/kubeclient/test/json/security_context_constraint_list.json
+++ /dev/null
@@ -1,375 +0,0 @@
-{
- "kind": "SecurityContextConstraintsList",
- "apiVersion": "security.openshift.io/v1",
- "metadata": {
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints",
- "resourceVersion": "5751"
- },
- "items": [
- {
- "metadata": {
- "name": "anyuid",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/anyuid",
- "uid": "12ba8540-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "71",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "anyuid provides all features of the restricted SCC but allows users to run with any UID and any GID."
- }
- },
- "priority": 10,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "MKNOD"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": false,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": false,
- "allowHostPorts": false,
- "allowHostPID": false,
- "allowHostIPC": false,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "RunAsAny"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "RunAsAny"
- },
- "readOnlyRootFilesystem": false,
- "users": [],
- "groups": [
- "system:cluster-admins"
- ]
- },
- {
- "metadata": {
- "name": "hostaccess",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/hostaccess",
- "uid": "12b5b3a2-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "69",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "hostaccess allows access to all host namespaces but still requires pods to be run with a UID and SELinux context that are allocated to the namespace. WARNING: this SCC allows host access to namespaces, file systems, and PIDS. It should only be used by trusted pods. Grant with caution."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "KILL",
- "MKNOD",
- "SETUID",
- "SETGID"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": true,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "hostPath",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": true,
- "allowHostPorts": true,
- "allowHostPID": true,
- "allowHostIPC": true,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "MustRunAsRange"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "MustRunAs"
- },
- "readOnlyRootFilesystem": false,
- "users": [],
- "groups": []
- },
- {
- "metadata": {
- "name": "hostmount-anyuid",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/hostmount-anyuid",
- "uid": "12b512c0-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "68",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "hostmount-anyuid provides all the features of the restricted SCC but allows host mounts and any UID by a pod. This is primarily used by the persistent volume recycler. WARNING: this SCC allows host file system access as any UID, including UID 0. Grant with caution."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "MKNOD"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": true,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "hostPath",
- "nfs",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": false,
- "allowHostPorts": false,
- "allowHostPID": false,
- "allowHostIPC": false,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "RunAsAny"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "RunAsAny"
- },
- "readOnlyRootFilesystem": false,
- "users": [
- "system:serviceaccount:openshift-infra:pv-recycler-controller"
- ],
- "groups": []
- },
- {
- "metadata": {
- "name": "hostnetwork",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/hostnetwork",
- "uid": "12bb0984-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "72",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "hostnetwork allows using host networking and host ports but still requires pods to be run with a UID and SELinux context that are allocated to the namespace."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "KILL",
- "MKNOD",
- "SETUID",
- "SETGID"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": false,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": true,
- "allowHostPorts": true,
- "allowHostPID": false,
- "allowHostIPC": false,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "MustRunAsRange"
- },
- "supplementalGroups": {
- "type": "MustRunAs"
- },
- "fsGroup": {
- "type": "MustRunAs"
- },
- "readOnlyRootFilesystem": false,
- "users": [],
- "groups": []
- },
- {
- "metadata": {
- "name": "nonroot",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/nonroot",
- "uid": "12b37c59-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "67",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "nonroot provides all features of the restricted SCC but allows users to run with any non-root UID. The user must specify the UID or it must be specified on the by the manifest of the container runtime."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "KILL",
- "MKNOD",
- "SETUID",
- "SETGID"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": false,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": false,
- "allowHostPorts": false,
- "allowHostPID": false,
- "allowHostIPC": false,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "MustRunAsNonRoot"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "RunAsAny"
- },
- "readOnlyRootFilesystem": false,
- "users": [],
- "groups": []
- },
- {
- "metadata": {
- "name": "privileged",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/privileged",
- "uid": "12b18f4a-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "300",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "privileged allows access to all privileged and host features and the ability to run as any user, any group, any fsGroup, and with any SELinux context. WARNING: this is the most relaxed SCC and should be used only for cluster administration. Grant with caution."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": true,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": null,
- "allowedCapabilities": [
- "*"
- ],
- "allowHostDirVolumePlugin": true,
- "volumes": [
- "*"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": true,
- "allowHostPorts": true,
- "allowHostPID": true,
- "allowHostIPC": true,
- "seLinuxContext": {
- "type": "RunAsAny"
- },
- "runAsUser": {
- "type": "RunAsAny"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "RunAsAny"
- },
- "readOnlyRootFilesystem": false,
- "users": [
- "system:admin",
- "system:serviceaccount:openshift-infra:build-controller",
- "system:serviceaccount:default:pvinstaller",
- "system:serviceaccount:default:registry",
- "system:serviceaccount:default:router"
- ],
- "groups": [
- "system:cluster-admins",
- "system:nodes",
- "system:masters"
- ],
- "seccompProfiles": [
- "*"
- ]
- },
- {
- "metadata": {
- "name": "restricted",
- "selfLink": "/apis/security.openshift.io/v1/securitycontextconstraints/restricted",
- "uid": "12b9a842-ef00-11e8-b4c0-68f728fac3ab",
- "resourceVersion": "70",
- "creationTimestamp": "2018-11-23T09:13:42Z",
- "annotations": {
- "kubernetes.io/description": "restricted denies access to all host features and requires pods to be run with a UID, and SELinux context that are allocated to the namespace. This is the most restrictive SCC and it is used by default for authenticated users."
- }
- },
- "priority": null,
- "allowPrivilegedContainer": false,
- "defaultAddCapabilities": null,
- "requiredDropCapabilities": [
- "KILL",
- "MKNOD",
- "SETUID",
- "SETGID"
- ],
- "allowedCapabilities": null,
- "allowHostDirVolumePlugin": false,
- "volumes": [
- "configMap",
- "downwardAPI",
- "emptyDir",
- "persistentVolumeClaim",
- "projected",
- "secret"
- ],
- "allowedFlexVolumes": null,
- "allowHostNetwork": false,
- "allowHostPorts": false,
- "allowHostPID": false,
- "allowHostIPC": false,
- "seLinuxContext": {
- "type": "MustRunAs"
- },
- "runAsUser": {
- "type": "MustRunAsRange"
- },
- "supplementalGroups": {
- "type": "RunAsAny"
- },
- "fsGroup": {
- "type": "MustRunAs"
- },
- "readOnlyRootFilesystem": false,
- "users": [],
- "groups": [
- "system:authenticated"
- ]
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/service.json b/vendor/gems/kubeclient/test/json/service.json
deleted file mode 100644
index 6e2e5c79ce1..00000000000
--- a/vendor/gems/kubeclient/test/json/service.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "kind": "Service",
- "apiVersion": "v1",
- "metadata": {
- "name": "redis-slave",
- "namespace": "development",
- "selfLink": "/api/v1/namespaces/development/services/redis-slave",
- "uid": "bdb80a8f-db93-11e4-b293-f8b156af4ae1",
- "resourceVersion": "2815",
- "creationTimestamp": "2015-04-05T13:00:31Z",
- "labels": {
- "name": "redis",
- "role": "slave"
- }
- },
- "spec": {
- "ports": [
- {
- "name": "",
- "protocol": "TCP",
- "port": 6379,
- "targetPort": "redis-server"
- }
- ],
- "selector": {
- "name": "redis",
- "role": "slave"
- },
- "clusterIP": "10.0.0.140",
- "sessionAffinity": "None"
- },
- "status": {}
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/service_account.json b/vendor/gems/kubeclient/test/json/service_account.json
deleted file mode 100644
index 632d429260d..00000000000
--- a/vendor/gems/kubeclient/test/json/service_account.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "kind": "ServiceAccount",
- "apiVersion": "v1",
- "metadata": {
- "name": "default",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/serviceaccounts/default",
- "uid": "d3d773f4-6bf0-11e5-843a-525400f8b93e",
- "resourceVersion": "94",
- "creationTimestamp": "2015-10-06T06:09:39Z"
- },
- "secrets": [
- {
- "name": "default-token-6s23q"
- },
- {
- "name": "default-dockercfg-62tf3"
- }
- ],
- "imagePullSecrets": [
- {
- "name": "default-dockercfg-62tf3"
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/service_account_list.json b/vendor/gems/kubeclient/test/json/service_account_list.json
deleted file mode 100644
index 934e729ed08..00000000000
--- a/vendor/gems/kubeclient/test/json/service_account_list.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "kind": "List",
- "apiVersion": "v1",
- "metadata": {},
- "items": [
- {
- "kind": "ServiceAccount",
- "apiVersion": "v1",
- "metadata": {
- "name": "builder",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/serviceaccounts/builder",
- "uid": "d40655f6-6bf0-11e5-843a-525400f8b93e",
- "resourceVersion": "133",
- "creationTimestamp": "2015-10-06T06:09:39Z"
- },
- "secrets": [
- {
- "name": "builder-token-5v6z2"
- },
- {
- "name": "builder-dockercfg-qe2re"
- }
- ],
- "imagePullSecrets": [
- {
- "name": "builder-dockercfg-qe2re"
- }
- ]
- },
- {
- "kind": "ServiceAccount",
- "apiVersion": "v1",
- "metadata": {
- "name": "default",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/serviceaccounts/default",
- "uid": "d3d773f4-6bf0-11e5-843a-525400f8b93e",
- "resourceVersion": "94",
- "creationTimestamp": "2015-10-06T06:09:39Z"
- },
- "secrets": [
- {
- "name": "default-token-6s23q"
- },
- {
- "name": "default-dockercfg-62tf3"
- }
- ],
- "imagePullSecrets": [
- {
- "name": "default-dockercfg-62tf3"
- }
- ]
- },
- {
- "kind": "ServiceAccount",
- "apiVersion": "v1",
- "metadata": {
- "name": "deployer",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/serviceaccounts/deployer",
- "uid": "d41d385e-6bf0-11e5-843a-525400f8b93e",
- "resourceVersion": "137",
- "creationTimestamp": "2015-10-06T06:09:39Z"
- },
- "secrets": [
- {
- "name": "deployer-token-h3i57"
- },
- {
- "name": "deployer-dockercfg-qgjjj"
- }
- ],
- "imagePullSecrets": [
- {
- "name": "deployer-dockercfg-qgjjj"
- }
- ]
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/service_illegal_json_404.json b/vendor/gems/kubeclient/test/json/service_illegal_json_404.json
deleted file mode 100644
index faa82b3aa87..00000000000
--- a/vendor/gems/kubeclient/test/json/service_illegal_json_404.json
+++ /dev/null
@@ -1 +0,0 @@
-404: Page Not Found \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/service_json_patch.json b/vendor/gems/kubeclient/test/json/service_json_patch.json
deleted file mode 100644
index f960242ba4d..00000000000
--- a/vendor/gems/kubeclient/test/json/service_json_patch.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "status" : {},
- "kind" : "Service",
- "apiVersion" : "v1",
- "spec" : {
- "ports" : [
- {
- "targetPort" : 80,
- "nodePort" : 0,
- "port" : 80,
- "protocol" : "TCP"
- }
- ],
- "clusterIP" : "1.2.3.4",
- "type": "LoadBalancer"
- },
- "metadata" : {
- "name" : "my-service",
- "creationTimestamp" : null,
- "namespace" : "development",
- "resourceVersion" : "2",
- "annotations" : {
- "key" : "value"
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/service_list.json b/vendor/gems/kubeclient/test/json/service_list.json
deleted file mode 100644
index f0f97a12c4e..00000000000
--- a/vendor/gems/kubeclient/test/json/service_list.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "kind": "ServiceList",
- "apiVersion": "v1",
- "metadata": {
- "selfLink": "/api/v1/services",
- "resourceVersion": "36727"
- },
- "items": [
- {
- "metadata": {
- "name": "kubernetes",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/services/kubernetes",
- "uid": "b6606490-db86-11e4-b293-f8b156af4ae1",
- "resourceVersion": "6",
- "creationTimestamp": "2015-04-05T11:27:15Z",
- "labels": {
- "component": "apiserver",
- "provider": "kubernetes"
- }
- },
- "spec": {
- "ports": [
- {
- "name": "",
- "protocol": "TCP",
- "port": 443,
- "targetPort": 443
- }
- ],
- "selector": null,
- "clusterIP": "10.0.0.2",
- "sessionAffinity": "None"
- },
- "status": {}
- },
- {
- "metadata": {
- "name": "kubernetes-ro",
- "namespace": "default",
- "selfLink": "/api/v1/namespaces/default/services/kubernetes-ro",
- "uid": "b6606694-db86-11e4-b293-f8b156af4ae1",
- "resourceVersion": "5",
- "creationTimestamp": "2015-04-05T11:27:15Z",
- "labels": {
- "component": "apiserver",
- "provider": "kubernetes"
- }
- },
- "spec": {
- "ports": [
- {
- "name": "",
- "protocol": "TCP",
- "port": 80,
- "targetPort": 80
- }
- ],
- "selector": null,
- "clusterIP": "10.0.0.1",
- "sessionAffinity": "None"
- },
- "status": {}
- },
- {
- "metadata": {
- "name": "redis-slave",
- "namespace": "development",
- "selfLink": "/api/v1/namespaces/development/services/redis-slave",
- "uid": "bdb80a8f-db93-11e4-b293-f8b156af4ae1",
- "resourceVersion": "2815",
- "creationTimestamp": "2015-04-05T13:00:31Z",
- "labels": {
- "name": "redis",
- "role": "slave"
- }
- },
- "spec": {
- "ports": [
- {
- "name": "",
- "protocol": "TCP",
- "port": 6379,
- "targetPort": "redis-server"
- }
- ],
- "selector": {
- "name": "redis",
- "role": "slave"
- },
- "clusterIP": "10.0.0.140",
- "sessionAffinity": "None"
- },
- "status": {}
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/service_merge_patch.json b/vendor/gems/kubeclient/test/json/service_merge_patch.json
deleted file mode 100644
index 5a9cf7dd384..00000000000
--- a/vendor/gems/kubeclient/test/json/service_merge_patch.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "status" : {},
- "kind" : "Service",
- "apiVersion" : "v1",
- "spec" : {
- "ports" : [
- {
- "targetPort" : 80,
- "nodePort" : 0,
- "port" : 80,
- "protocol" : "TCP"
- }
- ],
- "clusterIP" : "1.2.3.4",
- "type": "NodePort"
- },
- "metadata" : {
- "name" : "my-service",
- "creationTimestamp" : null,
- "namespace" : "development",
- "resourceVersion" : "2",
- "annotations" : {
- "key" : "value"
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/service_patch.json b/vendor/gems/kubeclient/test/json/service_patch.json
deleted file mode 100644
index d6c9c29e691..00000000000
--- a/vendor/gems/kubeclient/test/json/service_patch.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "status" : {},
- "kind" : "Service",
- "apiVersion" : "v1",
- "spec" : {
- "ports" : [
- {
- "targetPort" : 80,
- "nodePort" : 0,
- "port" : 80,
- "protocol" : "TCP"
- }
- ],
- "clusterIP" : "1.2.3.4"
- },
- "metadata" : {
- "name" : "my_service",
- "creationTimestamp" : null,
- "namespace" : "development",
- "resourceVersion" : "2",
- "annotations" : {
- "key" : "value"
- }
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/service_update.json b/vendor/gems/kubeclient/test/json/service_update.json
deleted file mode 100644
index 1053d750e60..00000000000
--- a/vendor/gems/kubeclient/test/json/service_update.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "status" : {},
- "kind" : "Service",
- "apiVersion" : "v1",
- "spec" : {
- "ports" : [
- {
- "targetPort" : 80,
- "nodePort" : 0,
- "port" : 80,
- "protocol" : "TCP"
- }
- ],
- "clusterIP" : "1.2.3.4"
- },
- "metadata" : {
- "name" : "my_service",
- "creationTimestamp" : null,
- "namespace" : "default",
- "resourceVersion" : "2"
- }
-}
diff --git a/vendor/gems/kubeclient/test/json/template.json b/vendor/gems/kubeclient/test/json/template.json
deleted file mode 100644
index 85d8bad748e..00000000000
--- a/vendor/gems/kubeclient/test/json/template.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "apiVersion": "template.openshift.io/v1",
- "kind": "Template",
- "metadata": {
- "creationTimestamp": "2018-12-17T16:11:36Z",
- "name": "my-template",
- "namespace": "default",
- "resourceVersion": "21954",
- "selfLink": "/apis/template.openshift.io/v1/namespaces/default/templates/my-template",
- "uid": "6e03e3e6-0216-11e9-b1e0-68f728fac3ab"
- },
- "objects": [
- {
- "apiVersion": "v1",
- "kind": "Service",
- "metadata": {
- "name": "${NAME_PREFIX}my-service"
- }
- }
- ],
- "parameters": [
- {
- "description": "Prefix for names",
- "name": "NAME_PREFIX"
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/template.openshift.io_api_resource_list.json b/vendor/gems/kubeclient/test/json/template.openshift.io_api_resource_list.json
deleted file mode 100644
index 1ba147f795d..00000000000
--- a/vendor/gems/kubeclient/test/json/template.openshift.io_api_resource_list.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "kind": "APIResourceList",
- "apiVersion": "v1",
- "groupVersion": "template.openshift.io/v1",
- "resources": [
- {
- "name": "brokertemplateinstances",
- "singularName": "",
- "namespaced": false,
- "kind": "BrokerTemplateInstance",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ]
- },
- {
- "name": "processedtemplates",
- "singularName": "",
- "namespaced": true,
- "kind": "Template",
- "verbs": [
- "create"
- ]
- },
- {
- "name": "templateinstances",
- "singularName": "",
- "namespaced": true,
- "kind": "TemplateInstance",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ]
- },
- {
- "name": "templateinstances/status",
- "singularName": "",
- "namespaced": true,
- "kind": "TemplateInstance",
- "verbs": [
- "get",
- "patch",
- "update"
- ]
- },
- {
- "name": "templates",
- "singularName": "",
- "namespaced": true,
- "kind": "Template",
- "verbs": [
- "create",
- "delete",
- "deletecollection",
- "get",
- "list",
- "patch",
- "update",
- "watch"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/vendor/gems/kubeclient/test/json/template_list.json b/vendor/gems/kubeclient/test/json/template_list.json
deleted file mode 100644
index a0f84ad3e01..00000000000
--- a/vendor/gems/kubeclient/test/json/template_list.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "kind": "TemplateList",
- "apiVersion": "template.openshift.io/v1",
- "metadata": {
- "selfLink": "/apis/template.openshift.io/v1/namespaces/default/templates",
- "resourceVersion": "22758"
- },
- "items": [
- {
- "metadata": {
- "name": "my-template",
- "namespace": "default",
- "selfLink": "/apis/template.openshift.io/v1/namespaces/default/templates/my-template",
- "uid": "6e03e3e6-0216-11e9-b1e0-68f728fac3ab",
- "resourceVersion": "21954",
- "creationTimestamp": "2018-12-17T16:11:36Z"
- },
- "objects": [
- {
- "apiVersion": "v1",
- "kind": "Service",
- "metadata": {
- "name": "${NAME_PREFIX}my-service"
- }
- }
- ],
- "parameters": [
- {
- "name": "NAME_PREFIX",
- "description": "Prefix for names"
- }
- ]
- }
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/versions_list.json b/vendor/gems/kubeclient/test/json/versions_list.json
deleted file mode 100644
index 372e101b6ab..00000000000
--- a/vendor/gems/kubeclient/test/json/versions_list.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "versions": [
- "v1beta3",
- "v1"
- ]
-}
diff --git a/vendor/gems/kubeclient/test/json/watch_stream.json b/vendor/gems/kubeclient/test/json/watch_stream.json
deleted file mode 100644
index aa8f03dd078..00000000000
--- a/vendor/gems/kubeclient/test/json/watch_stream.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"php","namespace":"default","selfLink":"/api/v1/pods/php","uid":"e75f2c07-b047-11e4-89e4-525400c903c1","resourceVersion":"1389","creationTimestamp":"2015-02-09T05:39:19-05:00","labels":{"name":"foo"}},"spec":{"volumes":null,"containers":[{"name":"nginx","image":"dockerfile/nginx","ports":[{"hostPort":9090,"containerPort":80,"protocol":"TCP"}],"resources":{},"livenessProbe":{"httpGet":{"path":"/index.html","port":"9090"},"initialDelaySeconds":30},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent","securityContext":{"capabilities":{}}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"},"status":{"phase":"Pending"}}}
-{"type":"MODIFIED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"php","namespace":"default","selfLink":"/api/v1/pods/php","uid":"e75f2c07-b047-11e4-89e4-525400c903c1","resourceVersion":"1390","creationTimestamp":"2015-02-09T05:39:19-05:00","labels":{"name":"foo"}},"spec":{"volumes":null,"containers":[{"name":"nginx","image":"dockerfile/nginx","ports":[{"hostPort":9090,"containerPort":80,"protocol":"TCP"}],"resources":{},"livenessProbe":{"httpGet":{"path":"/index.html","port":"9090"},"initialDelaySeconds":30},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent","securityContext":{"capabilities":{}}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"},"status":{"phase":"Pending","host":"127.0.0.1"}}}
-{"type":"DELETED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"php","namespace":"default","selfLink":"/api/v1/pods/php","uid":"e75f2c07-b047-11e4-89e4-525400c903c1","resourceVersion":"1398","creationTimestamp":"2015-02-09T05:39:19-05:00","labels":{"name":"foo"}},"spec":{"volumes":null,"containers":[{"name":"nginx","image":"dockerfile/nginx","ports":[{"hostPort":9090,"containerPort":80,"protocol":"TCP"}],"resources":{},"livenessProbe":{"httpGet":{"path":"/index.html","port":"9090"},"initialDelaySeconds":30},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent","securityContext":{"capabilities":{}}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"},"status":{"phase":"Pending","host":"127.0.0.1"}}}
diff --git a/vendor/gems/kubeclient/test/test_common.rb b/vendor/gems/kubeclient/test/test_common.rb
deleted file mode 100644
index 32bf826085d..00000000000
--- a/vendor/gems/kubeclient/test/test_common.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-
-require_relative 'test_helper'
-
-# Unit tests for the common module
-class CommonTest < MiniTest::Test
- class ClientStub
- include Kubeclient::ClientMixin
- end
-
- def client
- @client ||= ClientStub.new
- end
-
- def test_underscore_entity
- %w[
- Pod pod
- Service service
- ReplicationController replication_controller
- Node node
- Event event
- Endpoint endpoint
- Namespace namespace
- Secret secret
- ResourceQuota resource_quota
- LimitRange limit_range
- PersistentVolume persistent_volume
- PersistentVolumeClaim persistent_volume_claim
- ComponentStatus component_status
- ServiceAccount service_account
- Project project
- Route route
- ClusterRoleBinding cluster_role_binding
- Build build
- BuildConfig build_config
- Image image
- ImageStream image_stream
- dogstatsd dogstatsd
- lowerCamelUPPERCase lower_camel_uppercase
- HTTPAPISpecBinding httpapispec_binding
- APIGroup apigroup
- APIGroupList apigroup_list
- APIResourceList apiresource_list
- APIService apiservice
- APIServiceList apiservice_list
- APIVersions apiversions
- OAuthAccessToken oauth_access_token
- OAuthAccessTokenList oauth_access_token_list
- OAuthAuthorizeToken oauth_authorize_token
- OAuthAuthorizeTokenList oauth_authorize_token_list
- OAuthClient oauth_client
- OAuthClientAuthorization oauth_client_authorization
- OAuthClientAuthorizationList oauth_client_authorization_list
- OAuthClientList oauth_client_list
- ].each_slice(2) do |kind, expected_underscore|
- underscore = Kubeclient::ClientMixin.underscore_entity(kind)
- assert_equal(underscore, expected_underscore)
- end
- end
-
- def test_format_datetime_with_string
- value = '2018-04-27T18:30:17.480321984Z'
- formatted = client.send(:format_datetime, value)
- assert_equal(formatted, value)
- end
-
- def test_format_datetime_with_datetime
- value = DateTime.new(2018, 4, 30, 19, 20, 33)
- formatted = client.send(:format_datetime, value)
- assert_equal(formatted, '2018-04-30T19:20:33.000000000+00:00')
- end
-
- def test_format_datetime_with_time
- value = Time.new(2018, 4, 30, 19, 20, 33, 0)
- formatted = client.send(:format_datetime, value)
- assert_equal(formatted, '2018-04-30T19:20:33.000000000+00:00')
- end
-
- def test_parse_definition_with_unconventional_names
- %w[
- PluralPolicy pluralpolicies plural_policy plural_policies
- LatinDatum latindata latin_datum latin_data
- Noseparator noseparators noseparator noseparators
- lowercase lowercases lowercase lowercases
- TestWithDash test-with-dashes test_with_dash test_with_dashes
- TestUnderscore test_underscores test_underscore test_underscores
- TestMismatch other-odd-name testmismatch otheroddname
- MixedDashMinus mixed-dash_minuses mixed_dash_minus mixed_dash_minuses
- SameUptoWordboundary sameup-toword-boundarys sameuptowordboundary sameuptowordboundarys
- ].each_slice(4) do |kind, plural, expected_single, expected_plural|
- method_names = Kubeclient::ClientMixin.parse_definition(kind, plural).method_names
- assert_equal(method_names[0], expected_single)
- assert_equal(method_names[1], expected_plural)
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_common_url_handling.rb b/vendor/gems/kubeclient/test/test_common_url_handling.rb
deleted file mode 100644
index e7798c2f489..00000000000
--- a/vendor/gems/kubeclient/test/test_common_url_handling.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-require_relative 'test_helper'
-
-# URLHandling tests
-class TestCommonUrlHandling < MiniTest::Test
- def test_no_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_with_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/api', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_with_api_path_in_uri_other_version
- client = Kubeclient::Client.new('http://localhost:8080/api', 'v2')
- rest_client = client.rest_client
- assert_equal('v2', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/api/v2', rest_client.url.to_s)
- end
-
- def test_with_api_group_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/apis/this_is_the_group', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('this_is_the_group/', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/apis/this_is_the_group/v1', rest_client.url.to_s)
- end
-
- def test_with_api_group_path_in_uri_other_version
- client = Kubeclient::Client.new('http://localhost:8080/apis/this_is_the_group', 'v2')
- rest_client = client.rest_client
- assert_equal('v2', client.instance_variable_get(:@api_version))
- assert_equal('this_is_the_group/', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/apis/this_is_the_group/v2', rest_client.url.to_s)
- end
-
- def test_with_api_path_in_uri_trailing_slash
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_with_api_path_in_api
- client = Kubeclient::Client.new('http://localhost:8080/api/but/I/want/a/hidden/k8s/api', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/api/but/I/want/a/hidden/k8s/api/v1', rest_client.url.to_s)
- end
-
- def test_with_api_group_path_in_api
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/but/I/want/a/hidden/k8s/apis/this_is_the_group',
- 'v1'
- )
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('this_is_the_group/', client.instance_variable_get(:@api_group))
- assert_equal(
- 'http://localhost:8080/api/but/I/want/a/hidden/k8s/apis/this_is_the_group/v1',
- rest_client.url.to_s
- )
- end
-
- def test_rancher_with_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/k8s/clusters/c-somerancherID/api', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/k8s/clusters/c-somerancherID/api/v1', rest_client.url.to_s)
- end
-
- def test_rancher_no_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/k8s/clusters/c-somerancherID', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/k8s/clusters/c-somerancherID/api/v1', rest_client.url.to_s)
- end
-
- def test_rancher_no_api_path_in_uri_trailing_slash
- client = Kubeclient::Client.new('http://localhost:8080/k8s/clusters/c-somerancherID/', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/k8s/clusters/c-somerancherID/api/v1', rest_client.url.to_s)
- end
-
- def test_rancher_with_api_path_in_uri_trailing_slash
- client = Kubeclient::Client.new('http://localhost:8080/k8s/clusters/c-somerancherID/api/', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/k8s/clusters/c-somerancherID/api/v1', rest_client.url.to_s)
- end
-
- def test_rancher_with_api_group_in_uri_trailing_slash
- client = Kubeclient::Client.new(
- 'http://localhost:8080/k8s/clusters/c-somerancherID/apis/this_is_the_group',
- 'v1'
- )
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('this_is_the_group/', client.instance_variable_get(:@api_group))
- assert_equal(
- 'http://localhost:8080/k8s/clusters/c-somerancherID/apis/this_is_the_group/v1',
- rest_client.url.to_s
- )
- end
-
- def test_with_openshift_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/oapi', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/oapi/v1', rest_client.url.to_s)
- end
-
- def test_arbitrary_path_with_openshift_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/foobarbaz/oapi', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/foobarbaz/oapi/v1', rest_client.url.to_s)
- end
-
- def test_with_openshift_api_path_in_uri_trailing_slash
- client = Kubeclient::Client.new('http://localhost:8080/oapi/', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/oapi/v1', rest_client.url.to_s)
- end
-
- def test_with_arbitrary_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/foobarbaz', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/foobarbaz/api/v1', rest_client.url.to_s)
- end
-
- def test_with_arbitrary_and_api_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080/foobarbaz/api', 'v1')
- rest_client = client.rest_client
- assert_equal('v1', client.instance_variable_get(:@api_version))
- assert_equal('', client.instance_variable_get(:@api_group))
- assert_equal('http://localhost:8080/foobarbaz/api/v1', rest_client.url.to_s)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_component_status.rb b/vendor/gems/kubeclient/test/test_component_status.rb
deleted file mode 100644
index 7bb4ca1ad51..00000000000
--- a/vendor/gems/kubeclient/test/test_component_status.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require_relative 'test_helper'
-
-# ComponentStatus tests
-class TestComponentStatus < MiniTest::Test
- def test_get_from_json_v3
- stub_core_api_list
- stub_request(:get, %r{/componentstatuses})
- .to_return(body: open_test_file('component_status.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- component_status = client.get_component_status('etcd-0', 'default')
-
- assert_instance_of(Kubeclient::Resource, component_status)
- assert_equal('etcd-0', component_status.metadata.name)
- assert_equal('Healthy', component_status.conditions[0].type)
- assert_equal('True', component_status.conditions[0].status)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/namespaces/default/componentstatuses/etcd-0',
- times: 1
- )
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_config.rb b/vendor/gems/kubeclient/test/test_config.rb
deleted file mode 100644
index d47827e0393..00000000000
--- a/vendor/gems/kubeclient/test/test_config.rb
+++ /dev/null
@@ -1,271 +0,0 @@
-require_relative 'test_helper'
-require 'yaml'
-require 'open3'
-
-# Testing Kubernetes client configuration
-class KubeclientConfigTest < MiniTest::Test
- def test_allinone
- config = Kubeclient::Config.read(config_file('allinone.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- check_context(config.context, ssl: true, custom_ca: true, client_cert: true)
- end
-
- def test_external
- config = Kubeclient::Config.read(config_file('external.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- check_context(config.context, ssl: true, custom_ca: true, client_cert: true)
- end
-
- def test_explicit_secure
- config = Kubeclient::Config.read(config_file('secure.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- # Same as external.kubeconfig, but with explicit `insecure-skip-tls-verify: false`
- check_context(config.context, ssl: true, custom_ca: true, client_cert: true)
- end
-
- def test_external_public_ca
- config = Kubeclient::Config.read(config_file('external-without-ca.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- # Same as external.kubeconfig, no custom CA data (cluster has a publicly trusted cert)
- check_context(config.context, ssl: true, custom_ca: false, client_cert: true)
- end
-
- def test_secure_public_ca
- config = Kubeclient::Config.read(config_file('secure-without-ca.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- # no custom CA data + explicit `insecure-skip-tls-verify: false`
- check_context(config.context, ssl: true, custom_ca: false, client_cert: true)
- end
-
- def test_insecure
- config = Kubeclient::Config.read(config_file('insecure.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- # Has explicit `insecure-skip-tls-verify: false`
- check_context(config.context, ssl: false, custom_ca: false, client_cert: true)
- end
-
- def test_insecure_custom_ca
- config = Kubeclient::Config.read(config_file('insecure-custom-ca.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- # Has explicit `insecure-skip-tls-verify: false`
- check_context(config.context, ssl: false, custom_ca: true, client_cert: true)
- end
-
- def test_allinone_nopath
- yaml = File.read(config_file('allinone.kubeconfig'))
- # A self-contained config shouldn't depend on kcfg_path.
- config = Kubeclient::Config.new(YAML.safe_load(yaml), nil)
- assert_equal(['Default'], config.contexts)
- check_context(config.context, ssl: true, custom_ca: true, client_cert: true)
- end
-
- def test_external_nopath
- yaml = File.read(config_file('external.kubeconfig'))
- # kcfg_path = nil should prevent file access
- config = Kubeclient::Config.new(YAML.safe_load(yaml), nil)
- assert_raises(StandardError) do
- config.context
- end
- end
-
- def test_external_nopath_absolute
- yaml = File.read(config_file('external.kubeconfig'))
- # kcfg_path = nil should prevent file access, even if absolute path specified
- ca_absolute_path = File.absolute_path(config_file('external-'))
- yaml = yaml.gsub('external-', ca_absolute_path)
- config = Kubeclient::Config.new(YAML.safe_load(yaml), nil)
- assert_raises(StandardError) do
- config.context
- end
- end
-
- def test_concatenated_ca
- config = Kubeclient::Config.read(config_file('concatenated-ca.kubeconfig'))
- assert_equal(['Default'], config.contexts)
- check_context(config.context, ssl: true)
- end
-
- def test_nouser
- config = Kubeclient::Config.read(config_file('nouser.kubeconfig'))
- assert_equal(['default/localhost:6443/nouser'], config.contexts)
- check_context(config.context, ssl: true, custom_ca: false, client_cert: false)
- end
-
- def test_user_token
- config = Kubeclient::Config.read(config_file('userauth.kubeconfig'))
- assert_equal(['localhost/system:admin:token', 'localhost/system:admin:userpass'],
- config.contexts)
- context = config.context('localhost/system:admin:token')
- check_context(context, ssl: true, custom_ca: false, client_cert: false)
- assert_equal('0123456789ABCDEF0123456789ABCDEF', context.auth_options[:bearer_token])
- end
-
- def test_user_password
- config = Kubeclient::Config.read(config_file('userauth.kubeconfig'))
- assert_equal(['localhost/system:admin:token', 'localhost/system:admin:userpass'],
- config.contexts)
- context = config.context('localhost/system:admin:userpass')
- check_context(context, ssl: true, custom_ca: false, client_cert: false)
- assert_equal('admin', context.auth_options[:username])
- assert_equal('pAssw0rd123', context.auth_options[:password])
- end
-
- def test_timestamps
- # Test YAML parsing doesn't crash on YAML timestamp syntax.
- Kubeclient::Config.read(config_file('timestamps.kubeconfig'))
- end
-
- def test_user_exec
- token = '0123456789ABCDEF0123456789ABCDEF'
- creds = {
- 'apiVersion': 'client.authentication.k8s.io/v1beta1',
- 'status': {
- 'token': token
- }
- }
-
- config = Kubeclient::Config.read(config_file('execauth.kubeconfig'))
- assert_equal(['localhost/system:admin:exec-search-path',
- 'localhost/system:admin:exec-relative-path',
- 'localhost/system:admin:exec-absolute-path'],
- config.contexts)
-
- # A bare command name in config means search PATH, so it's executed as bare command.
- stub_exec(%r{^example-exec-plugin$}, creds) do
- context = config.context('localhost/system:admin:exec-search-path')
- check_context(context, ssl: true, custom_ca: false, client_cert: false)
- assert_equal(token, context.auth_options[:bearer_token])
- end
-
- # A relative path is taken relative to the dir of the kubeconfig.
- stub_exec(%r{.*config/dir/example-exec-plugin$}, creds) do
- context = config.context('localhost/system:admin:exec-relative-path')
- check_context(context, ssl: true, custom_ca: false, client_cert: false)
- assert_equal(token, context.auth_options[:bearer_token])
- end
-
- # An absolute path is taken as-is.
- stub_exec(%r{^/abs/path/example-exec-plugin$}, creds) do
- context = config.context('localhost/system:admin:exec-absolute-path')
- check_context(context, ssl: true, custom_ca: false, client_cert: false)
- assert_equal(token, context.auth_options[:bearer_token])
- end
- end
-
- def test_user_exec_nopath
- yaml = File.read(config_file('execauth.kubeconfig'))
- config = Kubeclient::Config.new(YAML.safe_load(yaml), nil)
- config.contexts.each do |context_name|
- Open3.stub(:capture3, proc { flunk 'should not execute command' }) do
- assert_raises(StandardError) do
- config.context(context_name)
- end
- end
- end
- end
-
- def test_gcp_default_auth
- Kubeclient::GoogleApplicationDefaultCredentials.expects(:token).returns('token1').once
- parsed = load_yaml(config_file('gcpauth.kubeconfig'))
- config = Kubeclient::Config.new(parsed, nil)
- config.context(config.contexts.first)
- end
-
- # Each call to .context() obtains a new token, calling .auth_options doesn't change anything.
- # NOTE: this is not a guarantee, may change, just testing current behavior.
- def test_gcp_default_auth_renew
- Kubeclient::GoogleApplicationDefaultCredentials.expects(:token).returns('token1').once
- parsed = load_yaml(config_file('gcpauth.kubeconfig'))
- config = Kubeclient::Config.new(parsed, nil)
- context = config.context(config.contexts.first)
- assert_equal({ bearer_token: 'token1' }, context.auth_options)
- assert_equal({ bearer_token: 'token1' }, context.auth_options)
-
- Kubeclient::GoogleApplicationDefaultCredentials.expects(:token).returns('token2').once
- context2 = config.context(config.contexts.first)
- assert_equal({ bearer_token: 'token2' }, context2.auth_options)
- assert_equal({ bearer_token: 'token1' }, context.auth_options)
- end
-
- def test_gcp_command_auth
- Kubeclient::GCPCommandCredentials.expects(:token)
- .with('access-token' => '<fake_token>',
- 'cmd-args' => 'config config-helper --format=json',
- 'cmd-path' => '/path/to/gcloud',
- 'expiry' => '2019-04-09 19:26:18 UTC',
- 'expiry-key' => '{.credential.token_expiry}',
- 'token-key' => '{.credential.access_token}')
- .returns('token1')
- .once
- config = Kubeclient::Config.read(config_file('gcpcmdauth.kubeconfig'))
- config.context(config.contexts.first)
- end
-
- def test_oidc_auth_provider
- Kubeclient::OIDCAuthProvider.expects(:token)
- .with('client-id' => 'fake-client-id',
- 'client-secret' => 'fake-client-secret',
- 'id-token' => 'fake-id-token',
- 'idp-issuer-url' => 'https://accounts.google.com',
- 'refresh-token' => 'fake-refresh-token')
- .returns('token1')
- .once
- parsed = YAML.safe_load(File.read(config_file('oidcauth.kubeconfig')))
- config = Kubeclient::Config.new(parsed, nil)
- config.context(config.contexts.first)
- end
-
- private
-
- def check_context(context, ssl: true, custom_ca: true, client_cert: true)
- assert_equal('https://localhost:6443', context.api_endpoint)
- assert_equal('v1', context.api_version)
- assert_equal('default', context.namespace)
- if custom_ca
- assert_kind_of(OpenSSL::X509::Store, context.ssl_options[:cert_store])
- else
- assert_nil(context.ssl_options[:cert_store])
- end
- if client_cert
- assert_kind_of(OpenSSL::X509::Certificate, context.ssl_options[:client_cert])
- assert_kind_of(OpenSSL::PKey::RSA, context.ssl_options[:client_key])
- if custom_ca
- # When certificates expire one way to recreate them is using a k0s single-node cluster:
- # test/config/update_certs_k0s.rb
- assert(context.ssl_options[:cert_store].verify(context.ssl_options[:client_cert]))
- end
- else
- assert_nil(context.ssl_options[:client_cert])
- assert_nil(context.ssl_options[:client_key])
- end
- if ssl
- assert_equal(OpenSSL::SSL::VERIFY_PEER, context.ssl_options[:verify_ssl],
- 'expected VERIFY_PEER')
- else
- assert_equal(OpenSSL::SSL::VERIFY_NONE, context.ssl_options[:verify_ssl],
- 'expected VERIFY_NONE')
- end
- end
-
- def stub_exec(command_regexp, creds)
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- capture3_stub = lambda do |_env, command, *_args|
- assert_match command_regexp, command
- [JSON.dump(creds), nil, st]
- end
-
- Open3.stub(:capture3, capture3_stub) do
- yield
- end
- end
-
- def load_yaml(file_name)
- if RUBY_VERSION >= '2.6'
- YAML.safe_load(File.read(file_name), permitted_classes: [Date, Time])
- else
- YAML.safe_load(File.read(file_name), [Date, Time])
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_endpoint.rb b/vendor/gems/kubeclient/test/test_endpoint.rb
deleted file mode 100644
index ec2cd9306d4..00000000000
--- a/vendor/gems/kubeclient/test/test_endpoint.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-require_relative 'test_helper'
-
-# kind: 'Endpoints' entity tests.
-# This is one of the unusual `kind`s that are already plural (https://github.com/kubernetes/kubernetes/issues/8115).
-# We force singular in method names like 'create_endpoint',
-# but `kind` should remain plural as in kubernetes.
-class TestEndpoint < MiniTest::Test
- def test_create_endpoint
- stub_core_api_list
- testing_ep = Kubeclient::Resource.new
- testing_ep.metadata = {}
- testing_ep.metadata.name = 'myendpoint'
- testing_ep.metadata.namespace = 'default'
- testing_ep.subsets = [
- {
- 'addresses' => [{ 'ip' => '172.17.0.25' }],
- 'ports' => [{ 'name' => 'https', 'port' => 6443, 'protocol' => 'TCP' }]
- }
- ]
-
- req_body = '{"metadata":{"name":"myendpoint","namespace":"default"},' \
- '"subsets":[{"addresses":[{"ip":"172.17.0.25"}],"ports":[{"name":"https",' \
- '"port":6443,"protocol":"TCP"}]}],"kind":"Endpoints","apiVersion":"v1"}'
-
- stub_request(:post, 'http://localhost:8080/api/v1/namespaces/default/endpoints')
- .with(body: req_body)
- .to_return(body: open_test_file('created_endpoint.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- created_ep = client.create_endpoint(testing_ep)
- assert_equal('Endpoints', created_ep.kind)
- assert_equal('v1', created_ep.apiVersion)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1', as: :parsed_symbolized)
- created_ep = client.create_endpoint(testing_ep)
- assert_equal('Endpoints', created_ep[:kind])
- assert_equal('v1', created_ep[:apiVersion])
- end
-
- def test_get_endpoints
- stub_core_api_list
- stub_request(:get, %r{/endpoints})
- .to_return(body: open_test_file('endpoint_list.json'), status: 200)
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- collection = client.get_endpoints(as: :parsed_symbolized)
- assert_equal('EndpointsList', collection[:kind])
- assert_equal('v1', collection[:apiVersion])
-
- # Stripping of 'List' in collection.kind RecursiveOpenStruct mode only is historic.
- collection = client.get_endpoints
- assert_equal('Endpoints', collection.kind)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_exec_credentials.rb b/vendor/gems/kubeclient/test/test_exec_credentials.rb
deleted file mode 100644
index f0e51827f55..00000000000
--- a/vendor/gems/kubeclient/test/test_exec_credentials.rb
+++ /dev/null
@@ -1,225 +0,0 @@
-require_relative 'test_helper'
-require 'open3'
-
-# Unit tests for the ExecCredentials provider
-class ExecCredentialsTest < MiniTest::Test
- def test_exec_opts_missing
- expected_msg =
- 'exec options are required'
- exception = assert_raises(ArgumentError) do
- Kubeclient::ExecCredentials.run(nil)
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_exec_command_missing
- expected_msg =
- 'exec command is required'
- exception = assert_raises(KeyError) do
- Kubeclient::ExecCredentials.run({})
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_exec_command_failure
- err = 'Error'
- expected_msg =
- "exec command failed: #{err}"
-
- st = Minitest::Mock.new
- st.expect(:success?, false)
-
- opts = { 'command' => 'dummy' }
-
- Open3.stub(:capture3, [nil, err, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_run_with_token_credentials
- opts = { 'command' => 'dummy' }
-
- credentials = {
- 'token' => '0123456789ABCDEF0123456789ABCDEF'
- }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => credentials
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- Open3.stub(:capture3, [creds, nil, st]) do
- assert_equal(credentials, Kubeclient::ExecCredentials.run(opts))
- end
- end
-
- def test_run_with_client_credentials
- opts = { 'command' => 'dummy' }
-
- credentials = {
- 'clientCertificateData' => '0123456789ABCDEF0123456789ABCDEF',
- 'clientKeyData' => '0123456789ABCDEF0123456789ABCDEF'
- }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => credentials
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- Open3.stub(:capture3, [creds, nil, st]) do
- assert_equal(credentials, Kubeclient::ExecCredentials.run(opts))
- end
- end
-
- def test_run_with_missing_client_certificate_data
- opts = { 'command' => 'dummy' }
-
- credentials = {
- 'clientKeyData' => '0123456789ABCDEF0123456789ABCDEF'
- }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => credentials
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = 'exec plugin didn\'t return client certificate data'
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_run_with_missing_client_key_data
- opts = { 'command' => 'dummy' }
-
- credentials = {
- 'clientCertificateData' => '0123456789ABCDEF0123456789ABCDEF'
- }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => credentials
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = 'exec plugin didn\'t return client key data'
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_run_with_client_data_and_token
- opts = { 'command' => 'dummy' }
-
- credentials = {
- 'clientCertificateData' => '0123456789ABCDEF0123456789ABCDEF',
- 'clientKeyData' => '0123456789ABCDEF0123456789ABCDEF',
- 'token' => '0123456789ABCDEF0123456789ABCDEF'
- }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => credentials
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = 'exec plugin returned both token and client data'
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_status_missing
- opts = { 'command' => 'dummy' }
-
- creds = JSON.dump('apiVersion' => 'client.authentication.k8s.io/v1alpha1')
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = 'exec plugin didn\'t return a status field'
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_credentials_missing
- opts = { 'command' => 'dummy' }
-
- creds = JSON.dump(
- 'apiVersion' => 'client.authentication.k8s.io/v1alpha1',
- 'status' => {}
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = 'exec plugin didn\'t return a token or client data'
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-
- def test_api_version_mismatch
- api_version = 'client.authentication.k8s.io/v1alpha1'
- expected_version = 'client.authentication.k8s.io/v1beta1'
-
- opts = {
- 'command' => 'dummy',
- 'apiVersion' => expected_version
- }
-
- creds = JSON.dump(
- 'apiVersion' => api_version
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- expected_msg = "exec plugin is configured to use API version #{expected_version}," \
- " plugin returned version #{api_version}"
-
- Open3.stub(:capture3, [creds, nil, st]) do
- exception = assert_raises(RuntimeError) do
- Kubeclient::ExecCredentials.run(opts)
- end
- assert_equal(expected_msg, exception.message)
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_gcp_command_credentials.rb b/vendor/gems/kubeclient/test/test_gcp_command_credentials.rb
deleted file mode 100644
index f95b8fd045e..00000000000
--- a/vendor/gems/kubeclient/test/test_gcp_command_credentials.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require_relative 'test_helper'
-require 'open3'
-
-# Unit tests for the GCPCommandCredentials token provider
-class GCPCommandCredentialsTest < MiniTest::Test
- def test_token
- opts = { 'cmd-args' => 'config config-helper --format=json',
- 'cmd-path' => '/path/to/gcloud',
- 'expiry-key' => '{.credential.token_expiry}',
- 'token-key' => '{.credential.access_token}' }
-
- creds = JSON.dump(
- 'credential' => {
- 'access_token' => '9A3A941836F2458175BE18AA1971EBBF47949B07',
- 'token_expiry' => '2019-04-12T15:02:51Z'
- }
- )
-
- st = Minitest::Mock.new
- st.expect(:success?, true)
-
- Open3.stub(:capture3, [creds, nil, st]) do
- assert_equal('9A3A941836F2458175BE18AA1971EBBF47949B07',
- Kubeclient::GCPCommandCredentials.token(opts))
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_google_application_default_credentials.rb b/vendor/gems/kubeclient/test/test_google_application_default_credentials.rb
deleted file mode 100644
index 238ae729c16..00000000000
--- a/vendor/gems/kubeclient/test/test_google_application_default_credentials.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require_relative 'test_helper'
-require 'googleauth'
-
-# Unit tests for the ApplicationDefaultCredentials token provider
-class GoogleApplicationDefaultCredentialsTest < MiniTest::Test
- def test_token
- auth = Minitest::Mock.new
- auth.expect(:apply, nil, [{}])
- auth.expect(:access_token, 'valid_token')
-
- Google::Auth.stub(:get_application_default, auth) do
- assert_equal('valid_token', Kubeclient::GoogleApplicationDefaultCredentials.token)
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_guestbook_go.rb b/vendor/gems/kubeclient/test/test_guestbook_go.rb
deleted file mode 100644
index a50e192a0c5..00000000000
--- a/vendor/gems/kubeclient/test/test_guestbook_go.rb
+++ /dev/null
@@ -1,237 +0,0 @@
-require_relative 'test_helper'
-require 'vcr'
-
-# creation of google's example of guest book
-class CreateGuestbookGo < MiniTest::Test
- def test_create_guestbook_entities
- VCR.configure do |c|
- c.cassette_library_dir = 'test/cassettes'
- c.hook_into(:webmock)
- end
-
- # WebMock.allow_net_connect!
- VCR.use_cassette('kubernetes_guestbook') do # , record: :new_episodes) do
- client = Kubeclient::Client.new('http://10.35.0.23:8080/api/', 'v1')
-
- testing_ns = Kubeclient::Resource.new
- testing_ns.metadata = {}
- testing_ns.metadata.name = 'kubeclient-ns'
-
- # delete in case they existed before so creation can be tested
- delete_namespace(client, testing_ns.metadata.name)
- delete_services(
- client, testing_ns.metadata.name,
- ['guestbook', 'redis-master', 'redis-slave']
- )
- delete_replication_controllers(
- client, testing_ns.metadata.name,
- ['guestbook', 'redis-master', 'redis-slave']
- )
-
- client.create_namespace(testing_ns)
- services = create_services(client, testing_ns.metadata.name)
- replicators = create_replication_controllers(client, testing_ns.metadata.name)
-
- get_namespaces(client)
- get_services(client, testing_ns.metadata.name)
- get_replication_controllers(client, testing_ns.metadata.name)
-
- delete_services(client, testing_ns.metadata.name, services)
- delete_replication_controllers(client, testing_ns.metadata.name, replicators)
-
- client.delete_namespace(testing_ns.metadata.name)
- end
- ensure
- VCR.turn_off!
- end
-
- def delete_namespace(client, namespace_name)
- client.delete_namespace(namespace_name)
- rescue Kubeclient::ResourceNotFoundError => exception
- assert_equal(404, exception.error_code)
- end
-
- def get_namespaces(client)
- namespaces = client.get_namespaces
- assert(true, namespaces.size > 2)
- end
-
- def get_services(client, ns)
- retrieved_services = client.get_services(namespace: ns)
- assert_equal(3, retrieved_services.size)
- end
-
- def get_replication_controllers(client, ns)
- retrieved_replicators = client.get_replication_controllers(namespace: ns)
- assert_equal(3, retrieved_replicators.size)
- end
-
- def create_services(client, ns)
- guestbook_service = client.create_service(guestbook_service(ns))
- redis_service = client.create_service(redis_service(ns))
- redis_slave_service = client.create_service(redis_slave_service(ns))
- [guestbook_service, redis_service, redis_slave_service]
- end
-
- def create_replication_controllers(client, namespace)
- rc = client.create_replication_controller(guestbook_rc(namespace))
- rc2 = client.create_replication_controller(redis_master_rc(namespace))
- rc3 = client.create_replication_controller(redis_slave_rc(namespace))
- [rc, rc2, rc3]
- end
-
- def delete_services(client, namespace, services)
- # if the entity is not found, no need to fail the test
- services.each do |service|
- begin
- if service.instance_of?(Kubeclient::Resource)
- client.delete_service(service.metadata.name, namespace)
- else
- # it's just a string - service name
- client.delete_service(service, namespace)
- end
- rescue Kubeclient::ResourceNotFoundError => exception
- assert_equal(404, exception.error_code)
- end
- end
- end
-
- def delete_replication_controllers(client, namespace, replication_controllers)
- # if the entity is not found, no need to fail the test
- replication_controllers.each do |rc|
- begin
- if rc.instance_of?(Kubeclient::Resource)
- client.delete_replication_controller(rc.metadata.name, namespace)
- else
- # it's just a string - rc name
- client.delete_replication_controller(rc, namespace)
- end
- rescue Kubeclient::ResourceNotFoundError => exception
- assert_equal(404, exception.error_code)
- end
- end
- end
-
- private
-
- def construct_base_rc(namespace)
- rc = Kubeclient::Resource.new
- rc.metadata = {}
- rc.metadata.namespace = namespace
- rc.metadata.labels = {}
- rc.spec = {}
- rc.spec.selector = {}
- rc.spec.template = {}
- rc.spec.template.metadata = {}
- rc.spec.template.spec = {}
- rc.spec.template.metadata.labels = {}
- rc
- end
-
- def redis_master_rc(namespace)
- rc = construct_base_rc(namespace)
- rc.metadata.name = 'redis-master'
- rc.metadata.labels.app = 'redis'
- rc.metadata.labels.role = 'master'
- rc.spec.replicas = 1
- rc.spec.selector.app = 'redis'
- rc.spec.selector.role = 'master'
- rc.spec.template.metadata.labels.app = 'redis'
- rc.spec.template.metadata.labels.role = 'master'
- rc.spec.template.spec.containers = [{
- 'name' => 'redis-master',
- 'image' => 'redis',
- 'ports' => [{
- 'name' => 'redis-server',
- 'containerPort' => 6379
- }]
- }]
- rc
- end
-
- def redis_slave_rc(namespace)
- rc = construct_base_rc(namespace)
- rc.metadata.name = 'redis-slave'
- rc.metadata.labels.app = 'redis'
- rc.metadata.labels.role = 'slave'
- rc.spec.replicas = 2
- rc.spec.selector.app = 'redis'
- rc.spec.selector.role = 'slave'
- rc.spec.template.metadata.labels.app = 'redis'
- rc.spec.template.metadata.labels.role = 'slave'
- rc.spec.template.spec.containers = [{
- 'name' => 'redis-slave',
- 'image' => 'kubernetes/redis-slave:v2',
- 'ports' => [{
- 'name' => 'redis-server',
- 'containerPort' => 6379
- }]
- }]
- rc
- end
-
- def guestbook_rc(namespace)
- rc = construct_base_rc(namespace)
- rc.metadata.name = 'guestbook'
- rc.metadata.labels.app = 'guestbook'
- rc.metadata.labels.role = 'slave'
- rc.spec.replicas = 3
- rc.spec.selector.app = 'guestbook'
- rc.spec.template.metadata.labels.app = 'guestbook'
- rc.spec.template.spec.containers = [
- {
- 'name' => 'guestbook',
- 'image' => 'kubernetes/guestbook:v2',
- 'ports' => [
- {
- 'name' => 'http-server',
- 'containerPort' => 3000
- }
- ]
- }
- ]
- rc
- end
-
- def base_service(namespace)
- our_service = Kubeclient::Resource.new
- our_service.metadata = {}
- our_service.metadata.namespace = namespace
- our_service.metadata.labels = {}
- our_service.spec = {}
- our_service.spec.selector = {}
- our_service
- end
-
- def redis_slave_service(namespace)
- our_service = base_service(namespace)
- our_service.metadata.name = 'redis-slave'
- our_service.metadata.labels.app = 'redis'
- our_service.metadata.labels.role = 'slave'
- our_service.spec.ports = [{ 'port' => 6379, 'targetPort' => 'redis-server' }]
- our_service.spec.selector.app = 'redis'
- our_service.spec.selector.role = 'slave'
- our_service
- end
-
- def redis_service(namespace)
- our_service = base_service(namespace)
- our_service.metadata.name = 'redis-master'
- our_service.metadata.labels.app = 'redis'
- our_service.metadata.labels.role = 'master'
- our_service.spec.ports = [{ 'port' => 6379, 'targetPort' => 'redis-server' }]
- our_service.spec.selector.app = 'redis'
- our_service.spec.selector.role = 'master'
- our_service
- end
-
- def guestbook_service(namespace)
- our_service = base_service(namespace)
- our_service.metadata.name = 'guestbook'
- our_service.metadata.labels.name = 'guestbook'
- our_service.spec.ports = [{ 'port' => 3000, 'targetPort' => 'http-server' }]
- our_service.spec.selector.app = 'guestbook'
- our_service.type = 'LoadBalancer'
- our_service
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_helper.rb b/vendor/gems/kubeclient/test/test_helper.rb
deleted file mode 100644
index 042a08a0d80..00000000000
--- a/vendor/gems/kubeclient/test/test_helper.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require 'bundler/setup'
-require 'minitest/autorun'
-require 'minitest/rg'
-require 'webmock/minitest'
-require 'mocha/minitest'
-require 'json'
-require 'kubeclient'
-
-MiniTest::Test.class_eval do
- # Assumes test files will be in a subdirectory with the same name as the
- # file suffix. e.g. a file named foo.json would be a "json" subdirectory.
- def open_test_file(name)
- File.new(File.join(File.dirname(__FILE__), name.split('.').last, name))
- end
-
- # kubeconfig files deviate from above convention.
- # They link to relaved certs etc. with various extensions, all in same dir.
- def config_file(name)
- File.join(File.dirname(__FILE__), 'config', name)
- end
-
- def stub_core_api_list
- stub_request(:get, %r{/api/v1$})
- .to_return(body: open_test_file('core_api_resource_list.json'), status: 200)
- end
-end
-
-WebMock.disable_net_connect!
diff --git a/vendor/gems/kubeclient/test/test_kubeclient.rb b/vendor/gems/kubeclient/test/test_kubeclient.rb
deleted file mode 100644
index f866bfc89df..00000000000
--- a/vendor/gems/kubeclient/test/test_kubeclient.rb
+++ /dev/null
@@ -1,881 +0,0 @@
-require_relative 'test_helper'
-
-# Kubernetes client entity tests
-class KubeclientTest < MiniTest::Test
- def test_json
- our_object = Kubeclient::Resource.new
- our_object.foo = 'bar'
- our_object.nested = {}
- our_object.nested.again = {}
- our_object.nested.again.again = {}
- our_object.nested.again.again.name = 'aaron'
-
- expected = {
- 'foo' => 'bar',
- 'nested' => { 'again' => { 'again' => { 'name' => 'aaron' } } }
- }
-
- assert_equal(expected, JSON.parse(JSON.dump(our_object.to_h)))
- end
-
- def test_pass_uri
- # URI::Generic#hostname= was added in ruby 1.9.3 and will automatically
- # wrap an ipv6 address in []
- uri = URI::HTTP.build(port: 8080)
- uri.hostname = 'localhost'
- client = Kubeclient::Client.new(uri)
- rest_client = client.rest_client
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_no_path_in_uri
- client = Kubeclient::Client.new('http://localhost:8080', 'v1')
- rest_client = client.rest_client
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_no_version_passed
- client = Kubeclient::Client.new('http://localhost:8080')
- rest_client = client.rest_client
- assert_equal('http://localhost:8080/api/v1', rest_client.url.to_s)
- end
-
- def test_pass_proxy
- uri = URI::HTTP.build(host: 'localhost', port: 8080)
- proxy_uri = URI::HTTP.build(host: 'myproxyhost', port: 8888)
- stub_core_api_list
-
- client = Kubeclient::Client.new(uri, http_proxy_uri: proxy_uri)
- rest_client = client.rest_client
- assert_equal(proxy_uri.to_s, rest_client.options[:proxy])
-
- watch_client = client.watch_pods
- assert_equal(watch_client.send(:build_client_options)[:proxy][:proxy_address], proxy_uri.host)
- assert_equal(watch_client.send(:build_client_options)[:proxy][:proxy_port], proxy_uri.port)
- end
-
- def test_pass_max_redirects
- max_redirects = 0
- client = Kubeclient::Client.new('http://localhost:8080/api/', http_max_redirects: max_redirects)
- rest_client = client.rest_client
- assert_equal(max_redirects, rest_client.options[:max_redirects])
-
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 302, headers: { location: 'http://localhost:1234/api' })
-
- exception = assert_raises(Kubeclient::HttpError) { client.api }
- assert_equal(302, exception.error_code)
- end
-
- def test_exception
- stub_core_api_list
- stub_request(:post, %r{/services})
- .to_return(body: open_test_file('namespace_exception.json'), status: 409)
-
- service = Kubeclient::Resource.new
- service.metadata = {}
- service.metadata.name = 'redisslave'
- service.metadata.namespace = 'default'
- # service.port = 80
- # service.container_port = 6379
- # service.protocol = 'TCP'
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
-
- exception = assert_raises(Kubeclient::HttpError) do
- service = client.create_service(service)
- end
-
- assert_instance_of(Kubeclient::HttpError, exception)
- assert_equal("converting to : type names don't match (Pod, Namespace)",
- exception.message)
-
- assert_includes(exception.to_s, ' for POST http://localhost:8080/api')
- assert_equal(409, exception.error_code)
- end
-
- def test_deprecated_exception
- error_message = 'certificate verify failed'
-
- stub_request(:get, 'http://localhost:8080/api')
- .to_raise(OpenSSL::SSL::SSLError.new(error_message))
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
-
- exception = assert_raises(KubeException) { client.api }
- assert_equal(error_message, exception.message)
- end
-
- def test_api
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: open_test_file('versions_list.json'))
-
- response = client.api
- assert_includes(response, 'versions')
- end
-
- def test_api_ssl_failure
- error_message = 'certificate verify failed'
-
- stub_request(:get, 'http://localhost:8080/api')
- .to_raise(OpenSSL::SSL::SSLError.new(error_message))
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
-
- exception = assert_raises(Kubeclient::HttpError) { client.api }
- assert_equal(error_message, exception.message)
- end
-
- def test_api_timeout
- stub_request(:get, 'http://localhost:8080/api').to_timeout
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
-
- exception = assert_raises(Kubeclient::HttpError) { client.api }
- assert_match(/(timed out|timeout)/i, exception.message)
- end
-
- def test_api_valid
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: open_test_file('versions_list.json'))
-
- args = ['http://localhost:8080/api/']
-
- [nil, 'v1beta3', 'v1'].each do |version|
- client = Kubeclient::Client.new(*(version ? args + [version] : args))
- assert client.api_valid?
- end
- end
-
- def test_api_valid_with_invalid_version
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: open_test_file('versions_list.json'))
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'foobar1')
- refute client.api_valid?
- end
-
- def test_api_valid_with_unreported_versions
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: '{}')
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- refute client.api_valid?
- end
-
- def test_api_valid_with_invalid_json
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: '[]')
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- refute client.api_valid?
- end
-
- def test_api_valid_with_bad_endpoint
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: [404, 'Resource Not Found'])
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- assert_raises(Kubeclient::HttpError) { client.api_valid? }
- end
-
- def test_api_valid_with_non_json
- stub_request(:get, 'http://localhost:8080/api')
- .to_return(status: 200, body: '<html></html>')
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- assert_raises(JSON::ParserError) { client.api_valid? }
- end
-
- def test_nonjson_exception
- stub_core_api_list
- stub_request(:get, %r{/servic})
- .to_return(body: open_test_file('service_illegal_json_404.json'), status: 404)
-
- exception = assert_raises(Kubeclient::ResourceNotFoundError) do
- client.get_services
- end
-
- assert(exception.message.include?('Not Found'))
- assert_equal(404, exception.error_code)
- end
-
- def test_nonjson_exception_raw
- stub_core_api_list
- stub_request(:get, %r{/servic})
- .to_return(body: open_test_file('service_illegal_json_404.json'), status: 404)
-
- exception = assert_raises(Kubeclient::ResourceNotFoundError) do
- client.get_services(as: :raw)
- end
-
- assert(exception.message.include?('Not Found'))
- assert_equal(404, exception.error_code)
- end
-
- def test_entity_list
- stub_core_api_list
- stub_get_services
-
- services = client.get_services
-
- refute_empty(services)
- assert_instance_of(Kubeclient::Common::EntityList, services)
- # Stripping of 'List' in collection.kind RecursiveOpenStruct mode only is historic.
- assert_equal('Service', services.kind)
- assert_equal(2, services.size)
- assert_instance_of(Kubeclient::Resource, services[0])
- assert_instance_of(Kubeclient::Resource, services[1])
-
- assert_requested(:get, 'http://localhost:8080/api/v1/services', times: 1)
- end
-
- def test_entity_list_raw
- stub_core_api_list
- stub_get_services
-
- response = client.get_services(as: :raw)
-
- refute_empty(response)
- assert_equal(open_test_file('entity_list.json').read, response)
-
- assert_requested(:get, 'http://localhost:8080/api/v1/services', times: 1)
- end
-
- def test_entity_list_parsed
- stub_core_api_list
- stub_get_services
-
- response = client.get_services(as: :parsed)
- assert_equal Hash, response.class
- assert_equal 'ServiceList', response['kind']
- assert_equal %w[metadata spec status], response['items'].first.keys
- end
-
- def test_entity_list_parsed_symbolized
- stub_core_api_list
- stub_get_services
-
- response = client.get_services(as: :parsed_symbolized)
- assert_equal Hash, response.class
- assert_equal 'ServiceList', response[:kind]
- assert_equal %i[metadata spec status], response[:items].first.keys
- end
-
- def test_entity_list_unknown
- stub_core_api_list
- stub_get_services
-
- e = assert_raises(ArgumentError) { client.get_services(as: :whoops) }
- assert_equal 'Unsupported format :whoops', e.message
- end
-
- def test_entity_list_raw_failure
- stub_core_api_list
- stub_request(:get, %r{/services})
- .to_return(body: open_test_file('entity_list.json'), status: 500)
-
- exception = assert_raises(Kubeclient::HttpError) { client.get_services(as: :raw) }
- assert_equal('500 Internal Server Error', exception.message)
- assert_equal(500, exception.error_code)
- end
-
- def test_entities_with_label_selector
- selector = 'component=apiserver'
-
- stub_core_api_list
- stub_get_services
-
- services = client.get_services(label_selector: selector)
-
- assert_instance_of(Kubeclient::Common::EntityList, services)
- assert_requested(
- :get,
- "http://localhost:8080/api/v1/services?labelSelector=#{selector}",
- times: 1
- )
- end
-
- def test_entities_with_resource_version
- version = '329'
-
- stub_core_api_list
- stub_get_services
-
- services = client.get_services(resource_version: version)
-
- assert_instance_of(Kubeclient::Common::EntityList, services)
- assert_requested(
- :get,
- "http://localhost:8080/api/v1/services?resourceVersion=#{version}",
- times: 1
- )
- end
-
- def test_entities_with_field_selector
- selector = 'involvedObject.name=redis-master'
-
- stub_core_api_list
- stub_get_services
-
- services = client.get_services(field_selector: selector)
-
- assert_instance_of(Kubeclient::Common::EntityList, services)
- assert_requested(
- :get,
- "http://localhost:8080/api/v1/services?fieldSelector=#{selector}",
- times: 1
- )
- end
-
- def test_empty_list
- stub_core_api_list
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('empty_pod_list.json'), status: 200)
-
- pods = client.get_pods
- assert_instance_of(Kubeclient::Common::EntityList, pods)
- assert_equal(0, pods.size)
- end
-
- def test_get_all
- stub_core_api_list
-
- stub_request(:get, %r{/bindings})
- .to_return(body: open_test_file('bindings_list.json'), status: 404)
-
- stub_request(:get, %r{/configmaps})
- .to_return(body: open_test_file('config_map_list.json'), status: 200)
-
- stub_request(:get, %r{/podtemplates})
- .to_return(body: open_test_file('pod_template_list.json'), status: 200)
-
- stub_request(:get, %r{/services})
- .to_return(body: open_test_file('service_list.json'), status: 200)
-
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pod_list.json'), status: 200)
-
- stub_request(:get, %r{/nodes})
- .to_return(body: open_test_file('node_list.json'), status: 200)
-
- stub_request(:get, %r{/replicationcontrollers})
- .to_return(body: open_test_file('replication_controller_list.json'), status: 200)
-
- stub_request(:get, %r{/events})
- .to_return(body: open_test_file('event_list.json'), status: 200)
-
- stub_request(:get, %r{/endpoints})
- .to_return(body: open_test_file('endpoint_list.json'), status: 200)
-
- stub_request(:get, %r{/namespaces})
- .to_return(body: open_test_file('namespace_list.json'), status: 200)
-
- stub_request(:get, %r{/secrets})
- .to_return(body: open_test_file('secret_list.json'), status: 200)
-
- stub_request(:get, %r{/resourcequotas})
- .to_return(body: open_test_file('resource_quota_list.json'), status: 200)
-
- stub_request(:get, %r{/limitranges})
- .to_return(body: open_test_file('limit_range_list.json'), status: 200)
-
- stub_request(:get, %r{/persistentvolumes})
- .to_return(body: open_test_file('persistent_volume_list.json'), status: 200)
-
- stub_request(:get, %r{/persistentvolumeclaims})
- .to_return(body: open_test_file('persistent_volume_claim_list.json'), status: 200)
-
- stub_request(:get, %r{/componentstatuses})
- .to_return(body: open_test_file('component_status_list.json'), status: 200)
-
- stub_request(:get, %r{/serviceaccounts})
- .to_return(body: open_test_file('service_account_list.json'), status: 200)
-
- result = client.all_entities
- assert_equal(16, result.keys.size)
- assert_instance_of(Kubeclient::Common::EntityList, result['node'])
- assert_instance_of(Kubeclient::Common::EntityList, result['service'])
- assert_instance_of(Kubeclient::Common::EntityList, result['replication_controller'])
- assert_instance_of(Kubeclient::Common::EntityList, result['pod'])
- assert_instance_of(Kubeclient::Common::EntityList, result['event'])
- assert_instance_of(Kubeclient::Common::EntityList, result['namespace'])
- assert_instance_of(Kubeclient::Common::EntityList, result['secret'])
- assert_instance_of(Kubeclient::Resource, result['service'][0])
- assert_instance_of(Kubeclient::Resource, result['node'][0])
- assert_instance_of(Kubeclient::Resource, result['event'][0])
- assert_instance_of(Kubeclient::Resource, result['endpoint'][0])
- assert_instance_of(Kubeclient::Resource, result['namespace'][0])
- assert_instance_of(Kubeclient::Resource, result['secret'][0])
- assert_instance_of(Kubeclient::Resource, result['resource_quota'][0])
- assert_instance_of(Kubeclient::Resource, result['limit_range'][0])
- assert_instance_of(Kubeclient::Resource, result['persistent_volume'][0])
- assert_instance_of(Kubeclient::Resource, result['persistent_volume_claim'][0])
- assert_instance_of(Kubeclient::Resource, result['component_status'][0])
- assert_instance_of(Kubeclient::Resource, result['service_account'][0])
- end
-
- def test_get_all_raw
- stub_core_api_list
-
- stub_request(:get, %r{/bindings})
- .to_return(body: open_test_file('bindings_list.json'), status: 404)
-
- stub_request(:get, %r{/configmaps})
- .to_return(body: open_test_file('config_map_list.json'), status: 200)
-
- stub_request(:get, %r{/podtemplates})
- .to_return(body: open_test_file('pod_template_list.json'), status: 200)
-
- stub_request(:get, %r{/services})
- .to_return(body: open_test_file('service_list.json'), status: 200)
-
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pod_list.json'), status: 200)
-
- stub_request(:get, %r{/nodes})
- .to_return(body: open_test_file('node_list.json'), status: 200)
-
- stub_request(:get, %r{/replicationcontrollers})
- .to_return(body: open_test_file('replication_controller_list.json'), status: 200)
-
- stub_request(:get, %r{/events})
- .to_return(body: open_test_file('event_list.json'), status: 200)
-
- stub_request(:get, %r{/endpoints})
- .to_return(body: open_test_file('endpoint_list.json'), status: 200)
-
- stub_request(:get, %r{/namespaces})
- .to_return(body: open_test_file('namespace_list.json'), status: 200)
-
- stub_request(:get, %r{/secrets})
- .to_return(body: open_test_file('secret_list.json'), status: 200)
-
- stub_request(:get, %r{/resourcequotas})
- .to_return(body: open_test_file('resource_quota_list.json'), status: 200)
-
- stub_request(:get, %r{/limitranges})
- .to_return(body: open_test_file('limit_range_list.json'), status: 200)
-
- stub_request(:get, %r{/persistentvolumes})
- .to_return(body: open_test_file('persistent_volume_list.json'), status: 200)
-
- stub_request(:get, %r{/persistentvolumeclaims})
- .to_return(body: open_test_file('persistent_volume_claim_list.json'), status: 200)
-
- stub_request(:get, %r{/componentstatuses})
- .to_return(body: open_test_file('component_status_list.json'), status: 200)
-
- stub_request(:get, %r{/serviceaccounts})
- .to_return(body: open_test_file('service_account_list.json'), status: 200)
-
- result = client.all_entities(as: :raw)
- assert_equal(16, result.keys.size)
-
- %w[
- component_status config_map endpoint event limit_range namespace node
- persistent_volume persistent_volume_claim pod replication_controller
- resource_quota secret service service_account
- ].each do |entity|
- assert_equal(open_test_file("#{entity}_list.json").read, result[entity])
- end
- end
-
- def test_api_bearer_token_with_params_success
- stub_request(:get, 'http://localhost:8080/api/v1/pods?labelSelector=name=redis-master')
- .with(headers: { Authorization: 'Bearer valid_token' })
- .to_return(body: open_test_file('pod_list.json'), status: 200)
- stub_request(:get, %r{/api/v1$})
- .with(headers: { Authorization: 'Bearer valid_token' })
- .to_return(body: open_test_file('core_api_resource_list.json'), status: 200)
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { bearer_token: 'valid_token' }
- )
-
- pods = client.get_pods(label_selector: 'name=redis-master')
-
- assert_equal('Pod', pods.kind)
- assert_equal(1, pods.size)
- end
-
- def test_api_bearer_token_success
- stub_core_api_list
- stub_request(:get, 'http://localhost:8080/api/v1/pods')
- .with(headers: { Authorization: 'Bearer valid_token' })
- .to_return(
- body: open_test_file('pod_list.json'), status: 200
- )
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { bearer_token: 'valid_token' }
- )
-
- pods = client.get_pods
-
- assert_equal('Pod', pods.kind)
- assert_equal(1, pods.size)
- end
-
- def test_api_bearer_token_failure
- error_message =
- '"/api/v1" is forbidden because ' \
- 'system:anonymous cannot list on pods in'
- response = OpenStruct.new(code: 401, message: error_message)
-
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(headers: { Authorization: 'Bearer invalid_token' })
- .to_raise(Kubeclient::HttpError.new(403, error_message, response))
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { bearer_token: 'invalid_token' }
- )
-
- exception = assert_raises(Kubeclient::HttpError) { client.get_pods }
- assert_equal(403, exception.error_code)
- assert_equal(error_message, exception.message)
- assert_equal(response, exception.response)
- end
-
- def test_api_bearer_token_failure_raw
- error_message =
- '"/api/v1" is forbidden because ' \
- 'system:anonymous cannot list on pods in'
- response = OpenStruct.new(code: 401, message: error_message)
-
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(headers: { Authorization: 'Bearer invalid_token' })
- .to_raise(Kubeclient::HttpError.new(403, error_message, response))
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { bearer_token: 'invalid_token' }
- )
-
- exception = assert_raises(Kubeclient::HttpError) { client.get_pods(as: :raw) }
- assert_equal(403, exception.error_code)
- assert_equal(error_message, exception.message)
- assert_equal(response, exception.response)
- end
-
- def test_api_basic_auth_success
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(basic_auth: %w[username password])
- .to_return(body: open_test_file('core_api_resource_list.json'), status: 200)
- stub_request(:get, 'http://localhost:8080/api/v1/pods')
- .with(basic_auth: %w[username password])
- .to_return(body: open_test_file('pod_list.json'), status: 200)
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { username: 'username', password: 'password' }
- )
-
- pods = client.get_pods
-
- assert_equal('Pod', pods.kind)
- assert_equal(1, pods.size)
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/pods',
- times: 1
- )
- end
-
- def test_api_basic_auth_back_comp_success
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(basic_auth: %w[username password])
- .to_return(body: open_test_file('core_api_resource_list.json'), status: 200)
- stub_request(:get, 'http://localhost:8080/api/v1/pods')
- .with(basic_auth: %w[username password])
- .to_return(body: open_test_file('pod_list.json'), status: 200)
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { user: 'username', password: 'password' }
- )
-
- pods = client.get_pods
-
- assert_equal('Pod', pods.kind)
- assert_equal(1, pods.size)
- assert_requested(:get, 'http://localhost:8080/api/v1/pods', times: 1)
- end
-
- def test_api_basic_auth_failure
- error_message = 'HTTP status code 401, 401 Unauthorized'
- response = OpenStruct.new(code: 401, message: '401 Unauthorized')
-
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(basic_auth: %w[username password])
- .to_raise(Kubeclient::HttpError.new(401, error_message, response))
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { username: 'username', password: 'password' }
- )
-
- exception = assert_raises(Kubeclient::HttpError) { client.get_pods }
- assert_equal(401, exception.error_code)
- assert_equal(error_message, exception.message)
- assert_equal(response, exception.response)
- assert_requested(:get, 'http://localhost:8080/api/v1', times: 1)
- end
-
- def test_api_basic_auth_failure_raw
- error_message = 'HTTP status code 401, 401 Unauthorized'
- response = OpenStruct.new(code: 401, message: '401 Unauthorized')
-
- stub_request(:get, 'http://localhost:8080/api/v1')
- .with(basic_auth: %w[username password])
- .to_raise(Kubeclient::HttpError.new(401, error_message, response))
-
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { username: 'username', password: 'password' }
- )
-
- exception = assert_raises(Kubeclient::HttpError) { client.get_pods(as: :raw) }
- assert_equal(401, exception.error_code)
- assert_equal(error_message, exception.message)
- assert_equal(response, exception.response)
-
- assert_requested(:get, 'http://localhost:8080/api/v1', times: 1)
- end
-
- def test_init_username_no_password
- expected_msg = 'Basic auth requires both username & password'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { username: 'username' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_init_user_no_password
- expected_msg = 'Basic auth requires both username & password'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { user: 'username' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_init_username_and_bearer_token
- expected_msg = 'Invalid auth options: specify only one of username/password,' \
- ' bearer_token or bearer_token_file'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { username: 'username', bearer_token: 'token' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_init_username_and_bearer_token_file
- expected_msg = 'Invalid auth options: specify only one of username/password,' \
- ' bearer_token or bearer_token_file'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { username: 'username', bearer_token_file: 'token-file' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_bearer_token_and_bearer_token_file
- expected_msg =
- 'Invalid auth options: specify only one of username/password,' \
- ' bearer_token or bearer_token_file'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { bearer_token: 'token', bearer_token_file: 'token-file' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_bearer_token_file_not_exist
- expected_msg = 'Token file token-file does not exist'
- exception = assert_raises(ArgumentError) do
- Kubeclient::Client.new(
- 'http://localhost:8080',
- auth_options: { bearer_token_file: 'token-file' }
- )
- end
- assert_equal(expected_msg, exception.message)
- end
-
- def test_api_bearer_token_file_success
- stub_core_api_list
- stub_request(:get, 'http://localhost:8080/api/v1/pods')
- .with(headers: { Authorization: 'Bearer valid_token' })
- .to_return(body: open_test_file('pod_list.json'), status: 200)
-
- file = File.join(File.dirname(__FILE__), 'valid_token_file')
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- auth_options: { bearer_token_file: file }
- )
-
- pods = client.get_pods
-
- assert_equal('Pod', pods.kind)
- assert_equal(1, pods.size)
- end
-
- def test_proxy_url
- stub_core_api_list
-
- client = Kubeclient::Client.new('http://host:8080', 'v1')
- assert_equal(
- 'http://host:8080/api/v1/namespaces/ns/services/srvname:srvportname/proxy',
- client.proxy_url('service', 'srvname', 'srvportname', 'ns')
- )
-
- assert_equal(
- 'http://host:8080/api/v1/namespaces/ns/services/srvname:srvportname/proxy',
- client.proxy_url('services', 'srvname', 'srvportname', 'ns')
- )
-
- assert_equal(
- 'http://host:8080/api/v1/namespaces/ns/pods/srvname:srvportname/proxy',
- client.proxy_url('pod', 'srvname', 'srvportname', 'ns')
- )
-
- assert_equal(
- 'http://host:8080/api/v1/namespaces/ns/pods/srvname:srvportname/proxy',
- client.proxy_url('pods', 'srvname', 'srvportname', 'ns')
- )
-
- # Check no namespace provided
- assert_equal(
- 'http://host:8080/api/v1/nodes/srvname:srvportname/proxy',
- client.proxy_url('nodes', 'srvname', 'srvportname')
- )
-
- assert_equal(
- 'http://host:8080/api/v1/nodes/srvname:srvportname/proxy',
- client.proxy_url('node', 'srvname', 'srvportname')
- )
-
- # Check integer port
- assert_equal(
- 'http://host:8080/api/v1/nodes/srvname:5001/proxy',
- client.proxy_url('nodes', 'srvname', 5001)
- )
-
- assert_equal(
- 'http://host:8080/api/v1/nodes/srvname:5001/proxy',
- client.proxy_url('node', 'srvname', 5001)
- )
- end
-
- def test_attr_readers
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- ssl_options: { client_key: 'secret' },
- auth_options: { bearer_token: 'token' }
- )
- assert_equal('/api', client.api_endpoint.path)
- assert_equal('secret', client.ssl_options[:client_key])
- assert_equal('token', client.auth_options[:bearer_token])
- assert_equal('Bearer token', client.headers[:Authorization])
- end
-
- def test_nil_items
- # handle https://github.com/kubernetes/kubernetes/issues/13096
- stub_core_api_list
- stub_request(:get, %r{/persistentvolumeclaims})
- .to_return(body: open_test_file('persistent_volume_claims_nil_items.json'), status: 200)
-
- client.get_persistent_volume_claims
- end
-
- # Timeouts
-
- def test_timeouts_defaults
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/'
- )
- rest_client = client.rest_client
- assert_default_open_timeout(rest_client.open_timeout)
- assert_equal(60, rest_client.read_timeout)
- end
-
- def test_timeouts_open
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- timeouts: { open: 10 }
- )
- rest_client = client.rest_client
- assert_equal(10, rest_client.open_timeout)
- assert_equal(60, rest_client.read_timeout)
- end
-
- def test_timeouts_read
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- timeouts: { read: 300 }
- )
- rest_client = client.rest_client
- assert_default_open_timeout(rest_client.open_timeout)
- assert_equal(300, rest_client.read_timeout)
- end
-
- def test_timeouts_both
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- timeouts: { open: 10, read: 300 }
- )
- rest_client = client.rest_client
- assert_equal(10, rest_client.open_timeout)
- assert_equal(300, rest_client.read_timeout)
- end
-
- def test_timeouts_infinite
- client = Kubeclient::Client.new(
- 'http://localhost:8080/api/',
- timeouts: { open: nil, read: nil }
- )
- rest_client = client.rest_client
- assert_nil(rest_client.open_timeout)
- assert_nil(rest_client.read_timeout)
- end
-
- def assert_default_open_timeout(actual)
- if RUBY_VERSION >= '2.3'
- assert_equal(60, actual)
- else
- assert_nil(actual)
- end
- end
-
- private
-
- def stub_get_services
- stub_request(:get, %r{/services})
- .to_return(body: open_test_file('entity_list.json'), status: 200)
- end
-
- def client
- @client ||= Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- end
-
- # dup method creates a shallow copy which is not good in this case
- # since rename_keys changes the input hash
- # hence need to create a deep_copy
- def deep_copy(hash)
- Marshal.load(Marshal.dump(hash))
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_limit_range.rb b/vendor/gems/kubeclient/test/test_limit_range.rb
deleted file mode 100644
index e9822578e00..00000000000
--- a/vendor/gems/kubeclient/test/test_limit_range.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-require_relative 'test_helper'
-
-# LimitRange tests
-class TestLimitRange < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/limitranges})
- .to_return(body: open_test_file('limit_range.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- limit_range = client.get_limit_range('limits', 'quota-example')
-
- assert_instance_of(Kubeclient::Resource, limit_range)
- assert_equal('limits', limit_range.metadata.name)
- assert_equal('Container', limit_range.spec.limits[0].type)
- assert_equal('100m', limit_range.spec.limits[0].default.cpu)
- assert_equal('512Mi', limit_range.spec.limits[0].default.memory)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/namespaces/quota-example/limitranges/limits',
- times: 1
- )
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_missing_methods.rb b/vendor/gems/kubeclient/test/test_missing_methods.rb
deleted file mode 100644
index 67614c95adc..00000000000
--- a/vendor/gems/kubeclient/test/test_missing_methods.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-require_relative 'test_helper'
-
-# Test method_missing, respond_to? and respond_to_missing behaviour
-class TestMissingMethods < MiniTest::Test
- def test_missing
- stub_core_api_list
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_equal(true, client.respond_to?(:get_pod))
- assert_equal(true, client.respond_to?(:get_pods))
- assert_equal(false, client.respond_to?(:get_pie))
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1') # Reset discovery
- assert_equal(false, client.respond_to?(:get_pie))
- assert_equal(true, client.respond_to?(:get_pods))
- assert_equal(true, client.respond_to?(:get_pod))
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1') # Reset discovery
- assert_instance_of(Method, client.method(:get_pods))
- assert_raises(NameError) do
- client.method(:get_pies)
- end
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1') # Reset discovery
- assert_raises(NameError) do
- client.method(:get_pies)
- end
- assert_instance_of(Method, client.method(:get_pods))
-
- stub_request(:get, %r{/api/v1$}).to_return(
- body: '',
- status: 404
- ) # If discovery fails we expect the below raise an exception
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_raises(Kubeclient::HttpError) do
- client.discover
- end
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_raises(Kubeclient::HttpError) do
- client.method(:get_pods)
- end
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_raises(Kubeclient::HttpError) do
- client.respond_to?(:get_pods)
- end
- end
-
- def test_nonsuffix_plurals
- stub_request(:get, %r{/apis/extensions/v1beta1$}).to_return(
- body: open_test_file('extensions_v1beta1_api_resource_list.json'),
- status: 200
- )
- client = Kubeclient::Client.new('http://localhost:8080/apis/extensions', 'v1beta1')
- assert_equal(true, client.respond_to?(:get_network_policy))
- assert_equal(true, client.respond_to?(:get_network_policies))
- assert_equal(true, client.respond_to?(:get_pod_security_policy))
- assert_equal(true, client.respond_to?(:get_pod_security_policies))
- end
-
- def test_irregular_names
- stub_core_api_list
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_equal(true, client.respond_to?(:get_endpoint))
- assert_equal(true, client.respond_to?(:get_endpoints))
-
- stub_request(:get, %r{/apis/security.openshift.io/v1$}).to_return(
- body: open_test_file('security.openshift.io_api_resource_list.json'),
- status: 200
- )
- client = Kubeclient::Client.new('http://localhost:8080/apis/security.openshift.io', 'v1')
- assert_equal(true, client.respond_to?(:get_security_context_constraint))
- assert_equal(true, client.respond_to?(:get_security_context_constraints))
- end
-
- def test_lowercase_kind
- stub_request(:get, %r{/apis/config.istio.io/v1alpha2$}).to_return(
- body: open_test_file('config.istio.io_api_resource_list.json'),
- status: 200
- )
- client = Kubeclient::Client.new('http://localhost:8080/apis/config.istio.io', 'v1alpha2')
- assert_equal(true, client.respond_to?(:get_servicecontrolreport))
- assert_equal(true, client.respond_to?(:get_servicecontrolreports))
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_namespace.rb b/vendor/gems/kubeclient/test/test_namespace.rb
deleted file mode 100644
index 7283aa69b67..00000000000
--- a/vendor/gems/kubeclient/test/test_namespace.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-require_relative 'test_helper'
-
-# Namespace entity tests
-class TestNamespace < MiniTest::Test
- def test_get_namespace_v1
- stub_core_api_list
- stub_request(:get, %r{/namespaces})
- .to_return(body: open_test_file('namespace.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- namespace = client.get_namespace('staging')
-
- assert_instance_of(Kubeclient::Resource, namespace)
- assert_equal('e388bc10-c021-11e4-a514-3c970e4a436a', namespace.metadata.uid)
- assert_equal('staging', namespace.metadata.name)
- assert_equal('1168', namespace.metadata.resourceVersion)
- assert_equal('v1', namespace.apiVersion)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/namespaces/staging',
- times: 1
- )
- end
-
- def test_delete_namespace_v1
- our_namespace = Kubeclient::Resource.new
- our_namespace.metadata = {}
- our_namespace.metadata.name = 'staging'
-
- stub_core_api_list
- stub_request(:delete, %r{/namespaces})
- .to_return(body: open_test_file('namespace.json'), status: 200)
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- our_namespace = client.delete_namespace(our_namespace.metadata.name)
- assert_kind_of(RecursiveOpenStruct, our_namespace)
-
- assert_requested(
- :delete,
- 'http://localhost:8080/api/v1/namespaces/staging',
- times: 1
- )
- end
-
- def test_create_namespace
- stub_core_api_list
- stub_request(:post, %r{/namespaces})
- .to_return(body: open_test_file('created_namespace.json'), status: 201)
-
- namespace = Kubeclient::Resource.new
- namespace.metadata = {}
- namespace.metadata.name = 'development'
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- created_namespace = client.create_namespace(namespace)
- assert_instance_of(Kubeclient::Resource, created_namespace)
- assert_equal(namespace.metadata.name, created_namespace.metadata.name)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_node.rb b/vendor/gems/kubeclient/test/test_node.rb
deleted file mode 100644
index aa7459d63c9..00000000000
--- a/vendor/gems/kubeclient/test/test_node.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-require_relative 'test_helper'
-
-# Node entity tests
-class TestNode < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/nodes})
- .to_return(body: open_test_file('node.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- node = client.get_node('127.0.0.1')
-
- assert_instance_of(Kubeclient::Resource, node)
-
- assert_equal('041143c5-ce39-11e4-ac24-3c970e4a436a', node.metadata.uid)
- assert_equal('127.0.0.1', node.metadata.name)
- assert_equal('1724', node.metadata.resourceVersion)
- assert_equal('v1', node.apiVersion)
- assert_equal('2015-03-19T15:08:20+02:00', node.metadata.creationTimestamp)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/nodes/127.0.0.1',
- times: 1
- )
- end
-
- def test_get_from_json_v1_raw
- stub_core_api_list
- stub_request(:get, %r{/nodes})
- .to_return(body: open_test_file('node.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- response = client.get_node('127.0.0.1', nil, as: :raw)
-
- assert_equal(open_test_file('node.json').read, response)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/nodes/127.0.0.1',
- times: 1
- )
- end
-
- def test_get_from_json_v1_raw_error
- stub_request(:get, %r{/nodes})
- .to_return(body: open_test_file('node.json'), status: 200)
- stub_request(:get, %r{/api/v1$})
- .to_return(body: open_test_file('core_api_resource_list.json'), status: 500)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- exception = assert_raises(Kubeclient::HttpError) do
- client.get_node('127.0.0.1', nil, as: :raw)
- end
-
- assert_instance_of(Kubeclient::HttpError, exception)
- assert_equal('500 Internal Server Error', exception.message)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_oidc_auth_provider.rb b/vendor/gems/kubeclient/test/test_oidc_auth_provider.rb
deleted file mode 100644
index cdf325e9406..00000000000
--- a/vendor/gems/kubeclient/test/test_oidc_auth_provider.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-require_relative 'test_helper'
-require 'openid_connect'
-
-class OIDCAuthProviderTest < MiniTest::Test
- def setup
- @client_id = 'client_id'
- @client_secret = 'client_secret'
- @idp_issuer_url = 'idp_issuer_url'
- @refresh_token = 'refresh_token'
- @id_token = 'id_token'
- @new_id_token = 'new_id_token'
- end
-
- def test_expired_token
- OpenIDConnect::Discovery::Provider::Config.stub(:discover!, discovery_mock) do
- OpenIDConnect::ResponseObject::IdToken.stub(:decode, id_token_mock(Time.now.to_i - 7200)) do
- OpenIDConnect::Client.stub(:new, openid_client_mock) do
- retrieved_id_token = Kubeclient::OIDCAuthProvider.token(
- 'client-id' => @client_id,
- 'client-secret' => @client_secret,
- 'id-token' => @id_token,
- 'idp-issuer-url' => @idp_issuer_url,
- 'refresh-token' => @refresh_token
- )
- assert_equal(@new_id_token, retrieved_id_token)
- end
- end
- end
- end
-
- def test_valid_token
- OpenIDConnect::Discovery::Provider::Config.stub(:discover!, discovery_mock) do
- OpenIDConnect::ResponseObject::IdToken.stub(:decode, id_token_mock(Time.now.to_i + 7200)) do
- retrieved_id_token = Kubeclient::OIDCAuthProvider.token(
- 'client-id' => @client_id,
- 'client-secret' => @client_secret,
- 'id-token' => @id_token,
- 'idp-issuer-url' => @idp_issuer_url,
- 'refresh-token' => @refresh_token
- )
- assert_equal(@id_token, retrieved_id_token)
- end
- end
- end
-
- def test_missing_id_token
- OpenIDConnect::Discovery::Provider::Config.stub(:discover!, discovery_mock) do
- OpenIDConnect::Client.stub(:new, openid_client_mock) do
- retrieved_id_token = Kubeclient::OIDCAuthProvider.token(
- 'client-id' => @client_id,
- 'client-secret' => @client_secret,
- 'idp-issuer-url' => @idp_issuer_url,
- 'refresh-token' => @refresh_token
- )
- assert_equal(@new_id_token, retrieved_id_token)
- end
- end
- end
-
- def test_token_with_unknown_kid
- OpenIDConnect::Discovery::Provider::Config.stub(:discover!, discovery_mock) do
- OpenIDConnect::ResponseObject::IdToken.stub(
- :decode, ->(_token, _jwks) { raise JSON::JWK::Set::KidNotFound }
- ) do
- OpenIDConnect::Client.stub(:new, openid_client_mock) do
- retrieved_id_token = Kubeclient::OIDCAuthProvider.token(
- 'client-id' => @client_id,
- 'client-secret' => @client_secret,
- 'id-token' => @id_token,
- 'idp-issuer-url' => @idp_issuer_url,
- 'refresh-token' => @refresh_token
- )
- assert_equal(@new_id_token, retrieved_id_token)
- end
- end
- end
- end
-
- private
-
- def openid_client_mock
- access_token = Minitest::Mock.new
- access_token.expect(@id_token, @new_id_token)
-
- openid_client = Minitest::Mock.new
- openid_client.expect(:refresh_token=, nil, [@refresh_token])
- openid_client.expect(:access_token!, access_token)
- end
-
- def id_token_mock(expiry)
- id_token_mock = Minitest::Mock.new
- id_token_mock.expect(:exp, expiry)
- end
-
- def discovery_mock
- discovery = Minitest::Mock.new
- discovery.expect(:jwks, 'jwks')
- discovery.expect(:authorization_endpoint, 'authz_endpoint')
- discovery.expect(:token_endpoint, 'token_endpoint')
- discovery.expect(:userinfo_endpoint, 'userinfo_endpoint')
- discovery
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_persistent_volume.rb b/vendor/gems/kubeclient/test/test_persistent_volume.rb
deleted file mode 100644
index 8b283868a1f..00000000000
--- a/vendor/gems/kubeclient/test/test_persistent_volume.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-require_relative 'test_helper'
-
-# PersistentVolume tests
-class TestPersistentVolume < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/persistentvolumes})
- .to_return(body: open_test_file('persistent_volume.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- volume = client.get_persistent_volume('pv0001')
-
- assert_instance_of(Kubeclient::Resource, volume)
- assert_equal('pv0001', volume.metadata.name)
- assert_equal('10Gi', volume.spec.capacity.storage)
- assert_equal('/tmp/data01', volume.spec.hostPath.path)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/persistentvolumes/pv0001',
- times: 1
- )
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_persistent_volume_claim.rb b/vendor/gems/kubeclient/test/test_persistent_volume_claim.rb
deleted file mode 100644
index e51d8562e60..00000000000
--- a/vendor/gems/kubeclient/test/test_persistent_volume_claim.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require_relative 'test_helper'
-
-# PersistentVolumeClaim tests
-class TestPersistentVolumeClaim < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/persistentvolumeclaims})
- .to_return(body: open_test_file('persistent_volume_claim.json'), status: 200)
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- claim = client.get_persistent_volume_claim('myclaim-1', 'default')
-
- assert_instance_of(Kubeclient::Resource, claim)
- assert_equal('myclaim-1', claim.metadata.name)
- assert_equal('3Gi', claim.spec.resources.requests.storage)
- assert_equal('pv0001', claim.spec.volumeName)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/namespaces/default/persistentvolumeclaims/myclaim-1',
- times: 1
- )
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_pod.rb b/vendor/gems/kubeclient/test/test_pod.rb
deleted file mode 100644
index afad1774f5e..00000000000
--- a/vendor/gems/kubeclient/test/test_pod.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-require_relative 'test_helper'
-
-# Pod entity tests
-class TestPod < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pod.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- pod = client.get_pod('redis-master-pod', 'default')
-
- assert_instance_of(Kubeclient::Resource, pod)
- assert_equal('redis-master3', pod.metadata.name)
- assert_equal('dockerfile/redis', pod.spec.containers[0]['image'])
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod',
- times: 1
- )
- end
-
- def test_get_chunks
- stub_core_api_list
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pods_1.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- pods = client.get_pods(limit: 2)
-
- assert_equal(2, pods.count)
- assert_equal('eyJ2IjoibWV0YS5rOHMua', pods.continue)
-
- continue = pods.continue
-
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pods_2.json'), status: 200)
-
- pods = client.get_pods(limit: 2, continue: continue)
- assert_equal(2, pods.count)
- assert_nil(pods.continue)
-
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1',
- times: 1
- )
- assert_requested(
- :get,
- 'http://localhost:8080/api/v1/pods?limit=2',
- times: 1
- )
- assert_requested(
- :get,
- "http://localhost:8080/api/v1/pods?continue=#{continue}&limit=2",
- times: 1
- )
- end
-
- def test_get_chunks_410_gone
- stub_core_api_list
- stub_request(:get, %r{/pods})
- .to_return(body: open_test_file('pods_410.json'), status: 410)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- err = assert_raises Kubeclient::HttpError do
- client.get_pods(limit: 2, continue: 'eyJ2IjoibWV0YS5')
- end
-
- assert_equal(err.message,
- "The provided from parameter is too old to display a consistent list result. \
-You must start a new list without the from.")
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_pod_log.rb b/vendor/gems/kubeclient/test/test_pod_log.rb
deleted file mode 100644
index d9ba3eaabbd..00000000000
--- a/vendor/gems/kubeclient/test/test_pod_log.rb
+++ /dev/null
@@ -1,157 +0,0 @@
-require_relative 'test_helper'
-
-# Pod log tests
-class TestPodLog < MiniTest::Test
- def test_get_pod_log
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log})
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- retrieved_log = client.get_pod_log('redis-master-pod', 'default')
-
- assert_equal(open_test_file('pod_log.txt').read, retrieved_log)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod/log',
- times: 1)
- end
-
- def test_get_pod_log_container
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log})
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- retrieved_log = client.get_pod_log('redis-master-pod', 'default', container: 'ruby')
-
- assert_equal(open_test_file('pod_log.txt').read, retrieved_log)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod/log?container=ruby',
- times: 1)
- end
-
- def test_get_pod_log_since_time
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log})
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- retrieved_log = client.get_pod_log('redis-master-pod',
- 'default',
- timestamps: true,
- since_time: '2018-04-27T18:30:17.480321984Z')
-
- assert_equal(open_test_file('pod_log.txt').read, retrieved_log)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod/log?sinceTime=2018-04-27T18:30:17.480321984Z&timestamps=true',
- times: 1)
- end
-
- def test_get_pod_log_tail_lines
- selected_lines = open_test_file('pod_log.txt').to_a[-2..1].join
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log})
- .to_return(body: selected_lines,
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- retrieved_log = client.get_pod_log('redis-master-pod',
- 'default',
- tail_lines: 2)
-
- assert_equal(selected_lines, retrieved_log)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod/log?tailLines=2',
- times: 1)
- end
-
- def test_get_pod_limit_bytes
- selected_bytes = open_test_file('pod_log.txt').read(10)
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log})
- .to_return(body: selected_bytes,
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- retrieved_log = client.get_pod_log('redis-master-pod',
- 'default',
- limit_bytes: 10)
-
- assert_equal(selected_bytes, retrieved_log)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/pods/redis-master-pod/log?limitBytes=10',
- times: 1)
- end
-
- def test_watch_pod_log
- file = open_test_file('pod_log.txt')
- expected_lines = file.read.split("\n")
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log\?.*follow})
- .to_return(body: file, status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- stream = client.watch_pod_log('redis-master-pod', 'default')
- stream.to_enum.with_index do |notice, index|
- assert_instance_of(String, notice)
- assert_equal(expected_lines[index], notice)
- end
- end
-
- def test_watch_pod_log_with_block
- file = open_test_file('pod_log.txt')
- first = file.readlines.first.chomp
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log\?.*follow})
- .to_return(body: file, status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- client.watch_pod_log('redis-master-pod', 'default') do |line|
- assert_equal first, line
- break
- end
- end
-
- def test_watch_pod_log_follow_redirect
- expected_lines = open_test_file('pod_log.txt').read.split("\n")
- redirect = 'http://localhost:1234/api/namespaces/default/pods/redis-master-pod/log'
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log\?.*follow})
- .to_return(status: 302, headers: { location: redirect })
-
- stub_request(:get, redirect)
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- stream = client.watch_pod_log('redis-master-pod', 'default')
- stream.to_enum.with_index do |notice, index|
- assert_instance_of(String, notice)
- assert_equal(expected_lines[index], notice)
- end
- end
-
- def test_watch_pod_log_max_redirect
- redirect = 'http://localhost:1234/api/namespaces/default/pods/redis-master-pod/log'
-
- stub_request(:get, %r{/namespaces/default/pods/[a-z0-9-]+/log\?.*follow})
- .to_return(status: 302, headers: { location: redirect })
-
- stub_request(:get, redirect)
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1', http_max_redirects: 0)
- assert_raises(Kubeclient::HttpError) do
- client.watch_pod_log('redis-master-pod', 'default').each do
- end
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_process_template.rb b/vendor/gems/kubeclient/test/test_process_template.rb
deleted file mode 100644
index e3b4670fb87..00000000000
--- a/vendor/gems/kubeclient/test/test_process_template.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-require_relative 'test_helper'
-
-# Process Template tests
-class TestProcessTemplate < MiniTest::Test
- def test_process_template
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- template = {}
- template[:metadata] = {}
- template[:metadata][:name] = 'my-template'
- template[:metadata][:namespace] = 'default'
- template[:kind] = 'Template'
- template[:apiVersion] = 'v1'
- service = {}
- service[:metadata] = {}
- service[:metadata][:name] = '${NAME_PREFIX}my-service'
- service[:kind] = 'Service'
- service[:apiVersion] = 'v1'
- template[:objects] = [service]
- param = { name: 'NAME_PREFIX', value: 'test/' }
- template[:parameters] = [param]
-
- req_body = '{"metadata":{"name":"my-template","namespace":"default"},' \
- '"kind":"Template","apiVersion":"v1","objects":[{"metadata":' \
- '{"name":"${NAME_PREFIX}my-service"},"kind":"Service","apiVersion":"v1"}],' \
- '"parameters":[{"name":"NAME_PREFIX","value":"test/"}]}'
-
- expected_url = 'http://localhost:8080/api/v1/namespaces/default/processedtemplates'
- stub_request(:post, expected_url)
- .with(body: req_body, headers: { 'Content-Type' => 'application/json' })
- .to_return(body: open_test_file('processed_template.json'), status: 200)
-
- processed_template = client.process_template(template)
-
- assert_equal('test/my-service', processed_template['objects'].first['metadata']['name'])
-
- assert_requested(:post, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['kind'] == 'Template' &&
- data['apiVersion'] == 'v1' &&
- data['metadata']['name'] == 'my-template' &&
- data['metadata']['namespace'] == 'default'
- end
- end
-
- # Ensure _template and _templates methods hit `/templates` rather than
- # `/processedtemplates` URL.
- def test_templates_methods
- stub_request(:get, %r{/apis/template\.openshift\.io/v1$}).to_return(
- body: open_test_file('template.openshift.io_api_resource_list.json'),
- status: 200
- )
- client = Kubeclient::Client.new('http://localhost:8080/apis/template.openshift.io', 'v1')
-
- expected_url = 'http://localhost:8080/apis/template.openshift.io/v1/namespaces/default/templates'
- stub_request(:get, expected_url)
- .to_return(body: open_test_file('template_list.json'), status: 200)
- client.get_templates(namespace: 'default')
- assert_requested(:get, expected_url, times: 1)
-
- expected_url = 'http://localhost:8080/apis/template.openshift.io/v1/namespaces/default/templates/my-template'
- stub_request(:get, expected_url)
- .to_return(body: open_test_file('template.json'), status: 200)
- client.get_template('my-template', 'default')
- assert_requested(:get, expected_url, times: 1)
- end
-
- def test_no_processedtemplates_methods
- stub_request(:get, %r{/apis/template\.openshift\.io/v1$}).to_return(
- body: open_test_file('template.openshift.io_api_resource_list.json'),
- status: 200
- )
- client = Kubeclient::Client.new('http://localhost:8080/apis/template.openshift.io', 'v1')
- client.discover
-
- refute_respond_to(client, :get_processedtemplates)
- refute_respond_to(client, :get_processedtemplate)
- refute_respond_to(client, :get_processed_templates)
- refute_respond_to(client, :get_processed_template)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_real_cluster.rb b/vendor/gems/kubeclient/test/test_real_cluster.rb
deleted file mode 100644
index 7ce9493a1bb..00000000000
--- a/vendor/gems/kubeclient/test/test_real_cluster.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-require_relative 'test_helper'
-
-class KubeclientRealClusterTest < MiniTest::Test
- # Tests here actually connect to a cluster!
- # For simplicity, these tests use same config/*.kubeconfig files as test_config.rb,
- # so are intended to run from config/update_certs_k0s.rb script.
- def setup
- if ENV['KUBECLIENT_TEST_REAL_CLUSTER'] == 'true'
- WebMock.enable_net_connect!
- else
- skip('Requires real cluster, see test/config/update_certs_k0s.rb.')
- end
- end
-
- def teardown
- WebMock.disable_net_connect! # Don't allow any connections in other tests.
- end
-
- # Partially isolated tests that check Client behavior with given `verify_ssl` value:
-
- # localhost and 127.0.0.1 are among names on the certificate
- HOSTNAME_COVERED_BY_CERT = 'https://127.0.0.1:6443'.freeze
- # 127.0.0.2 also means localhost but is not included in the certificate.
- HOSTNAME_NOT_ON_CERT = 'https://127.0.0.2:6443'.freeze
-
- def test_real_cluster_verify_peer
- config = Kubeclient::Config.read(config_file('external.kubeconfig'))
- context = config.context
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options.merge(verify_ssl: OpenSSL::SSL::VERIFY_PEER),
- auth_options: context.auth_options
- )
- check_cert_accepted(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options.merge(verify_ssl: OpenSSL::SSL::VERIFY_PEER),
- auth_options: context.auth_options
- )
- check_cert_rejected(client2)
- end
-
- def test_real_cluster_verify_none
- config = Kubeclient::Config.read(config_file('external.kubeconfig'))
- context = config.context
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options.merge(verify_ssl: OpenSSL::SSL::VERIFY_NONE),
- auth_options: context.auth_options
- )
- check_cert_accepted(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options.merge(verify_ssl: OpenSSL::SSL::VERIFY_NONE),
- auth_options: context.auth_options
- )
- check_cert_accepted(client2)
- end
-
- # Integration tests that check combined Config -> Client behavior wrt. `verify_ssl`.
- # Quite redundant, but this was an embarrasing vulnerability so want to confirm...
-
- def test_real_cluster_concatenated_ca
- config = Kubeclient::Config.read(config_file('concatenated-ca.kubeconfig'))
- context = config.context
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_accepted(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_rejected(client2)
- end
-
- def test_real_cluster_verify_ssl_with_ca
- config = Kubeclient::Config.read(config_file('external.kubeconfig'))
- context = config.context
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_accepted(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_rejected(client2)
- end
-
- def test_real_cluster_verify_ssl_without_ca
- config = Kubeclient::Config.read(config_file('external-without-ca.kubeconfig'))
- context = config.context
- # Hostname matches cert but the local cluster uses self-signed certs from custom CA,
- # and this config omits CA data, so verification can't succeed.
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_rejected(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_rejected(client2)
- end
-
- def test_real_cluster_insecure_without_ca
- config = Kubeclient::Config.read(config_file('insecure.kubeconfig'))
- context = config.context
- # Hostname matches cert but the local cluster uses self-signed certs from custom CA,
- # and this config omits CA data, so verification would fail;
- # however, this config specifies `insecure-skip-tls-verify: true` so any cert goes.
- client1 = Kubeclient::Client.new(
- HOSTNAME_COVERED_BY_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_accepted(client1)
- client2 = Kubeclient::Client.new(
- HOSTNAME_NOT_ON_CERT, 'v1',
- ssl_options: context.ssl_options, auth_options: context.auth_options
- )
- check_cert_accepted(client2)
- end
-
- private
-
- # Test cert checking on discovery, CRUD, and watch code paths.
- def check_cert_accepted(client)
- client.discover
- client.get_nodes
- exercise_watcher_with_timeout(client.watch_nodes)
- end
-
- def check_cert_rejected(client)
- # TODO: all OpenSSL exceptions should be wrapped with Kubeclient error.
- assert_raises(Kubeclient::HttpError, OpenSSL::SSL::SSLError) do
- client.discover
- end
- # Since discovery fails, methods like .get_nodes, .watch_nodes would all fail
- # on method_missing -> discover. Call lower-level methods to test actual connection.
- assert_raises(Kubeclient::HttpError, OpenSSL::SSL::SSLError) do
- client.get_entities('Node', 'nodes', {})
- end
- assert_raises(Kubeclient::HttpError, OpenSSL::SSL::SSLError) do
- exercise_watcher_with_timeout(client.watch_entities('nodes'))
- end
- end
-
- def exercise_watcher_with_timeout(watcher)
- thread = Thread.new do
- sleep(1)
- watcher.finish
- end
- watcher.each do |_notice|
- break
- end
- thread.join
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_replication_controller.rb b/vendor/gems/kubeclient/test/test_replication_controller.rb
deleted file mode 100644
index 47af72210e5..00000000000
--- a/vendor/gems/kubeclient/test/test_replication_controller.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require_relative 'test_helper'
-
-# Replication Controller entity tests
-class TestReplicationController < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/replicationcontrollers})
- .to_return(body: open_test_file('replication_controller.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- rc = client.get_replication_controller('frontendController', 'default')
-
- assert_instance_of(Kubeclient::Resource, rc)
- assert_equal('guestbook-controller', rc.metadata.name)
- assert_equal('c71aa4c0-a240-11e4-a265-3c970e4a436a', rc.metadata.uid)
- assert_equal('default', rc.metadata.namespace)
- assert_equal(3, rc.spec.replicas)
- assert_equal('guestbook', rc.spec.selector.name)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/default/replicationcontrollers/frontendController',
- times: 1)
- end
-
- def test_delete_replicaset_cascade
- stub_core_api_list
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- opts = Kubeclient::Resource.new(
- apiVersion: 'meta/v1',
- gracePeriodSeconds: 0,
- kind: 'DeleteOptions',
- propagationPolicy: 'Foreground'
- )
-
- stub_request(:delete,
- 'http://localhost:8080/api/v1/namespaces/default/replicationcontrollers/frontendController')
- .with(body: opts.to_hash.to_json)
- .to_return(status: 200, body: open_test_file('replication_controller.json'), headers: {})
- rc = client.delete_replication_controller('frontendController', 'default', delete_options: opts)
- assert_kind_of(RecursiveOpenStruct, rc)
-
- assert_requested(:delete,
- 'http://localhost:8080/api/v1/namespaces/default/replicationcontrollers/frontendController',
- times: 1)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_resource_list_without_kind.rb b/vendor/gems/kubeclient/test/test_resource_list_without_kind.rb
deleted file mode 100644
index 89ab042b5f5..00000000000
--- a/vendor/gems/kubeclient/test/test_resource_list_without_kind.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-require_relative 'test_helper'
-
-# Core api resource list without kind tests
-class TestResourceListWithoutKind < MiniTest::Test
- def test_get_from_json_api_v1
- stub_request(:get, %r{/api/v1$})
- .to_return(body: open_test_file('core_api_resource_list_without_kind.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- client.discover
-
- [
- {
- entity: 'pod',
- type: 'Pod',
- name: 'pods',
- methods: %w[pod pods]
- },
- {
- entity: 'node',
- type: 'Node',
- name: 'nodes',
- methods: %w[node nodes]
- },
- {
- entity: 'service',
- type: 'Service',
- name: 'services',
- methods: %w[service services]
- }
- ].each { |h| assert_entities(client.instance_variable_get(:@entities)[h[:entity]], h) }
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1',
- times: 1)
- end
-
- def test_get_from_json_oapi_v1
- stub_request(:get, %r{/oapi/v1$})
- .to_return(body: open_test_file('core_oapi_resource_list_without_kind.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/oapi/', 'v1')
- client.discover
-
- [
- {
- entity: 'template',
- type: 'Template',
- name: 'templates',
- methods: %w[template templates]
- },
- {
- entity: 'build',
- type: 'Build',
- name: 'builds',
- methods: %w[build builds]
- },
- {
- entity: 'project',
- type: 'Project',
- name: 'projects',
- methods: %w[project projects]
- }
- ].each { |h| assert_entities(client.instance_variable_get(:@entities)[h[:entity]], h) }
-
- assert_requested(:get,
- 'http://localhost:8080/oapi/v1',
- times: 1)
- end
-
- def assert_entities(entity, h)
- assert_equal(entity.entity_type, h[:type])
- assert_equal(entity.resource_name, h[:name])
- assert_equal(entity.method_names, h[:methods])
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_resource_quota.rb b/vendor/gems/kubeclient/test/test_resource_quota.rb
deleted file mode 100644
index cf91a111196..00000000000
--- a/vendor/gems/kubeclient/test/test_resource_quota.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require_relative 'test_helper'
-
-# ResourceQuota tests
-class TestResourceQuota < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/resourcequotas})
- .to_return(body: open_test_file('resource_quota.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- quota = client.get_resource_quota('quota', 'quota-example')
-
- assert_instance_of(Kubeclient::Resource, quota)
- assert_equal('quota', quota.metadata.name)
- assert_equal('20', quota.spec.hard.cpu)
- assert_equal('10', quota.spec.hard.secrets)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/quota-example/resourcequotas/quota',
- times: 1)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_secret.rb b/vendor/gems/kubeclient/test/test_secret.rb
deleted file mode 100644
index ec129075a14..00000000000
--- a/vendor/gems/kubeclient/test/test_secret.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-require_relative 'test_helper'
-
-# Namespace entity tests
-class TestSecret < MiniTest::Test
- def test_get_secret_v1
- stub_core_api_list
- stub_request(:get, %r{/secrets})
- .to_return(body: open_test_file('created_secret.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- secret = client.get_secret('test-secret', 'dev')
-
- assert_instance_of(Kubeclient::Resource, secret)
- assert_equal('4e38a198-2bcb-11e5-a483-0e840567604d', secret.metadata.uid)
- assert_equal('test-secret', secret.metadata.name)
- assert_equal('v1', secret.apiVersion)
- assert_equal('Y2F0J3MgYXJlIGF3ZXNvbWUK', secret.data['super-secret'])
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/dev/secrets/test-secret',
- times: 1)
- end
-
- def test_delete_secret_v1
- stub_core_api_list
- stub_request(:delete, %r{/secrets})
- .to_return(status: 200, body: open_test_file('created_secret.json'))
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- secret = client.delete_secret('test-secret', 'dev')
- assert_kind_of(RecursiveOpenStruct, secret)
-
- assert_requested(:delete,
- 'http://localhost:8080/api/v1/namespaces/dev/secrets/test-secret',
- times: 1)
- end
-
- def test_create_secret_v1
- stub_core_api_list
- stub_request(:post, %r{/secrets})
- .to_return(body: open_test_file('created_secret.json'),
- status: 201)
-
- secret = Kubeclient::Resource.new
- secret.metadata = {}
- secret.metadata.name = 'test-secret'
- secret.metadata.namespace = 'dev'
- secret.data = {}
- secret.data['super-secret'] = 'Y2F0J3MgYXJlIGF3ZXNvbWUK'
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- created_secret = client.create_secret(secret)
- assert_instance_of(Kubeclient::Resource, created_secret)
- assert_equal(secret.metadata.name, created_secret.metadata.name)
- assert_equal(secret.metadata.namespace, created_secret.metadata.namespace)
- assert_equal(
- secret.data['super-secret'],
- created_secret.data['super-secret']
- )
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_security_context_constraint.rb b/vendor/gems/kubeclient/test/test_security_context_constraint.rb
deleted file mode 100644
index 23e53c4464e..00000000000
--- a/vendor/gems/kubeclient/test/test_security_context_constraint.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-require_relative 'test_helper'
-
-# kind: 'SecurityContextConstraints' entity tests.
-# This is one of the unusual `kind`s that are already plural (https://github.com/kubernetes/kubernetes/issues/8115).
-# We force singular in method names like 'create_endpoint',
-# but `kind` should remain plural as in kubernetes.
-class TestSecurityContextConstraints < MiniTest::Test
- def test_create_security_context_constraint
- stub_request(:get, %r{/apis/security.openshift.io/v1$}).to_return(
- body: open_test_file('security.openshift.io_api_resource_list.json'),
- status: 200
- )
-
- testing_scc = Kubeclient::Resource.new(
- metadata: {
- name: 'teleportation'
- },
- runAsUser: {
- type: 'MustRunAs'
- },
- seLinuxContext: {
- type: 'MustRunAs'
- }
- )
- req_body = '{"metadata":{"name":"teleportation"},"runAsUser":{"type":"MustRunAs"},' \
- '"seLinuxContext":{"type":"MustRunAs"},' \
- '"kind":"SecurityContextConstraints","apiVersion":"security.openshift.io/v1"}'
-
- stub_request(:post, 'http://localhost:8080/apis/security.openshift.io/v1/securitycontextconstraints')
- .with(body: req_body)
- .to_return(body: open_test_file('created_security_context_constraint.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/apis/security.openshift.io', 'v1')
- created_scc = client.create_security_context_constraint(testing_scc)
- assert_equal('SecurityContextConstraints', created_scc.kind)
- assert_equal('security.openshift.io/v1', created_scc.apiVersion)
-
- client = Kubeclient::Client.new('http://localhost:8080/apis/security.openshift.io', 'v1',
- as: :parsed_symbolized)
- created_scc = client.create_security_context_constraint(testing_scc)
- assert_equal('SecurityContextConstraints', created_scc[:kind])
- assert_equal('security.openshift.io/v1', created_scc[:apiVersion])
- end
-
- def test_get_security_context_constraints
- stub_request(:get, %r{/apis/security.openshift.io/v1$}).to_return(
- body: open_test_file('security.openshift.io_api_resource_list.json'),
- status: 200
- )
- stub_request(:get, %r{/securitycontextconstraints})
- .to_return(body: open_test_file('security_context_constraint_list.json'), status: 200)
- client = Kubeclient::Client.new('http://localhost:8080/apis/security.openshift.io', 'v1')
-
- collection = client.get_security_context_constraints(as: :parsed_symbolized)
- assert_equal('SecurityContextConstraintsList', collection[:kind])
- assert_equal('security.openshift.io/v1', collection[:apiVersion])
-
- # Stripping of 'List' in collection.kind RecursiveOpenStruct mode only is historic.
- collection = client.get_security_context_constraints
- assert_equal('SecurityContextConstraints', collection.kind)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_service.rb b/vendor/gems/kubeclient/test/test_service.rb
deleted file mode 100644
index 6ef3368780d..00000000000
--- a/vendor/gems/kubeclient/test/test_service.rb
+++ /dev/null
@@ -1,357 +0,0 @@
-require_relative 'test_helper'
-
-# Service entity tests
-class TestService < MiniTest::Test
- def test_construct_our_own_service
- our_service = Kubeclient::Resource.new
- our_service.metadata = {}
- our_service.metadata.name = 'guestbook'
- our_service.metadata.namespace = 'staging'
- our_service.metadata.labels = {}
- our_service.metadata.labels.name = 'guestbook'
-
- our_service.spec = {}
- our_service.spec.ports = [{
- 'port' => 3000,
- 'targetPort' => 'http-server',
- 'protocol' => 'TCP'
- }]
-
- assert_equal('guestbook', our_service.metadata.labels.name)
-
- hash = our_service.to_h
-
- assert_equal(our_service.metadata.labels.name,
- hash[:metadata][:labels][:name])
-
- expected_url = 'http://localhost:8080/api/v1/namespaces/staging/services'
- stub_core_api_list
- stub_request(:post, expected_url)
- .to_return(body: open_test_file('created_service.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- created = client.create_service(our_service)
-
- assert_instance_of(Kubeclient::Resource, created)
- assert_equal(created.metadata.name, our_service.metadata.name)
- assert_equal(created.spec.ports.size, our_service.spec.ports.size)
-
- # Check that original entity_config is not modified by kind/apiVersion patches:
- assert_nil(our_service.kind)
-
- assert_requested(:post, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['kind'] == 'Service' &&
- data['apiVersion'] == 'v1' &&
- data['metadata']['name'] == 'guestbook' &&
- data['metadata']['namespace'] == 'staging'
- end
- end
-
- def test_construct_service_from_symbol_keys
- service = Kubeclient::Resource.new
- service.metadata = {
- labels: { tier: 'frontend' },
- name: 'test-service',
- namespace: 'staging'
- }
- service.spec = {
- ports: [{
- port: 3000,
- targetPort: 'http-server',
- protocol: 'TCP'
- }]
- }
-
- expected_url = 'http://localhost:8080/api/v1/namespaces/staging/services'
- stub_core_api_list
- stub_request(:post, expected_url)
- .to_return(body: open_test_file('created_service.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- client.create_service(service)
-
- assert_requested(:post, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['kind'] == 'Service' &&
- data['apiVersion'] == 'v1' &&
- data['metadata']['name'] == 'test-service' &&
- data['metadata']['labels']['tier'] == 'frontend' &&
- data['metadata']['namespace'] == 'staging'
- end
- end
-
- def test_construct_service_from_string_keys
- service = Kubeclient::Resource.new
- service.metadata = {
- 'labels' => { 'tier' => 'frontend' },
- 'name' => 'test-service',
- 'namespace' => 'staging'
- }
- service.spec = {
- 'ports' => [{
- 'port' => 3000,
- 'targetPort' => 'http-server',
- 'protocol' => 'TCP'
- }]
- }
-
- stub_core_api_list
- expected_url = 'http://localhost:8080/api/v1/namespaces/staging/services'
- stub_request(:post, %r{namespaces/staging/services})
- .to_return(body: open_test_file('created_service.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- client.create_service(service)
-
- assert_requested(:post, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['kind'] == 'Service' &&
- data['apiVersion'] == 'v1' &&
- data['metadata']['name'] == 'test-service' &&
- data['metadata']['labels']['tier'] == 'frontend' &&
- data['metadata']['namespace'] == 'staging'
- end
- end
-
- def test_conversion_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/services})
- .to_return(body: open_test_file('service.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- service = client.get_service('redis-slave', 'development')
-
- assert_instance_of(Kubeclient::Resource, service)
- assert_equal('2015-04-05T13:00:31Z',
- service.metadata.creationTimestamp)
- assert_equal('bdb80a8f-db93-11e4-b293-f8b156af4ae1', service.metadata.uid)
- assert_equal('redis-slave', service.metadata.name)
- assert_equal('2815', service.metadata.resourceVersion)
- assert_equal('v1', service.apiVersion)
- assert_equal('10.0.0.140', service.spec.clusterIP)
- assert_equal('development', service.metadata.namespace)
-
- assert_equal('TCP', service.spec.ports[0].protocol)
- assert_equal(6379, service.spec.ports[0].port)
- assert_equal('', service.spec.ports[0].name)
- assert_equal('redis-server', service.spec.ports[0].targetPort)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/development/services/redis-slave',
- times: 1)
- end
-
- def test_delete_service
- our_service = Kubeclient::Resource.new
- our_service.name = 'redis-service'
- # TODO, new ports assignment to be added
- our_service.labels = {}
- our_service.labels.component = 'apiserver'
- our_service.labels.provider = 'kubernetes'
-
- stub_core_api_list
- stub_request(:delete, %r{/namespaces/default/services})
- .to_return(body: open_test_file('service.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- our_service = client.delete_service(our_service.name, 'default')
- assert_kind_of(RecursiveOpenStruct, our_service)
-
- assert_requested(:delete,
- 'http://localhost:8080/api/v1/namespaces/default/services/redis-service',
- times: 1)
- end
-
- def test_get_service_no_ns
- stub_core_api_list
- # when not specifying namespace for entities which
- # are not node or namespace, the request will fail
- stub_request(:get, %r{/services/redis-slave})
- .to_return(status: 404)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
-
- exception = assert_raises(Kubeclient::HttpError) do
- client.get_service('redis-slave')
- end
- assert_equal(404, exception.error_code)
- end
-
- def test_get_service
- stub_core_api_list
- stub_request(:get, %r{/namespaces/development/services/redis-slave})
- .to_return(body: open_test_file('service.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/')
- service = client.get_service('redis-slave', 'development')
- assert_equal('redis-slave', service.metadata.name)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/namespaces/development/services/redis-slave',
- times: 1)
- end
-
- def test_update_service
- service = Kubeclient::Resource.new
- name = 'my_service'
-
- service.metadata = {}
- service.metadata.name = name
- service.metadata.namespace = 'development'
-
- stub_core_api_list
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{name}"
- stub_request(:put, expected_url)
- .to_return(body: open_test_file('service_update.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.update_service(service)
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:put, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['metadata']['name'] == name &&
- data['metadata']['namespace'] == 'development'
- end
- end
-
- def test_update_service_with_string_keys
- service = Kubeclient::Resource.new
- name = 'my_service'
-
- service.metadata = {
- 'name' => name,
- 'namespace' => 'development'
- }
-
- stub_core_api_list
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{name}"
- stub_request(:put, expected_url)
- .to_return(body: open_test_file('service_update.json'), status: 201)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.update_service(service)
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:put, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['metadata']['name'] == name &&
- data['metadata']['namespace'] == 'development'
- end
- end
-
- def test_patch_service
- service = Kubeclient::Resource.new
- name = 'my_service'
-
- service.metadata = {}
- service.metadata.name = name
- service.metadata.namespace = 'development'
-
- stub_core_api_list
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{name}"
- stub_request(:patch, expected_url)
- .to_return(body: open_test_file('service_patch.json'), status: 200)
-
- patch = {
- metadata: {
- annotations: {
- key: 'value'
- }
- }
- }
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.patch_service(name, patch, 'development')
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:patch, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- data['metadata']['annotations']['key'] == 'value'
- end
- end
-
- def test_apply_service
- service = Kubeclient::Resource.new
- name = 'my_service'
-
- service.metadata = {}
- service.metadata.name = name
- service.metadata.namespace = 'development'
- service.metadata.annotations = {}
- service.metadata.annotations['key'] = 'value'
-
- stub_core_api_list
- resource_name = "#{name}?fieldManager=myapp&force=true"
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{resource_name}"
- stub_request(:patch, expected_url)
- .to_return(body: open_test_file('service_patch.json'), status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.apply_service(service, field_manager: 'myapp')
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:patch, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- req.headers['Content-Type'] == 'application/apply-patch+yaml' &&
- data['metadata']['annotations']['key'] == 'value'
- end
- end
-
- def test_json_patch_service
- service = Kubeclient::Resource.new
- name = 'my-service'
-
- service.metadata = {}
- service.metadata.name = name
- service.metadata.namespace = 'development'
-
- stub_core_api_list
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{name}"
- stub_request(:patch, expected_url)
- .to_return(body: open_test_file('service_json_patch.json'), status: 200)
-
- patch = [
- { 'op' => 'add', 'path' => '/spec/type', 'value' => 'LoadBalancer' }
- ]
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.json_patch_service(name, patch, 'development')
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:patch, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- req.headers['Content-Type'] == 'application/json-patch+json' &&
- data == patch
- end
- end
-
- def test_merge_patch_service
- service = Kubeclient::Resource.new
- name = 'my-service'
-
- service.metadata = {}
- service.metadata.name = name
- service.metadata.namespace = 'development'
-
- stub_core_api_list
- expected_url = "http://localhost:8080/api/v1/namespaces/development/services/#{name}"
- stub_request(:patch, expected_url)
- .to_return(body: open_test_file('service_merge_patch.json'), status: 200)
-
- patch = { spec: { type: 'NodePort' } }
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- service = client.merge_patch_service(name, patch, 'development')
- assert_kind_of(RecursiveOpenStruct, service)
-
- assert_requested(:patch, expected_url, times: 1) do |req|
- data = JSON.parse(req.body)
- req.headers['Content-Type'] == 'application/merge-patch+json' &&
- data['spec']['type'] == 'NodePort'
- end
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_service_account.rb b/vendor/gems/kubeclient/test/test_service_account.rb
deleted file mode 100644
index 87a08a215bd..00000000000
--- a/vendor/gems/kubeclient/test/test_service_account.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require_relative 'test_helper'
-
-# ServiceAccount tests
-class TestServiceAccount < MiniTest::Test
- def test_get_from_json_v1
- stub_core_api_list
- stub_request(:get, %r{/serviceaccounts})
- .to_return(body: open_test_file('service_account.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- account = client.get_service_account('default')
-
- assert_instance_of(Kubeclient::Resource, account)
- assert_equal('default', account.metadata.name)
- assert_equal('default-token-6s23q', account.secrets[0].name)
- assert_equal('default-dockercfg-62tf3', account.secrets[1].name)
-
- assert_requested(:get,
- 'http://localhost:8080/api/v1/serviceaccounts/default',
- times: 1)
- assert_requested(:get,
- 'http://localhost:8080/api/v1',
- times: 1)
- end
-end
diff --git a/vendor/gems/kubeclient/test/test_watch.rb b/vendor/gems/kubeclient/test/test_watch.rb
deleted file mode 100644
index 8d74008c851..00000000000
--- a/vendor/gems/kubeclient/test/test_watch.rb
+++ /dev/null
@@ -1,195 +0,0 @@
-require_relative 'test_helper'
-
-# Watch entity tests
-class TestWatch < MiniTest::Test
- def test_watch_pod_success
- stub_core_api_list
-
- expected = [
- { 'type' => 'ADDED', 'resourceVersion' => '1389' },
- { 'type' => 'MODIFIED', 'resourceVersion' => '1390' },
- { 'type' => 'DELETED', 'resourceVersion' => '1398' }
- ]
-
- stub_request(:get, %r{/watch/pods})
- .to_return(body: open_test_file('watch_stream.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- client.watch_pods.to_enum.with_index do |notice, index|
- assert_instance_of(Kubeclient::Resource, notice)
- assert_equal(expected[index]['type'], notice.type)
- assert_equal('Pod', notice.object.kind)
- assert_equal('php', notice.object.metadata.name)
- assert_equal(expected[index]['resourceVersion'],
- notice.object.metadata.resourceVersion)
- end
- end
-
- def test_watch_pod_block
- stub_core_api_list
- stub_request(:get, %r{/watch/pods})
- .to_return(body: open_test_file('watch_stream.json'),
- status: 200)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- yielded = []
- client.watch_pods { |notice| yielded << notice.type }
-
- assert_equal %w[ADDED MODIFIED DELETED], yielded
- end
-
- def test_watch_pod_raw
- stub_core_api_list
-
- stub_request(:get, %r{/watch/pods}).to_return(
- body: open_test_file('watch_stream.json'),
- status: 200
- )
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- got = nil
- client.watch_pods(as: :raw).each { |notice| got = notice }
- assert_match(/\A{"type":"DELETED"/, got)
- end
-
- def test_watch_pod_failure
- stub_core_api_list
- stub_request(:get, %r{/watch/pods}).to_return(status: 404)
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
- assert_raises(Kubeclient::HttpError) do
- client.watch_pods.each do
- end
- end
- end
-
- def test_watch_pod_follow_redirect
- stub_core_api_list
-
- redirect = 'http://localhost:1234/api/v1/watch/pods'
- stub_request(:get, %r{/watch/pods})
- .to_return(status: 302, headers: { location: redirect })
-
- stub_request(:get, redirect).to_return(
- body: open_test_file('watch_stream.json'),
- status: 200
- )
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
-
- got = nil
- client.watch_pods.each { |notice| got = notice }
- assert_equal('DELETED', got.type)
- end
-
- def test_watch_pod_max_redirect
- stub_core_api_list
-
- redirect = 'http://localhost:1234/api/v1/watcher/pods'
- stub_request(:get, %r{/watch/pods})
- .to_return(status: 302, headers: { location: redirect })
-
- stub_request(:get, redirect).to_return(
- body: open_test_file('watch_stream.json'),
- status: 200
- )
-
- client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1', http_max_redirects: 0)
-
- assert_raises(Kubeclient::HttpError) do
- client.watch_pods.each do
- end
- end
- end
-
- # Ensure that WatchStream respects a format that's not JSON
- def test_watch_stream_text
- url = 'http://www.example.com/foobar'
- expected_lines = open_test_file('pod_log.txt').read.split("\n")
-
- stub_request(:get, url)
- .to_return(body: open_test_file('pod_log.txt'),
- status: 200)
-
- stream = Kubeclient::Common::WatchStream.new(URI.parse(url), {}, formatter: ->(v) { v })
- stream.to_enum.with_index do |line, index|
- assert_instance_of(String, line)
- assert_equal(expected_lines[index], line)
- end
- end
-
- def test_watch_with_resource_version
- api_host = 'http://localhost:8080/api'
- version = '1995'
- stub_core_api_list
- stub_request(:get, %r{.*\/watch/events})
- .to_return(body: open_test_file('watch_stream.json'),
- status: 200)
-
- client = Kubeclient::Client.new(api_host, 'v1')
- results = client.watch_events(version).to_enum
-
- assert_equal(3, results.count)
- assert_requested(:get,
- "#{api_host}/v1/watch/events?resourceVersion=#{version}",
- times: 1)
- end
-
- def test_watch_with_label_selector
- api_host = 'http://localhost:8080/api'
- selector = 'name=redis-master'
-
- stub_core_api_list
- stub_request(:get, %r{.*\/watch/events})
- .to_return(body: open_test_file('watch_stream.json'),
- status: 200)
-
- client = Kubeclient::Client.new(api_host, 'v1')
- results = client.watch_events(label_selector: selector).to_enum
-
- assert_equal(3, results.count)
- assert_requested(:get,
- "#{api_host}/v1/watch/events?labelSelector=#{selector}",
- times: 1)
- end
-
- def test_watch_with_field_selector
- api_host = 'http://localhost:8080/api'
- selector = 'involvedObject.kind=Pod'
-
- stub_core_api_list
- stub_request(:get, %r{.*\/watch/events})
- .to_return(body: open_test_file('watch_stream.json'),
- status: 200)
-
- client = Kubeclient::Client.new(api_host, 'v1')
- results = client.watch_events(field_selector: selector).to_enum
-
- assert_equal(3, results.count)
- assert_requested(:get,
- "#{api_host}/v1/watch/events?fieldSelector=#{selector}",
- times: 1)
- end
-
- def test_watch_with_finish_and_ebadf
- api_host = 'http://localhost:8080/api'
-
- stub_core_api_list
- stub_request(:get, %r{.*\/watch/events})
- .to_return(body: open_test_file('watch_stream.json'), status: 200)
-
- client = Kubeclient::Client.new(api_host, 'v1')
- watcher = client.watch_events
-
- # explodes when StandardError is not caught
- watcher.each do
- watcher.finish
- raise StandardError
- end
-
- assert_requested(:get, "#{api_host}/v1/watch/events", times: 1)
- end
-end
diff --git a/vendor/gems/kubeclient/test/txt/pod_log.txt b/vendor/gems/kubeclient/test/txt/pod_log.txt
deleted file mode 100644
index 9f9a75157aa..00000000000
--- a/vendor/gems/kubeclient/test/txt/pod_log.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Initializing server...
-...loaded configuration
-...updated settings
-...discovered local servers
-...frobinated disks
-Complete!
diff --git a/vendor/gems/kubeclient/test/valid_token_file b/vendor/gems/kubeclient/test/valid_token_file
deleted file mode 100644
index df2c2eb6572..00000000000
--- a/vendor/gems/kubeclient/test/valid_token_file
+++ /dev/null
@@ -1 +0,0 @@
-valid_token
diff --git a/vendor/gems/omniauth-cas3/Gemfile b/vendor/gems/omniauth-cas3/Gemfile
deleted file mode 100644
index adc6d8b37a3..00000000000
--- a/vendor/gems/omniauth-cas3/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-source 'https://rubygems.org'
-
-# Specify your gem's dependencies in omniauth-cas3.gemspec
-gemspec
diff --git a/vendor/gems/omniauth-cas3/Gemfile.lock b/vendor/gems/omniauth-cas3/Gemfile.lock
deleted file mode 100644
index a856e78f00f..00000000000
--- a/vendor/gems/omniauth-cas3/Gemfile.lock
+++ /dev/null
@@ -1,65 +0,0 @@
-PATH
- remote: .
- specs:
- omniauth-cas3 (1.1.4)
- addressable (~> 2.3)
- nokogiri (~> 1.7, >= 1.7.1)
- omniauth (~> 2.0)
-
-GEM
- remote: https://rubygems.org/
- specs:
- addressable (2.8.1)
- public_suffix (>= 2.0.2, < 6.0)
- awesome_print (1.9.2)
- crack (0.4.5)
- rexml
- diff-lcs (1.5.0)
- hashdiff (1.0.1)
- hashie (5.0.0)
- nokogiri (1.13.7)
- racc (~> 1.4)
- omniauth (2.1.0)
- hashie (>= 3.4.6)
- rack (>= 2.2.3)
- rack-protection
- public_suffix (5.0.0)
- racc (1.6.0)
- rack (2.2.4)
- rack-protection (2.2.2)
- rack
- rack-test (0.8.3)
- rack (>= 1.0, < 3)
- rake (10.5.0)
- rexml (3.2.5)
- rspec (3.11.0)
- rspec-core (~> 3.11.0)
- rspec-expectations (~> 3.11.0)
- rspec-mocks (~> 3.11.0)
- rspec-core (3.11.0)
- rspec-support (~> 3.11.0)
- rspec-expectations (3.11.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.11.0)
- rspec-mocks (3.11.1)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.11.0)
- rspec-support (3.11.0)
- webmock (3.18.1)
- addressable (>= 2.8.0)
- crack (>= 0.3.2)
- hashdiff (>= 0.4.0, < 2.0.0)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- awesome_print
- omniauth-cas3!
- rack-test (~> 0.6)
- rake (~> 10.0)
- rspec (>= 3.4)
- webmock
-
-BUNDLED WITH
- 2.3.21
diff --git a/vendor/gems/omniauth-cas3/LICENSE b/vendor/gems/omniauth-cas3/LICENSE
deleted file mode 100644
index 402cb6e4380..00000000000
--- a/vendor/gems/omniauth-cas3/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright (c) 2011 Derek Lindahl and CustomInk, LLC
-Copyright (c) 2015 tduehr
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/vendor/gems/omniauth-cas3/README.md b/vendor/gems/omniauth-cas3/README.md
deleted file mode 100644
index 3c66341defb..00000000000
--- a/vendor/gems/omniauth-cas3/README.md
+++ /dev/null
@@ -1,134 +0,0 @@
-# OmniAuth CAS Strategy [![Gem Version][version_badge]][version] [![Build Status][travis_status]][travis]
-
-This is a fork of [omniauth-cas3](https://github.com/tduehr/omniauth-cas3) to
-support:
-
-1. OmniAuth v1 and v2. OmniAuth v2 disables GET requests by default
- and defaults to POST. GitLab already has patched v1 to use POST,
- but other dependencies need to be updated:
- https://gitlab.com/gitlab-org/gitlab/-/issues/30073.
-2. We may deprecate this library entirely in the future:
- https://gitlab.com/gitlab-org/gitlab/-/issues/366212
-
-[version_badge]: https://badge.fury.io/rb/omniauth-cas3.png
-[version]: http://badge.fury.io/rb/omniauth-cas3
-[travis]: http://travis-ci.org/tduehr/omniauth-cas3
-[travis_status]: https://secure.travis-ci.org/dlindahl/omniauth-cas3.png
-[releases]: https://github.com/tduehr/omniauth-cas3/releases
-
-This is a OmniAuth 1.0 compatible port of the previously available
-[OmniAuth CAS strategy][old_omniauth_cas] that was bundled with OmniAuth 0.3. This strategy has also been updated for CAS protocol version 3.0 and patched to deal with namespace issues.
-
-* [View the documentation][document_up]
-* [Changelog][releases]
-
-## Installation
-
-Add this line to your application's Gemfile:
-
- gem 'omniauth-cas3'
-
-And then execute:
-
- $ bundle
-
-Or install it yourself as:
-
- $ gem install omniauth-cas3
-
-## Usage
-
-Use like any other OmniAuth strategy:
-
-```ruby
-Rails.application.config.middleware.use OmniAuth::Builder do
- provider :cas3, host: 'cas.yourdomain.com'
-end
-```
-
-### Configuration Options
-
-#### Required
-
-OmniAuth CAS requires at least one of the following two configuration options:
-
- * `url` - Defines the URL of your CAS server (i.e. `http://example.org:8080`)
- * `host` - Defines the host of your CAS server (i.e. `example.org`).
-
-#### Optional
-
-Other configuration options:
-
- * `port` - The port to use for your configured CAS `host`. Optional if using `url`.
- * `ssl` - TRUE to connect to your CAS server over SSL. Optional if using `url`.
- * `service_validate_url` - The URL to use to validate a user. Defaults to `'/serviceValidate'`.
- * `callback_url` - The URL custom URL path which CAS uses to call back to the service. Defaults to `/users/auth/cas3/callback`.
- * `logout_url` - The URL to use to logout a user. Defaults to `'/logout'`.
- * `login_url` - Defines the URL used to prompt users for their login information. Defaults to `/login` If no `host` is configured, the host application's domain will be used.
- * `uid_field` - The user data attribute to use as your user's unique identifier. Defaults to `'user'` (which usually contains the user's login name).
- * `ca_path` - Optional when `ssl` is `true`. Sets path of a CA certification directory. See [Net::HTTP][net_http] for more details.
- * `disable_ssl_verification` - Optional when `ssl` is true. Disables verification.
- * `on_single_sign_out` - Optional. Callback used when a [CAS 3.1 Single Sign Out][sso]
- request is received.
- * `fetch_raw_info` - Optional. Callback used to return additional "raw" user
- info from other sources.
-
- ```ruby
- provider :cas3,
- fetch_raw_info: lambda { |strategy, options, ticket, user_info|
- ExternalService.get(user_info[:user]).attributes
- }
- ```
-
-Configurable options for values returned by CAS:
-
- * `uid_key` - The user ID data attribute to use as your user's unique identifier. Defaults to `'user'` (which usually contains the user's login name).
- * `name_key` - The data attribute containing user first and last name. Defaults to `'name'`.
- * `email_key` - The data attribute containing user email address. Defaults to `'email'`.
- * `nickname_key` - The data attribute containing user's nickname. Defaults to `'user'`.
- * `first_name_key` - The data attribute containing user first name. Defaults to `'first_name'`.
- * `last_name_key` - The data attribute containing user last name. Defaults to `'last_name'`.
- * `location_key` - The data attribute containing user location/address. Defaults to `'location'`.
- * `image_key` - The data attribute containing user image/picture. Defaults to `'image'`.
- * `phone_key` - The data attribute containing user contact phone number. Defaults to `'phone'`.
-
-## Migrating from OmniAuth 0.3
-
-Given the following OmniAuth 0.3 configuration:
-
-```ruby
-provider :CAS, cas_server: 'https://cas.example.com/cas/'
-```
-
-Your new settings should look similar to this:
-
-```ruby
-provider :cas3,
- host: 'cas.example.com',
- login_url: '/cas/login',
- service_validate_url: '/cas/p3/serviceValidate'
-```
-
-If you encounter problems wih SSL certificates you may want to set the `ca_path` parameter or activate `disable_ssl_verification` (not recommended).
-
-## Contributing
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Added some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
-
-## Thanks
-
-Special thanks go out to the following people
-
- * @dlindahl For the original work in porting this from OmniAuth 0.3
- * Phillip Aldridge (@iterateNZ) and JB Barth (@jbbarth) for helping out with Issue #3
- * Elber Ribeiro (@dynaum) for Ubuntu SSL configuration support
- * @rbq for README updates and OmniAuth 0.3 migration guide
-
-[old_omniauth_cas]: https://github.com/intridea/omniauth/blob/0-3-stable/oa-enterprise/lib/omniauth/strategies/cas.rb
-[document_up]: http://tduehr.github.com/omniauth-cas3/
-[net_http]: http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html
-[sso]: https://wiki.jasig.org/display/CASUM/Single+Sign+Out
diff --git a/vendor/gems/omniauth-cas3/Rakefile b/vendor/gems/omniauth-cas3/Rakefile
deleted file mode 100644
index af92638ba13..00000000000
--- a/vendor/gems/omniauth-cas3/Rakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env rake
-require 'bundler/gem_tasks'
-
-require 'rspec/core/rake_task'
-desc 'Default: run specs.'
-task default: :spec
-
-desc 'Run specs'
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.rspec_opts = '--require spec_helper --color --order rand'
-end
-
-task :test do
- fail %q{This application uses RSpec. Try running "rake spec"}
-end
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth-cas3.rb b/vendor/gems/omniauth-cas3/lib/omniauth-cas3.rb
deleted file mode 100644
index 58509b933c8..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth-cas3.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'omniauth/cas3'
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth/cas3.rb b/vendor/gems/omniauth-cas3/lib/omniauth/cas3.rb
deleted file mode 100644
index 80460aa1f31..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth/cas3.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require 'omniauth/cas3/version'
-require 'omniauth/strategies/cas3' \ No newline at end of file
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth/cas3/version.rb b/vendor/gems/omniauth-cas3/lib/omniauth/cas3/version.rb
deleted file mode 100644
index 9508dd69125..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth/cas3/version.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module Omniauth
- module Cas3
- VERSION = '1.1.4'
- end
-end
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3.rb b/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3.rb
deleted file mode 100644
index 441529b67d8..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-require 'omniauth'
-require 'addressable/uri'
-
-module OmniAuth
- module Strategies
- class CAS3
- include OmniAuth::Strategy
-
- # Custom Exceptions
- class MissingCASTicket < StandardError; end
- class InvalidCASTicket < StandardError; end
-
- autoload :ServiceTicketValidator, 'omniauth/strategies/cas3/service_ticket_validator'
- autoload :LogoutRequest, 'omniauth/strategies/cas3/logout_request'
-
- attr_accessor :raw_info
- alias_method :user_info, :raw_info
-
- option :name, :cas3 # Required property by OmniAuth::Strategy
-
- option :host, nil
- option :port, nil
- option :path, nil
- option :ssl, true
- option :service_validate_url, '/p3/serviceValidate'
- option :login_url, '/login'
- option :logout_url, '/logout'
- option :on_single_sign_out, Proc.new {}
- # A Proc or lambda that returns a Hash of additional user info to be
- # merged with the info returned by the CAS server.
- #
- # @param [Object] An instance of OmniAuth::Strategies::CAS for the current request
- # @param [String] The user's Service Ticket value
- # @param [Hash] The user info for the Service Ticket returned by the CAS server
- #
- # @return [Hash] Extra user info
- option :fetch_raw_info, Proc.new { Hash.new }
- # Make all the keys configurable with some defaults set here
- option :uid_field, 'user'
- option :name_key, 'name'
- option :email_key, 'email'
- option :nickname_key, 'user'
- option :first_name_key, 'first_name'
- option :last_name_key, 'last_name'
- option :location_key, 'location'
- option :image_key, 'image'
- option :phone_key, 'phone'
-
- # As required by https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema
- AuthHashSchemaKeys = %w{name email nickname first_name last_name location image phone}
- info do
- prune!({
- name: raw_info[options[:name_key].to_s],
- email: raw_info[options[:email_key].to_s],
- nickname: raw_info[options[:nickname_key].to_s],
- first_name: raw_info[options[:first_name_key].to_s],
- last_name: raw_info[options[:last_name_key].to_s],
- location: raw_info[options[:location_key].to_s],
- image: raw_info[options[:image_key].to_s],
- phone: raw_info[options[:phone_key].to_s]
- })
- end
-
- extra do
- hash = {}
-
- unless skip_info?
- hash = raw_info.dup
- hash.delete_if { |k, _v| AuthHashSchemaKeys.include?(k) }
- end
-
- prune! hash
- end
-
- uid do
- raw_info[options[:uid_field].to_s]
- end
-
- credentials do
- prune!({ ticket: @ticket })
- end
-
- def callback_phase
- if on_sso_path?
- single_sign_out_phase
- else
- @ticket = request.params['ticket']
- return fail!(:no_ticket, MissingCASTicket.new('No CAS Ticket')) unless @ticket
- fetch_raw_info(@ticket)
- return fail!(:invalid_ticket, InvalidCASTicket.new('Invalid CAS Ticket')) if raw_info.empty?
- super
- end
- end
-
- def request_phase
- service_url = append_params(callback_url, return_url)
-
- [
- 302,
- {
- 'Location' => login_url(service_url),
- 'Content-Type' => 'text/plain'
- },
- ["You are being redirected to CAS for sign-in."]
- ]
- end
-
- def on_sso_path?
- request.post? && request.params.has_key?('logoutRequest')
- end
-
- def single_sign_out_phase
- logout_request_service.new(self, request).call(options)
- end
-
- # Build a CAS host with protocol and port
- #
- #
- def cas_url
- extract_url if options['url']
- validate_cas_setup
- @cas_url ||= begin
- uri = Addressable::URI.new
- uri.host = options.host
- uri.scheme = options.ssl ? 'https' : 'http'
- uri.port = options.port
- uri.path = options.path
- uri.to_s
- end
- end
-
- def extract_url
- url = Addressable::URI.parse(options.delete('url'))
- options.merge!(
- 'host' => url.host,
- 'port' => url.port,
- 'path' => url.path,
- 'ssl' => url.scheme == 'https'
- )
- end
-
- def validate_cas_setup
- if options.host.nil? || options.login_url.nil?
- raise ArgumentError.new(":host and :login_url MUST be provided")
- end
- end
-
- # Build a service-validation URL from +service+ and +ticket+.
- # If +service+ has a ticket param, first remove it. URL-encode
- # +service+ and add it and the +ticket+ as paraemters to the
- # CAS serviceValidate URL.
- #
- # @param [String] service the service (a.k.a. return-to) URL
- # @param [String] ticket the ticket to validate
- #
- # @return [String] a URL like `http://cas.mycompany.com/serviceValidate?service=...&ticket=...`
- def service_validate_url(service_url, ticket)
- service_url = Addressable::URI.parse(service_url)
- service_url.query_values = service_url.query_values.tap { |qs| qs.delete('ticket') }
- cas_url + append_params(options.service_validate_url, {
- service: service_url.to_s,
- ticket: ticket
- })
- end
-
- # Build a CAS login URL from +service+.
- #
- # @param [String] service the service (a.k.a. return-to) URL
- #
- # @return [String] a URL like `http://cas.mycompany.com/login?service=...`
- def login_url(service)
- cas_url + append_params(options.login_url, { service: service })
- end
-
- # Adds URL-escaped +parameters+ to +base+.
- #
- # @param [String] base the base URL
- # @param [String] params the parameters to append to the URL
- #
- # @return [String] the new joined URL.
- def append_params(base, params)
- params = params.each { |k,v| v = Rack::Utils.escape(v) }
- Addressable::URI.parse(base).tap do |base_uri|
- base_uri.query_values = (base_uri.query_values || {}).merge(params)
- end.to_s
- end
-
- # Validate the Service Ticket
- # @return [Object] the validated Service Ticket
- def validate_service_ticket(ticket)
- ServiceTicketValidator.new(self, options, callback_url, ticket).call
- end
-
- private
-
- def fetch_raw_info(ticket)
- ticket_user_info = validate_service_ticket(ticket).user_info
- custom_user_info = options.fetch_raw_info.call(self, options, ticket, ticket_user_info)
- self.raw_info = ticket_user_info.merge(custom_user_info)
- end
-
- # Deletes Hash pairs with `nil` values.
- # From https://github.com/mkdynamic/omniauth-facebook/blob/972ed5e3456bcaed7df1f55efd7c05c216c8f48e/lib/omniauth/strategies/facebook.rb#L122-127
- def prune!(hash)
- hash.delete_if do |_, value|
- prune!(value) if value.is_a?(Hash)
- value.nil? || (value.respond_to?(:empty?) && value.empty?)
- end
- end
-
- def return_url
- # If the request already has a `url` parameter, then it will already be appended to the callback URL.
- if request.params && request.params['url']
- {}
- else
- { url: request.referer }
- end
- end
-
- def logout_request_service
- LogoutRequest
- end
- end
- end
-end
-
-OmniAuth.config.add_camelization 'cas3', 'CAS3'
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/logout_request.rb b/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/logout_request.rb
deleted file mode 100644
index 72978227edb..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/logout_request.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-module OmniAuth
- module Strategies
- class CAS3
- class LogoutRequest
- def initialize(strategy, request)
- @strategy, @request = strategy, request
- end
-
- def call(options = {})
- @options = options
-
- begin
- result = single_sign_out_callback.call(*logout_request)
- rescue StandardError => err
- return @strategy.fail! :logout_request, err
- else
- result = [200,{},'OK'] if result == true || result.nil?
- ensure
- return unless result
-
- # TODO: Why does ActionPack::Response return [status,headers,body]
- # when Rack::Response#new wants [body,status,headers]? Additionally,
- # why does Rack::Response differ in argument order from the usual
- # Rack-like [status,headers,body] array?
- return Rack::Response.new(result[2],result[0],result[1]).finish
- end
- end
-
- private
-
- def logout_request
- @logout_request ||= begin
- saml = parse_and_ensure_namespaces(@request.params['logoutRequest'])
- ns = saml.collect_namespaces
- name_id = saml.xpath('//saml:NameID', ns).text
- sess_idx = saml.xpath('//samlp:SessionIndex', ns).text
- inject_params(name_id:name_id, session_index:sess_idx)
- @request
- end
- end
-
- def parse_and_ensure_namespaces(logout_request_xml)
- doc = Nokogiri.parse(logout_request_xml)
- ns = doc.collect_namespaces
- if ns.include?('xmlns:samlp') && ns.include?('xmlns:saml')
- doc
- else
- add_namespaces(doc)
- end
- end
-
- def add_namespaces(logout_request_doc)
- root = logout_request_doc.root
- root.add_namespace('samlp', 'urn:oasis:names:tc:SAML:2.0:protocol')
- root.add_namespace('saml', 'urn:oasis:names:tc:SAML:2.0:assertion\\')
-
- # In order to add namespaces properly we need to re-parse the document
- Nokogiri.parse(logout_request_doc.to_s)
- end
-
- def inject_params(new_params)
- new_params.each do |key, val|
- @request.update_param(key, val)
- end
- end
-
- def single_sign_out_callback
- @options[:on_single_sign_out]
- end
- end
- end
- end
-end
diff --git a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/service_ticket_validator.rb b/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/service_ticket_validator.rb
deleted file mode 100644
index 4f9a61c5216..00000000000
--- a/vendor/gems/omniauth-cas3/lib/omniauth/strategies/cas3/service_ticket_validator.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-require 'net/http'
-require 'net/https'
-require 'nokogiri'
-
-module OmniAuth
- module Strategies
- class CAS3
- class ServiceTicketValidator
- VALIDATION_REQUEST_HEADERS = { 'Accept' => '*/*' }
-
- # Build a validator from a +configuration+, a
- # +return_to+ URL, and a +ticket+.
- #
- # @param [Hash] options the OmniAuth Strategy options
- # @param [String] return_to_url the URL of this CAS client service
- # @param [String] ticket the service ticket to validate
- def initialize(strategy, options, return_to_url, ticket)
- @options = options
- @uri = URI.parse(strategy.service_validate_url(return_to_url, ticket))
- end
-
- # Executes a network request to process the CAS Service Response
- def call
- @response_body = get_service_response_body
- @success_body = find_authentication_success(@response_body)
- self
- end
-
- # Request validation of the ticket from the CAS server's
- # serviceValidate (CAS 2.0) function.
- #
- # Swallows all XML parsing errors (and returns +nil+ in those cases).
- #
- # @return [Hash, nil] a user information hash if the response is valid; +nil+ otherwise.
- #
- # @raise any connection errors encountered.
- def user_info
- parse_user_info(@success_body)
- end
-
- private
-
- # turns an `<cas:authenticationSuccess>` node into a Hash;
- # returns nil if given nil
- def parse_user_info(node)
- return nil if node.nil?
- {}.tap do |hash|
- node.children.each do |e|
- node_name = e.name.sub(/^cas:/, '')
- unless e.kind_of?(Nokogiri::XML::Text) || node_name == 'proxies'
- # There are no child elements
- if e.element_children.count == 0
- hash[node_name] = e.content
- elsif e.element_children.count
- # JASIG style extra attributes
- if node_name == 'attributes'
- hash.merge!(parse_user_info(e))
- else
- hash[node_name] = [] if hash[node_name].nil?
- hash[node_name].push(parse_user_info(e))
- end
- end
- end
- end
- end
- end
-
- # finds an `<cas:authenticationSuccess>` node in
- # a `<cas:serviceResponse>` body if present; returns nil
- # if the passed body is nil or if there is no such node.
- def find_authentication_success(body)
- return nil if body.nil? || body == ''
- begin
- doc = Nokogiri::XML(body)
- begin
- doc.xpath('/cas:serviceResponse/cas:authenticationSuccess')
- rescue Nokogiri::XML::XPath::SyntaxError
- doc.xpath('/serviceResponse/authenticationSuccess')
- end
- rescue Nokogiri::XML::XPath::SyntaxError
- nil
- end
- end
-
- # retrieves the `<cas:serviceResponse>` XML from the CAS server
- def get_service_response_body
- result = ''
- http = Net::HTTP.new(@uri.host, @uri.port)
- http.use_ssl = @uri.port == 443 || @uri.instance_of?(URI::HTTPS)
- if http.use_ssl?
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @options.disable_ssl_verification?
- http.ca_path = @options.ca_path
- end
- http.start do |c|
- response = c.get "#{@uri.path}?#{@uri.query}", VALIDATION_REQUEST_HEADERS.dup
- result = response.body
- end
- result
- end
- end
- end
- end
-end
diff --git a/vendor/gems/omniauth-cas3/omniauth-cas3.gemspec b/vendor/gems/omniauth-cas3/omniauth-cas3.gemspec
deleted file mode 100644
index c976d85df99..00000000000
--- a/vendor/gems/omniauth-cas3/omniauth-cas3.gemspec
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/omniauth/cas3/version', __FILE__)
-
-Gem::Specification.new do |gem|
- gem.authors = ["Derek Lindahl, tduehr"]
- gem.email = ["td@matasano.com"]
- gem.summary = %q{CAS 3.0 Strategy for OmniAuth}
- gem.description = gem.summary
- gem.homepage = "https://github.com/tduehr/omniauth-cas3"
-
- gem.files = Dir.glob("lib/**/*.*")
- gem.test_files = Dir.glob("spec/**/**/*.*")
- gem.name = "omniauth-cas3"
- gem.require_paths = ["lib"]
- gem.version = Omniauth::Cas3::VERSION
-
- gem.add_dependency 'omniauth', '~> 2.0'
- gem.add_dependency 'nokogiri', '~> 1.7', '>= 1.7.1'
- gem.add_dependency 'addressable', '~> 2.3'
-
- gem.add_development_dependency 'rake', '~> 10.0'
- gem.add_development_dependency 'webmock'
- gem.add_development_dependency 'rspec', '>= 3.4'
- gem.add_development_dependency 'rack-test', '~> 0.6'
-
- gem.add_development_dependency 'awesome_print'
-end
diff --git a/vendor/gems/omniauth-cas3/spec/fixtures/cas_failure.xml b/vendor/gems/omniauth-cas3/spec/fixtures/cas_failure.xml
deleted file mode 100644
index f8238a18014..00000000000
--- a/vendor/gems/omniauth-cas3/spec/fixtures/cas_failure.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
- <cas:authenticationFailure>
- </cas:authenticationFailure>
-</cas:serviceResponse>
diff --git a/vendor/gems/omniauth-cas3/spec/fixtures/cas_success.xml b/vendor/gems/omniauth-cas3/spec/fixtures/cas_success.xml
deleted file mode 100644
index 18904f64b35..00000000000
--- a/vendor/gems/omniauth-cas3/spec/fixtures/cas_success.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
- <cas:authenticationSuccess>
- <cas:user>psegel</cas:user>
- <cas:employeeid>54</cas:employeeid>
- <cas:first_name>P. Segel</cas:first_name>
- <cas:first_name>Peter</cas:first_name>
- <cas:last_name>Segel</cas:last_name>
- <cas:email>psegel@intridea.com</cas:email>
- <cas:location>Washington, D.C.</cas:location>
- <cas:image>/images/user.jpg</cas:image>
- <cas:phone>555-555-5555</cas:phone>
- <cas:hire_date>2004-07-13</cas:hire_date>
- </cas:authenticationSuccess>
-</cas:serviceResponse>
diff --git a/vendor/gems/omniauth-cas3/spec/fixtures/cas_success_jasig.xml b/vendor/gems/omniauth-cas3/spec/fixtures/cas_success_jasig.xml
deleted file mode 100644
index 72f58edfb46..00000000000
--- a/vendor/gems/omniauth-cas3/spec/fixtures/cas_success_jasig.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
- <cas:authenticationSuccess>
- <cas:user>psegel</cas:user>
- <cas:attributes>
- <cas:employeeid>54</cas:employeeid>
- <cas:first_name>P. Segel</cas:first_name>
- <cas:first_name>Peter</cas:first_name>
- <cas:last_name>Segel</cas:last_name>
- <cas:email>psegel@intridea.com</cas:email>
- <cas:location>Washington, D.C.</cas:location>
- <cas:image>/images/user.jpg</cas:image>
- <cas:phone>555-555-5555</cas:phone>
- <cas:hire_date>2004-07-13</cas:hire_date>
- </cas:attributes>
- </cas:authenticationSuccess>
-</cas:serviceResponse>
diff --git a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/logout_request_spec.rb b/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/logout_request_spec.rb
deleted file mode 100644
index 4834347fa03..00000000000
--- a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/logout_request_spec.rb
+++ /dev/null
@@ -1,127 +0,0 @@
-require 'spec_helper'
-
-describe OmniAuth::Strategies::CAS3::LogoutRequest do
- let(:strategy) { double('strategy') }
- let(:env) do
- { 'rack.input' => StringIO.new('','r') }
- end
- let(:request) { double('request', params:params, env:env) }
- let(:params) { { 'url' => url, 'logoutRequest' => logoutRequest } }
- let(:url) { 'http://notes.dev/signed_in' }
- let(:logoutRequest) do
- %Q[
- <samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion\" ID="123abc-1234-ab12-cd34-1234abcd" Version="2.0" IssueInstant="#{Time.now.to_s}">
- <saml:NameID>@NOT_USED@</saml:NameID>
- <samlp:SessionIndex>ST-123456-123abc456def</samlp:SessionIndex>
- </samlp:LogoutRequest>
- ]
- end
-
- subject { described_class.new(strategy, request).call(options) }
-
- describe 'SAML attributes' do
- let(:callback) { Proc.new{} }
- let(:options) do
- { on_single_sign_out: callback }
- end
-
- before do
- @rack_input = nil
- allow(callback).to receive(:call) do |req|
- @rack_input = req.env['rack.input'].read
- true
- end
- end
-
- it 'are parsed and injected into the Rack Request parameters', :skip => true do
- subject
- expect(@rack_input).to eq 'name_id=%40NOT_USED%40&session_index=ST-123456-123abc456def'
- end
-
- it 'are parsed and injected even if saml defined inside NameID', :skip => true do
- request.params['logoutRequest'] =
- %Q[
- <samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="foobarbaz" Version="2.0" IssueInstant="2014-10-19T17:13:50Z">
- <saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@NOT_USED@</saml:NameID>
- <samlp:SessionIndex>ST-foo-bar</samlp:SessionIndex>
- </samlp:LogoutRequest>
- ]
- subject
- expect(@rack_input).to eq 'name_id=%40NOT_USED%40&session_index=ST-foo-bar'
- end
-
- it 'are parsed and injected even if saml and samlp namespaces not defined', :skip => true do
- request.params['logoutRequest'] =
- %Q[
- <samlp:LogoutRequest ID="123abc-1234-ab12-cd34-1234abcd" Version="2.0" IssueInstant="#{Time.now.to_s}">
- <saml:NameID>@NOT_USED@</saml:NameID>
- <samlp:SessionIndex>ST-789000-456def789ghi</samlp:SessionIndex>
- </samlp:LogoutRequest>
- ]
- subject
- expect(@rack_input).to eq 'name_id=%40NOT_USED%40&session_index=ST-789000-456def789ghi'
- end
-
- context 'that raise when parsed' do
- let(:env) { { 'rack.input' => nil } }
-
- before do
- allow(strategy).to receive(:fail!)
- subject
- expect(strategy).to have_received(:fail!)
- end
-
- it 'responds with an error', skip: true do
- expect(strategy).to have_received(:fail!)
- end
- end
- end
-
- describe 'with a configured callback' do
- let(:options) do
- { on_single_sign_out: callback }
- end
-
- context 'that returns TRUE' do
- let(:callback) { Proc.new{true} }
-
- it 'responds with OK', skip: true do
- expect(subject[0]).to eq 200
- expect(subject[2].body).to eq ['OK']
- end
- end
-
- context 'that returns Nil' do
- let(:callback) { Proc.new{} }
-
- it 'responds with OK', skip: true do
- expect(subject[0]).to eq 200
- expect(subject[2].body).to eq ['OK']
- end
- end
-
- context 'that returns a tuple' do
- let(:callback) { Proc.new{ [400,{},'Bad Request'] } }
-
- it 'responds with OK', skip: true do
- expect(subject[0]).to eq 400
- expect(subject[2].body).to eq ['Bad Request']
- end
- end
-
- context 'that raises an error' do
- let(:exception) { RuntimeError.new('error' )}
- let(:callback) { Proc.new{raise exception} }
-
- before do
- allow(strategy).to receive(:fail!)
- subject
- end
-
- it 'responds with an error', skip: true do
- expect(strategy).to have_received(:fail!)
- .with(:logout_request, exception)
- end
- end
- end
-end
diff --git a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/service_ticket_validator_spec.rb b/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/service_ticket_validator_spec.rb
deleted file mode 100644
index b031d1d68fc..00000000000
--- a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3/service_ticket_validator_spec.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-require 'spec_helper'
-
-describe OmniAuth::Strategies::CAS3::ServiceTicketValidator do
- let(:strategy) do
- double('strategy',
- service_validate_url: 'https://example.org/serviceValidate'
- )
- end
- let(:provider_options) do
- double('provider_options',
- disable_ssl_verification?: false,
- ca_path: '/etc/ssl/certsZOMG'
- )
- end
- let(:validator) do
- OmniAuth::Strategies::CAS3::ServiceTicketValidator.new( strategy, provider_options, '/foo', nil )
- end
-
- describe '#call' do
- before do
- stub_request(:get, 'https://example.org/serviceValidate?')
- .to_return(status: 200, body: '')
- end
-
- subject { validator.call }
-
- it 'returns itself' do
- expect(subject).to eq validator
- end
-
- it 'uses the configured CA path' do
- subject
- expect(provider_options).to have_received :ca_path
- end
- end
-
- describe '#user_info' do
- let(:ok_fixture) do
- File.expand_path(File.join(File.dirname(__FILE__), '../../../fixtures/cas_success.xml'))
- end
- let(:service_response) { File.read(ok_fixture) }
-
- before do
- stub_request(:get, 'https://example.org/serviceValidate?')
- .to_return(status: 200, body:service_response)
- validator.call
- end
-
- subject { validator.user_info }
-
- it 'parses user info from the response' do
- expect(subject).to include 'user' => 'psegel'
- end
- end
-end
diff --git a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3_spec.rb b/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3_spec.rb
deleted file mode 100644
index f434d711f02..00000000000
--- a/vendor/gems/omniauth-cas3/spec/omniauth/strategies/cas3_spec.rb
+++ /dev/null
@@ -1,266 +0,0 @@
-require 'spec_helper'
-require 'securerandom'
-
-describe OmniAuth::Strategies::CAS3, type: :strategy do
- include Rack::Test::Methods
-
- let(:my_cas_provider) { Class.new(OmniAuth::Strategies::CAS3) }
- before do
- stub_const 'MyCasProvider', my_cas_provider
- end
- let(:app) do
- Rack::Builder.new {
- use OmniAuth::Test::PhonySession
- use MyCasProvider, name: :cas3, host: 'cas.example.org', ssl: false, port: 8080, uid_field: :employeeid
- run lambda { |env| [404, {'Content-Type' => 'text/plain'}, [env.key?('omniauth.auth').to_s]] }
- }.to_app
- end
-
- let(:csrf_token) { SecureRandom.base64(32) }
- let(:base_env) { { 'rack.session' => { csrf: csrf_token }, 'rack.input' => StringIO.new("authenticity_token=#{escaped_token}") } }
- let(:post_env) { make_env('/auth/cas3', base_env.merge(request_env)) }
- let(:escaped_token) { URI.encode_www_form_component(csrf_token, Encoding::UTF_8) }
-
- def make_env(path = '/auth/cas3', props = {})
- {
- 'REQUEST_METHOD' => 'POST',
- 'PATH_INFO' => path,
- 'rack.session' => {},
- 'rack.input' => StringIO.new('test=true')
- }.merge(props)
- end
-
- # TODO: Verify that these are even useful tests
- shared_examples_for 'a CAS redirect response' do
- let(:redirect_params) { 'service=' + Rack::Utils.escape("http://example.org/auth/cas3/callback?url=#{Rack::Utils.escape(return_url)}") }
-
- before { post url, nil, post_env }
-
- subject { last_response }
-
- it { should be_redirect }
-
- it 'redirects to the CAS server' do
- expect(subject.status).to eq(302)
- expect(subject.headers).to include 'Location' => "http://cas.example.org:8080/login?#{redirect_params}"
- end
- end
-
- describe '#cas_url' do
- let(:params) { Hash.new }
- let(:provider) { MyCasProvider.new(nil, params) }
-
- subject { provider.cas_url }
-
- it 'raises an ArgumentError' do
- expect{subject}.to raise_error ArgumentError, %r{:host and :login_url MUST be provided}
- end
-
- context 'with an explicit :url option' do
- let(:url) { 'https://example.org:8080/my_cas' }
- let(:params) { super().merge url:url }
-
- before { subject }
-
- it { should eq url }
-
- it 'parses the URL into it the appropriate strategy options' do
- expect(provider.options).to include ssl:true
- expect(provider.options).to include host:'example.org'
- expect(provider.options).to include port:8080
- expect(provider.options).to include path:'/my_cas'
- end
- end
-
- context 'with explicit URL component' do
- let(:params) { super().merge host:'example.org', port:1234, ssl:true, path:'/a/path' }
-
- before { subject }
-
- it { should eq 'https://example.org:1234/a/path' }
-
- it 'parses the URL into it the appropriate strategy options' do
- expect(provider.options).to include ssl:true
- expect(provider.options).to include host:'example.org'
- expect(provider.options).to include port:1234
- expect(provider.options).to include path:'/a/path'
- end
- end
- end
-
- describe 'defaults' do
- subject { MyCasProvider.default_options.to_hash }
-
- it { should include('ssl' => true) }
- end
-
- describe 'POST /auth/cas3' do
- let(:return_url) { 'http://myapp.com/admin/foo' }
-
- context 'with a referer' do
- let(:url) { '/auth/cas3' }
-
- let(:request_env) { { 'HTTP_REFERER' => return_url } }
-
- it_behaves_like 'a CAS redirect response'
- end
-
- context 'with an explicit return URL' do
- let(:url) { "/auth/cas3?url=#{return_url}" }
-
- let(:request_env) { {} }
-
- it_behaves_like 'a CAS redirect response'
- end
- end
-
- describe 'GET /auth/cas3/callback' do
- context 'without a ticket' do
- before { get '/auth/cas3/callback' }
-
- subject { last_response }
-
- it { should be_redirect }
-
- it 'redirects with a failure message' do
- expect(subject.headers).to include 'Location' => '/auth/failure?message=no_ticket&strategy=cas3'
- end
- end
-
- context 'with an invalid ticket' do
- before do
- stub_request(:get, /^http:\/\/cas.example.org:8080?\/p3\/serviceValidate\?([^&]+&)?ticket=9391d/).
- to_return( body: File.read('spec/fixtures/cas_failure.xml') )
- get '/auth/cas3/callback?ticket=9391d'
- end
-
- subject { last_response }
-
- it { should be_redirect }
-
- it 'redirects with a failure message' do
- expect(subject.headers).to include 'Location' => '/auth/failure?message=invalid_ticket&strategy=cas3'
- end
- end
-
- describe 'with a valid ticket' do
- shared_examples :successful_validation do
- before do
- stub_request(:get, /^http:\/\/cas.example.org:8080?\/p3\/serviceValidate\?([^&]+&)?ticket=593af/)
- .with { |request| @request_uri = request.uri.to_s }
- .to_return( body: File.read("spec/fixtures/#{xml_file_name}") )
-
- get "/auth/cas3/callback?ticket=593af&url=#{return_url}"
- end
-
- it 'strips the ticket parameter from the callback URL' do
- expect(@request_uri.scan('ticket=').size).to eq 1
- end
-
- it 'properly encodes the service URL' do
- expect(WebMock).to have_requested(:get, 'http://cas.example.org:8080/p3/serviceValidate')
- .with(query: {
- ticket: '593af',
- service: 'http://example.org/auth/cas3/callback?url=' + Rack::Utils.escape('http://127.0.0.10/?some=parameter')
- })
- end
-
- context "request.env['omniauth.auth']" do
- subject { last_request.env['omniauth.auth'] }
-
- it { should be_kind_of Hash }
-
- it 'identifes the provider' do
- expect(subject.provider).to eq :cas3
- end
-
- it 'returns the UID of the user' do
- expect(subject.uid).to eq '54'
- end
-
- context 'the info hash' do
- subject { last_request.env['omniauth.auth']['info'] }
-
- it 'includes user info attributes' do
- expect(subject.name).to eq 'Peter Segel'
- expect(subject.first_name).to eq 'Peter'
- expect(subject.last_name).to eq 'Segel'
- expect(subject.nickname).to eq 'psegel'
- expect(subject.email).to eq 'psegel@intridea.com'
- expect(subject.location).to eq 'Washington, D.C.'
- expect(subject.image).to eq '/images/user.jpg'
- expect(subject.phone).to eq '555-555-5555'
- end
- end
-
- context 'the extra hash' do
- subject { last_request.env['omniauth.auth']['extra'] }
-
- it 'includes additional user attributes' do
- expect(subject.user).to eq 'psegel'
- expect(subject.employeeid).to eq '54'
- expect(subject.hire_date).to eq '2004-07-13'
- end
- end
-
- context 'the credentials hash' do
- subject { last_request.env['omniauth.auth']['credentials'] }
-
- it 'has a ticket value' do
- expect(subject.ticket).to eq '593af'
- end
- end
- end
-
- it 'calls through to the master app' do
- expect(last_response.body).to eq 'true'
- end
- end
-
- let(:return_url) { 'http://127.0.0.10/?some=parameter' }
-
- context 'with JASIG flavored XML' do
- let(:xml_file_name) { 'cas_success_jasig.xml' }
-
- it_behaves_like :successful_validation
- end
-
- context 'with classic XML' do
- let(:xml_file_name) { 'cas_success.xml' }
-
- it_behaves_like :successful_validation
- end
- end
- end
-
- describe 'POST /auth/cas3/callback' do
- describe 'with a Single Sign-Out logoutRequest' do
- let(:logoutRequest) do
- %Q[
- <samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion\" ID="123abc-1234-ab12-cd34-1234abcd" Version="2.0" IssueInstant="#{Time.now.to_s}">
- <saml:NameID>@NOT_USED@</saml:NameID>
- <samlp:SessionIndex>ST-123456-123abc456def</samlp:SessionIndex>
- </samlp:LogoutRequest>
- ]
- end
-
- let(:logout_request) { double('logout_request', call:[200,{},'OK']) }
-
- subject do
- post 'auth/cas3/callback', logoutRequest:logoutRequest
- end
-
- before do
- allow_any_instance_of(MyCasProvider)
- .to receive(:logout_request_service)
- .and_return double('LogoutRequest', new:logout_request)
-
- subject
- end
-
- it 'initializes a LogoutRequest' do
- expect(logout_request).to have_received :call
- end
- end
- end
-end
diff --git a/vendor/gems/omniauth-cas3/spec/spec_helper.rb b/vendor/gems/omniauth-cas3/spec/spec_helper.rb
deleted file mode 100644
index 75231268ff3..00000000000
--- a/vendor/gems/omniauth-cas3/spec/spec_helper.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require 'bundler/setup'
-require 'awesome_print'
-
-RSpec.configure do |c|
- c.filter_run focus: true
- c.run_all_when_everything_filtered = true
-end
-
-require 'rack/test'
-require 'webmock/rspec'
-require 'omniauth-cas3'
-
-OmniAuth.config.logger = Logger.new( '/dev/null' )
diff --git a/vendor/gems/omniauth-salesforce/README.md b/vendor/gems/omniauth-salesforce/README.md
index df59e99bc55..a306fafa936 100755
--- a/vendor/gems/omniauth-salesforce/README.md
+++ b/vendor/gems/omniauth-salesforce/README.md
@@ -13,13 +13,7 @@ should be used in favor of this vendored fork.
[OmniAuth](https://github.com/intridea/omniauth) Strategy for [salesforce.com](salesforce.com).
-Note: This is a fork of the [original](https://github.com/richardvanhook/omniauth-salesforce) project and is now the main repository for the omniauth-salesforce gem.
-
-## See it in action
-
-[http://omniauth-salesforce-example.herokuapp.com](http://omniauth-salesforce-example.herokuapp.com)
-
-[Source for above app](https://github.com/richardvanhook/omniauth-salesforce-example)
+Note: This is a fork of the [original](https://github.com/richardvanhook/omniauth-salesforce) project and is now the main repository for the omniauth-salesforce gem for consumption within GitLab.
## Basic Usage
diff --git a/vendor/gems/sidekiq-reliable-fetch/.gitignore b/vendor/gems/sidekiq-reliable-fetch/.gitignore
new file mode 100644
index 00000000000..f155298bb0a
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/.gitignore
@@ -0,0 +1,3 @@
+*.gem
+coverage
+.DS_Store
diff --git a/vendor/gems/sidekiq-reliable-fetch/.gitlab-ci.yml b/vendor/gems/sidekiq-reliable-fetch/.gitlab-ci.yml
new file mode 100644
index 00000000000..b87a454bccc
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/.gitlab-ci.yml
@@ -0,0 +1,77 @@
+workflow:
+ rules:
+ - if: $CI_MERGE_REQUEST_ID
+
+default:
+ image: ruby:3.0
+
+before_script:
+ - cd vendor/gems/sidekiq-reliable-fetch
+ - ruby -v
+ - which ruby
+ - gem install bundler
+ - bundle config set --local path 'vendor' # Install dependencies into ./vendor/ruby
+ - bundle config set with 'development' # This is set to 'deployment' otherwise
+ - bundle config set --local frozen 'true' # Disallow Gemfile.lock changes on CI
+ - bundle config # Show bundler configuration
+ - bundle install --jobs $(nproc) "${FLAGS[@]}"
+
+variables:
+ REDIS_URL: "redis://redis"
+
+rspec:
+ stage: test
+ coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
+ script:
+ - bundle exec rspec
+ services:
+ - redis:alpine
+ artifacts:
+ expire_in: 31d
+ when: always
+ paths:
+ - coverage/
+
+.integration:
+ stage: test
+ script:
+ - cd tests/reliability
+ - bundle exec ruby reliability_test.rb
+ services:
+ - redis:alpine
+
+integration_semi:
+ extends: .integration
+ variables:
+ JOB_FETCHER: semi
+
+integration_reliable:
+ extends: .integration
+ variables:
+ JOB_FETCHER: reliable
+
+integration_basic:
+ extends: .integration
+ allow_failure: yes
+ variables:
+ JOB_FETCHER: basic
+
+kill_interruption:
+ stage: test
+ script:
+ - cd tests/interruption
+ - bundle exec ruby test_kill_signal.rb
+ services:
+ - redis:alpine
+
+term_interruption:
+ stage: test
+ script:
+ - cd tests/interruption
+ - bundle exec ruby test_term_signal.rb
+ services:
+ - redis:alpine
+
+# rubocop:
+# script:
+# - bundle exec rubocop
diff --git a/vendor/gems/sidekiq-reliable-fetch/.rspec b/vendor/gems/sidekiq-reliable-fetch/.rspec
new file mode 100644
index 00000000000..c99d2e7396e
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/.rspec
@@ -0,0 +1 @@
+--require spec_helper
diff --git a/vendor/gems/sidekiq-reliable-fetch/CONTRIBUTING.md b/vendor/gems/sidekiq-reliable-fetch/CONTRIBUTING.md
new file mode 100644
index 00000000000..e9c2788bebe
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/CONTRIBUTING.md
@@ -0,0 +1,41 @@
+## Developer Certificate of Origin and License
+
+By contributing to GitLab B.V., you accept and agree to the following terms and
+conditions for your present and future contributions submitted to GitLab B.V.
+Except for the license granted herein to GitLab B.V. and recipients of software
+distributed by GitLab B.V., you reserve all right, title, and interest in and to
+your Contributions.
+
+All contributions are subject to the Developer Certificate of Origin and license set out at [docs.gitlab.com/ce/legal/developer_certificate_of_origin](https://docs.gitlab.com/ce/legal/developer_certificate_of_origin).
+
+_This notice should stay as the first item in the CONTRIBUTING.md file._
+
+## Code of conduct
+
+As contributors and maintainers of this project, we pledge to respect all people
+who contribute through reporting issues, posting feature requests, updating
+documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free
+experience for everyone, regardless of level of experience, gender, gender
+identity and expression, sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, or religion.
+
+Examples of unacceptable behavior by participants include the use of sexual
+language or imagery, derogatory comments or personal attacks, trolling, public
+or private harassment, insults, or other unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct. Project maintainers who do not follow the
+Code of Conduct may be removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior can be
+reported by emailing contact@gitlab.com.
+
+This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.1.0,
+available at [https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/).
+
diff --git a/vendor/gems/sidekiq-reliable-fetch/Gemfile b/vendor/gems/sidekiq-reliable-fetch/Gemfile
new file mode 100644
index 00000000000..3bed294f56f
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/Gemfile
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+source "https://rubygems.org"
+
+git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
+
+gemspec
+
+group :test do
+ gem "rspec", '~> 3'
+ gem "pry"
+ gem 'simplecov', require: false
+ gem 'stub_env', '~> 1.0'
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/Gemfile.lock b/vendor/gems/sidekiq-reliable-fetch/Gemfile.lock
new file mode 100644
index 00000000000..57767ee8c3b
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/Gemfile.lock
@@ -0,0 +1,58 @@
+PATH
+ remote: .
+ specs:
+ gitlab-sidekiq-fetcher (0.9.0)
+ json (>= 2.5)
+ sidekiq (~> 6.1)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ coderay (1.1.2)
+ connection_pool (2.4.0)
+ diff-lcs (1.3)
+ docile (1.3.1)
+ json (2.5.1)
+ method_source (0.9.0)
+ pry (0.11.3)
+ coderay (~> 1.1.0)
+ method_source (~> 0.9.0)
+ rack (2.2.6.4)
+ redis (4.8.1)
+ rspec (3.8.0)
+ rspec-core (~> 3.8.0)
+ rspec-expectations (~> 3.8.0)
+ rspec-mocks (~> 3.8.0)
+ rspec-core (3.8.0)
+ rspec-support (~> 3.8.0)
+ rspec-expectations (3.8.1)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.8.0)
+ rspec-mocks (3.8.0)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.8.0)
+ rspec-support (3.8.0)
+ sidekiq (6.5.8)
+ connection_pool (>= 2.2.5, < 3)
+ rack (~> 2.0)
+ redis (>= 4.5.0, < 5)
+ simplecov (0.16.1)
+ docile (~> 1.1)
+ json (>= 1.8, < 3)
+ simplecov-html (~> 0.10.0)
+ simplecov-html (0.10.2)
+ stub_env (1.0.4)
+ rspec (>= 2.0, < 4.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ gitlab-sidekiq-fetcher!
+ pry
+ rspec (~> 3)
+ simplecov
+ stub_env (~> 1.0)
+
+BUNDLED WITH
+ 2.3.24
diff --git a/vendor/gems/sidekiq-reliable-fetch/LICENSE b/vendor/gems/sidekiq-reliable-fetch/LICENSE
new file mode 100644
index 00000000000..65c5ca88a67
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/vendor/gems/sidekiq-reliable-fetch/README.md b/vendor/gems/sidekiq-reliable-fetch/README.md
new file mode 100644
index 00000000000..4c7029e3955
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/README.md
@@ -0,0 +1,57 @@
+gitlab-sidekiq-fetcher
+======================
+
+`gitlab-sidekiq-fetcher` is an extension to Sidekiq that adds support for reliable
+fetches from Redis.
+
+It's based on https://github.com/TEA-ebook/sidekiq-reliable-fetch.
+
+**IMPORTANT NOTE:** Since version `0.7.0` this gem works only with `sidekiq >= 6.1` (which introduced Fetch API breaking changes). Please use version `~> 0.5` if you use older version of the `sidekiq` .
+
+**UPGRADE NOTE:** If upgrading from 0.7.0, strongly consider a full deployed step on 0.7.1 before 0.8.0; that fixes a bug in the queue name validation that will hit if sidekiq nodes running 0.7.0 see working queues named by 0.8.0. See https://gitlab.com/gitlab-org/sidekiq-reliable-fetch/-/merge_requests/22
+
+There are two strategies implemented: [Reliable fetch](http://redis.io/commands/rpoplpush#pattern-reliable-queue) using `rpoplpush` command and
+semi-reliable fetch that uses regular `brpop` and `lpush` to pick the job and put it to working queue. The main benefit of "Reliable" strategy is that `rpoplpush` is atomic, eliminating a race condition in which jobs can be lost.
+However, it comes at a cost because `rpoplpush` can't watch multiple lists at the same time so we need to iterate over the entire queue list which significantly increases pressure on Redis when there are more than a few queues. The "semi-reliable" strategy is much more reliable than the default Sidekiq fetcher, though. Compared to the reliable fetch strategy, it does not increase pressure on Redis significantly.
+
+### Interruption handling
+
+Sidekiq expects any job to report succcess or to fail. In the last case, Sidekiq puts `retry_count` counter
+into the job and keeps to re-run the job until the counter reched the maximum allowed value. When the job has
+not been given a chance to finish its work(to report success or fail), for example, when it was killed forcibly or when the job was requeued, after receiving TERM signal, the standard retry mechanisme does not get into the game and the job will be retried indefinatelly. This is why Reliable fetcher maintains a special counter `interrupted_count`
+which is used to limit the amount of such retries. In both cases, Reliable Fetcher increments counter `interrupted_count` and rejects the job from running again when the counter exceeds `max_retries_after_interruption` times (default: 3 times).
+Such a job will be put to `interrupted` queue. This queue mostly behaves as Sidekiq Dead queue so it only stores a limited amount of jobs for a limited term. Same as for Dead queue, all the limits are configurable via `interrupted_max_jobs` (default: 10_000) and `interrupted_timeout_in_seconds` (default: 3 months) Sidekiq option keys.
+
+You can also disable special handling of interrupted jobs by setting `max_retries_after_interruption` into `-1`.
+In this case, interrupted jobs will be run without any limits from Reliable Fetcher and they won't be put into Interrupted queue.
+
+
+## Installation
+
+This gem is vendored in the GitLab Rails application and new versions are not published to RubyGems.
+
+## Configuration
+
+Enable reliable fetches by calling this gem from your Sidekiq configuration:
+
+```ruby
+Sidekiq.configure_server do |config|
+ Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
+
+ # …
+end
+```
+
+There is an additional parameter `config[:semi_reliable_fetch]` you can use to switch between two strategies:
+
+```ruby
+Sidekiq.configure_server do |config|
+ config[:semi_reliable_fetch] = true # Default value is false
+
+ Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
+end
+```
+
+## License
+
+LGPL-3.0, see the LICENSE file.
diff --git a/vendor/gems/sidekiq-reliable-fetch/gitlab-sidekiq-fetcher.gemspec b/vendor/gems/sidekiq-reliable-fetch/gitlab-sidekiq-fetcher.gemspec
new file mode 100644
index 00000000000..0d0e5e3f6fa
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/gitlab-sidekiq-fetcher.gemspec
@@ -0,0 +1,15 @@
+Gem::Specification.new do |s|
+ s.name = 'gitlab-sidekiq-fetcher'
+ s.version = '0.9.0'
+ s.authors = ['TEA', 'GitLab']
+ s.email = 'valery@gitlab.com'
+ s.license = 'LGPL-3.0'
+ s.homepage = 'https://gitlab.com/gitlab-org/gitlab/-/tree/master/vendor/gems/sidekiq-reliable-fetch'
+ s.summary = 'Reliable fetch extension for Sidekiq'
+ s.description = 'Redis reliable queue pattern implemented in Sidekiq'
+ s.require_paths = ['lib']
+ s.files = Dir.glob('lib/**/*.*')
+ s.test_files = Dir.glob('{spec,tests}/**/*.*')
+ s.add_dependency 'sidekiq', '~> 6.1'
+ s.add_runtime_dependency 'json', '>= 2.5'
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq-reliable-fetch.rb b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq-reliable-fetch.rb
new file mode 100644
index 00000000000..df44fabaedd
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq-reliable-fetch.rb
@@ -0,0 +1,6 @@
+require 'sidekiq'
+require 'sidekiq/api'
+
+require_relative 'sidekiq/base_reliable_fetch'
+require_relative 'sidekiq/reliable_fetch'
+require_relative 'sidekiq/semi_reliable_fetch'
diff --git a/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/base_reliable_fetch.rb b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/base_reliable_fetch.rb
new file mode 100644
index 00000000000..e9c9f050982
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/base_reliable_fetch.rb
@@ -0,0 +1,269 @@
+# frozen_string_literal: true
+
+require_relative 'interrupted_set'
+
+module Sidekiq
+ class BaseReliableFetch
+ DEFAULT_CLEANUP_INTERVAL = 60 * 60 # 1 hour
+ HEARTBEAT_INTERVAL = 20 # seconds
+ HEARTBEAT_LIFESPAN = 60 # seconds
+ HEARTBEAT_RETRY_DELAY = 1 # seconds
+ WORKING_QUEUE_PREFIX = 'working'
+
+ # Defines how often we try to take a lease to not flood our
+ # Redis server with SET requests
+ DEFAULT_LEASE_INTERVAL = 2 * 60 # seconds
+ LEASE_KEY = 'reliable-fetcher-cleanup-lock'
+
+ # Defines the COUNT parameter that will be passed to Redis SCAN command
+ SCAN_COUNT = 1000
+
+ # How much time a job can be interrupted
+ DEFAULT_MAX_RETRIES_AFTER_INTERRUPTION = 3
+
+ # Regexes for matching working queue keys
+ WORKING_QUEUE_REGEX = /#{WORKING_QUEUE_PREFIX}:(queue:.*):([^:]*:[0-9]*:[0-9a-f]*)\z/.freeze
+ LEGACY_WORKING_QUEUE_REGEX = /#{WORKING_QUEUE_PREFIX}:(queue:.*):([^:]*:[0-9]*)\z/.freeze
+
+ UnitOfWork = Struct.new(:queue, :job) do
+ def acknowledge
+ Sidekiq.redis { |conn| conn.lrem(Sidekiq::BaseReliableFetch.working_queue_name(queue), 1, job) }
+ end
+
+ def queue_name
+ queue.sub(/.*queue:/, '')
+ end
+
+ def requeue
+ Sidekiq.redis do |conn|
+ conn.multi do |multi|
+ multi.lpush(queue, job)
+ multi.lrem(Sidekiq::BaseReliableFetch.working_queue_name(queue), 1, job)
+ end
+ end
+ end
+ end
+
+ def self.setup_reliable_fetch!(config)
+ config = config.options unless config.respond_to?(:[])
+
+ fetch_strategy = if config[:semi_reliable_fetch]
+ Sidekiq::SemiReliableFetch
+ else
+ Sidekiq::ReliableFetch
+ end
+
+ config[:fetch] = fetch_strategy.new(config)
+
+ Sidekiq.logger.info('GitLab reliable fetch activated!')
+
+ start_heartbeat_thread
+ end
+
+ def self.start_heartbeat_thread
+ Thread.new do
+ loop do
+ begin
+ heartbeat
+
+ sleep HEARTBEAT_INTERVAL
+ rescue => e
+ Sidekiq.logger.error("Heartbeat thread error: #{e.message}")
+
+ sleep HEARTBEAT_RETRY_DELAY
+ end
+ end
+ end
+ end
+
+ def self.hostname
+ Socket.gethostname
+ end
+
+ def self.process_nonce
+ @@process_nonce ||= SecureRandom.hex(6)
+ end
+
+ def self.identity
+ @@identity ||= "#{hostname}:#{$$}:#{process_nonce}"
+ end
+
+ def self.heartbeat
+ Sidekiq.redis do |conn|
+ conn.set(heartbeat_key(identity), 1, ex: HEARTBEAT_LIFESPAN)
+ end
+
+ Sidekiq.logger.debug("Heartbeat for #{identity}")
+ end
+
+ def self.worker_dead?(identity, conn)
+ !conn.get(heartbeat_key(identity))
+ end
+
+ def self.heartbeat_key(identity)
+ "reliable-fetcher-heartbeat-#{identity.gsub(':', '-')}"
+ end
+
+ def self.working_queue_name(queue)
+ "#{WORKING_QUEUE_PREFIX}:#{queue}:#{identity}"
+ end
+
+ attr_reader :cleanup_interval, :last_try_to_take_lease_at, :lease_interval,
+ :queues, :use_semi_reliable_fetch,
+ :strictly_ordered_queues
+
+ def initialize(options)
+ raise ArgumentError, 'missing queue list' unless options[:queues]
+
+ @config = options
+ @interrupted_set = Sidekiq::InterruptedSet.new
+ @cleanup_interval = options.fetch(:cleanup_interval, DEFAULT_CLEANUP_INTERVAL)
+ @lease_interval = options.fetch(:lease_interval, DEFAULT_LEASE_INTERVAL)
+ @last_try_to_take_lease_at = 0
+ @strictly_ordered_queues = !!options[:strict]
+ @queues = options[:queues].map { |q| "queue:#{q}" }
+ end
+
+ def retrieve_work
+ clean_working_queues! if take_lease
+
+ retrieve_unit_of_work
+ end
+
+ def retrieve_unit_of_work
+ raise NotImplementedError,
+ "#{self.class} does not implement #{__method__}"
+ end
+
+ def bulk_requeue(inprogress, _options)
+ return if inprogress.empty?
+
+ Sidekiq.redis do |conn|
+ inprogress.each do |unit_of_work|
+ conn.multi do |multi|
+ preprocess_interrupted_job(unit_of_work.job, unit_of_work.queue, multi)
+
+ multi.lrem(self.class.working_queue_name(unit_of_work.queue), 1, unit_of_work.job)
+ end
+ end
+ end
+ rescue => e
+ Sidekiq.logger.warn("Failed to requeue #{inprogress.size} jobs: #{e.message}")
+ end
+
+ private
+
+ def preprocess_interrupted_job(job, queue, conn = nil)
+ msg = Sidekiq.load_json(job)
+ msg['interrupted_count'] = msg['interrupted_count'].to_i + 1
+
+ if interruption_exhausted?(msg)
+ send_to_quarantine(msg, conn)
+ else
+ requeue_job(queue, msg, conn)
+ end
+ end
+
+ # If you want this method to be run in a scope of multi connection
+ # you need to pass it
+ def requeue_job(queue, msg, conn)
+ with_connection(conn) do |conn|
+ conn.lpush(queue, Sidekiq.dump_json(msg))
+ end
+
+ Sidekiq.logger.info(
+ message: "Pushed job #{msg['jid']} back to queue #{queue}",
+ jid: msg['jid'],
+ queue: queue
+ )
+ end
+
+ def extract_queue_and_identity(key)
+ # New identity format is "{hostname}:{pid}:{randomhex}
+ # Old identity format is "{hostname}:{pid}"
+ # Queue names may also have colons (namespaced).
+ # Expressing this in a single regex is unreadable
+
+ # Test the newer expected format first, only checking the older if necessary
+ original_queue, identity = key.scan(WORKING_QUEUE_REGEX).flatten
+ return original_queue, identity unless original_queue.nil? || identity.nil?
+
+ key.scan(LEGACY_WORKING_QUEUE_REGEX).flatten
+ end
+
+ # Detect "old" jobs and requeue them because the worker they were assigned
+ # to probably failed miserably.
+ def clean_working_queues!
+ Sidekiq.logger.info('Cleaning working queues')
+
+ Sidekiq.redis do |conn|
+ conn.scan_each(match: "#{WORKING_QUEUE_PREFIX}:queue:*", count: SCAN_COUNT) do |key|
+ original_queue, identity = extract_queue_and_identity(key)
+
+ next if original_queue.nil? || identity.nil?
+
+ clean_working_queue!(original_queue, key) if self.class.worker_dead?(identity, conn)
+ end
+ end
+ end
+
+ def clean_working_queue!(original_queue, working_queue)
+ Sidekiq.redis do |conn|
+ while job = conn.rpop(working_queue)
+ preprocess_interrupted_job(job, original_queue)
+ end
+ end
+ end
+
+ def interruption_exhausted?(msg)
+ return false if max_retries_after_interruption(msg['class']) < 0
+
+ msg['interrupted_count'].to_i >= max_retries_after_interruption(msg['class'])
+ end
+
+ def max_retries_after_interruption(worker_class)
+ max_retries_after_interruption = nil
+
+ max_retries_after_interruption ||= begin
+ Object.const_get(worker_class).sidekiq_options[:max_retries_after_interruption]
+ rescue NameError
+ end
+
+ max_retries_after_interruption ||= @config[:max_retries_after_interruption]
+ max_retries_after_interruption ||= DEFAULT_MAX_RETRIES_AFTER_INTERRUPTION
+ max_retries_after_interruption
+ end
+
+ def send_to_quarantine(msg, multi_connection = nil)
+ Sidekiq.logger.warn(
+ class: msg['class'],
+ jid: msg['jid'],
+ message: %(Reliable Fetcher: adding dead #{msg['class']} job #{msg['jid']} to interrupted queue)
+ )
+
+ job = Sidekiq.dump_json(msg)
+ @interrupted_set.put(job, connection: multi_connection)
+ end
+
+ # Yield block with an existing connection or creates another one
+ def with_connection(conn)
+ return yield(conn) if conn
+
+ Sidekiq.redis { |redis_conn| yield(redis_conn) }
+ end
+
+ def take_lease
+ return unless allowed_to_take_a_lease?
+
+ @last_try_to_take_lease_at = Time.now.to_f
+
+ Sidekiq.redis do |conn|
+ conn.set(LEASE_KEY, 1, nx: true, ex: cleanup_interval)
+ end
+ end
+
+ def allowed_to_take_a_lease?
+ Time.now.to_f - last_try_to_take_lease_at > lease_interval
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/interrupted_set.rb b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/interrupted_set.rb
new file mode 100644
index 00000000000..2fc7a10f9d0
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/interrupted_set.rb
@@ -0,0 +1,51 @@
+require 'sidekiq/api'
+
+module Sidekiq
+ class InterruptedSet < ::Sidekiq::JobSet
+ DEFAULT_MAX_CAPACITY = 10_000
+ DEFAULT_MAX_TIMEOUT = 90 * 24 * 60 * 60 # 3 months
+
+ def initialize
+ super "interrupted"
+ end
+
+ def put(message, opts = {})
+ now = Time.now.to_f
+
+ with_multi_connection(opts[:connection]) do |conn|
+ conn.zadd(name, now.to_s, message)
+ conn.zremrangebyscore(name, '-inf', now - self.class.timeout)
+ conn.zremrangebyrank(name, 0, - self.class.max_jobs)
+ end
+
+ true
+ end
+
+ # Yield block inside an existing multi connection or creates new one
+ def with_multi_connection(conn, &block)
+ return yield(conn) if conn
+
+ Sidekiq.redis do |c|
+ c.multi do |multi|
+ yield(multi)
+ end
+ end
+ end
+
+ def retry_all
+ each(&:retry) while size > 0
+ end
+
+ def self.max_jobs
+ options[:interrupted_max_jobs] || DEFAULT_MAX_CAPACITY
+ end
+
+ def self.timeout
+ options[:interrupted_timeout_in_seconds] || DEFAULT_MAX_TIMEOUT
+ end
+
+ def self.options
+ Sidekiq.respond_to?(:[]) ? Sidekiq : Sidekiq.options
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/reliable_fetch.rb b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/reliable_fetch.rb
new file mode 100644
index 00000000000..e3088ab70a4
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/reliable_fetch.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+module Sidekiq
+ class ReliableFetch < BaseReliableFetch
+ # For reliable fetch we don't use Redis' blocking operations so
+ # we inject a regular sleep into the loop.
+ RELIABLE_FETCH_IDLE_TIMEOUT = 5 # seconds
+
+ attr_reader :queues_size
+
+ def initialize(options)
+ super
+
+ @queues = queues.uniq if strictly_ordered_queues
+ @queues_size = queues.size
+ end
+
+ private
+
+ def retrieve_unit_of_work
+ queues_list = strictly_ordered_queues ? queues : queues.shuffle
+
+ queues_list.each do |queue|
+ work = Sidekiq.redis do |conn|
+ conn.rpoplpush(queue, self.class.working_queue_name(queue))
+ end
+
+ return UnitOfWork.new(queue, work) if work
+ end
+
+ # We didn't find a job in any of the configured queues. Let's sleep a bit
+ # to avoid uselessly burning too much CPU
+ sleep(RELIABLE_FETCH_IDLE_TIMEOUT)
+
+ nil
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/semi_reliable_fetch.rb b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/semi_reliable_fetch.rb
new file mode 100644
index 00000000000..5b8a601dde1
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/lib/sidekiq/semi_reliable_fetch.rb
@@ -0,0 +1,48 @@
+# frozen_string_literal: true
+
+module Sidekiq
+ class SemiReliableFetch < BaseReliableFetch
+ # We want the fetch operation to timeout every few seconds so the thread
+ # can check if the process is shutting down. This constant is only used
+ # for semi-reliable fetch.
+ DEFAULT_SEMI_RELIABLE_FETCH_TIMEOUT = 2 # seconds
+
+ def initialize(options)
+ super
+
+ if strictly_ordered_queues
+ @queues = @queues.uniq
+ @queues << { timeout: semi_reliable_fetch_timeout }
+ end
+ end
+
+ private
+
+ def retrieve_unit_of_work
+ work = Sidekiq.redis { |conn| conn.brpop(*queues_cmd) }
+ return unless work
+
+ unit_of_work = UnitOfWork.new(*work)
+
+ Sidekiq.redis do |conn|
+ conn.lpush(self.class.working_queue_name(unit_of_work.queue), unit_of_work.job)
+ end
+
+ unit_of_work
+ end
+
+ def queues_cmd
+ if strictly_ordered_queues
+ @queues
+ else
+ queues = @queues.shuffle.uniq
+ queues << { timeout: semi_reliable_fetch_timeout }
+ queues
+ end
+ end
+
+ def semi_reliable_fetch_timeout
+ @semi_reliable_fetch_timeout ||= ENV['SIDEKIQ_SEMI_RELIABLE_FETCH_TIMEOUT']&.to_i || DEFAULT_SEMI_RELIABLE_FETCH_TIMEOUT
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/spec/base_reliable_fetch_spec.rb b/vendor/gems/sidekiq-reliable-fetch/spec/base_reliable_fetch_spec.rb
new file mode 100644
index 00000000000..cdc4409f0d5
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/spec/base_reliable_fetch_spec.rb
@@ -0,0 +1,97 @@
+require 'spec_helper'
+require 'fetch_shared_examples'
+require 'sidekiq/base_reliable_fetch'
+require 'sidekiq/reliable_fetch'
+require 'sidekiq/semi_reliable_fetch'
+
+describe Sidekiq::BaseReliableFetch do
+ let(:job) { Sidekiq.dump_json(class: 'Bob', args: [1, 2, 'foo']) }
+
+ before { Sidekiq.redis(&:flushdb) }
+
+ describe 'UnitOfWork' do
+ let(:fetcher) { Sidekiq::ReliableFetch.new(queues: ['foo']) }
+
+ describe '#requeue' do
+ it 'requeues job' do
+ Sidekiq.redis { |conn| conn.rpush('queue:foo', job) }
+
+ uow = fetcher.retrieve_work
+
+ uow.requeue
+
+ expect(Sidekiq::Queue.new('foo').size).to eq 1
+ expect(working_queue_size('foo')).to eq 0
+ end
+ end
+
+ describe '#acknowledge' do
+ it 'acknowledges job' do
+ Sidekiq.redis { |conn| conn.rpush('queue:foo', job) }
+
+ uow = fetcher.retrieve_work
+
+ expect { uow.acknowledge }
+ .to change { working_queue_size('foo') }.by(-1)
+
+ expect(Sidekiq::Queue.new('foo').size).to eq 0
+ end
+ end
+ end
+
+ describe '#bulk_requeue' do
+ let(:options) { { queues: %w[foo bar] } }
+ let!(:queue1) { Sidekiq::Queue.new('foo') }
+ let!(:queue2) { Sidekiq::Queue.new('bar') }
+
+ it 'requeues the bulk' do
+ uow = described_class::UnitOfWork
+ jobs = [ uow.new('queue:foo', job), uow.new('queue:foo', job), uow.new('queue:bar', job) ]
+ described_class.new(options).bulk_requeue(jobs, nil)
+
+ expect(queue1.size).to eq 2
+ expect(queue2.size).to eq 1
+ end
+
+ it 'puts jobs into interrupted queue' do
+ uow = described_class::UnitOfWork
+ interrupted_job = Sidekiq.dump_json(class: 'Bob', args: [1, 2, 'foo'], interrupted_count: 3)
+ jobs = [ uow.new('queue:foo', interrupted_job), uow.new('queue:foo', job), uow.new('queue:bar', job) ]
+ described_class.new(options).bulk_requeue(jobs, nil)
+
+ expect(queue1.size).to eq 1
+ expect(queue2.size).to eq 1
+ expect(Sidekiq::InterruptedSet.new.size).to eq 1
+ end
+
+ it 'does not put jobs into interrupted queue if it is disabled' do
+ options[:max_retries_after_interruption] = -1
+
+ uow = described_class::UnitOfWork
+ interrupted_job = Sidekiq.dump_json(class: 'Bob', args: [1, 2, 'foo'], interrupted_count: 3)
+ jobs = [ uow.new('queue:foo', interrupted_job), uow.new('queue:foo', job), uow.new('queue:bar', job) ]
+ described_class.new(options).bulk_requeue(jobs, nil)
+
+ expect(queue1.size).to eq 2
+ expect(queue2.size).to eq 1
+ expect(Sidekiq::InterruptedSet.new.size).to eq 0
+ end
+ end
+
+ it 'sets heartbeat' do
+ config = double(:sidekiq_config, options: { queues: %w[foo bar] })
+
+ heartbeat_thread = described_class.setup_reliable_fetch!(config)
+
+ Sidekiq.redis do |conn|
+ sleep 0.2 # Give the time to heartbeat thread to make a loop
+
+ heartbeat_key = described_class.heartbeat_key(described_class.identity)
+ heartbeat = conn.get(heartbeat_key)
+
+ expect(heartbeat).not_to be_nil
+ end
+
+ heartbeat_thread.kill
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/spec/fetch_shared_examples.rb b/vendor/gems/sidekiq-reliable-fetch/spec/fetch_shared_examples.rb
new file mode 100644
index 00000000000..df7f715f2f9
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/spec/fetch_shared_examples.rb
@@ -0,0 +1,195 @@
+shared_examples 'a Sidekiq fetcher' do
+ let(:queues) { ['assigned'] }
+
+ before { Sidekiq.redis(&:flushdb) }
+
+ describe '#retrieve_work' do
+ let(:job) { Sidekiq.dump_json(class: 'Bob', args: [1, 2, 'foo']) }
+ let(:fetcher) { described_class.new(queues: queues) }
+
+ it 'does not clean up orphaned jobs more than once per cleanup interval' do
+ Sidekiq.redis = Sidekiq::RedisConnection.create(url: REDIS_URL, size: 10)
+
+ expect(fetcher).to receive(:clean_working_queues!).once
+
+ threads = 10.times.map do
+ Thread.new do
+ fetcher.retrieve_work
+ end
+ end
+
+ threads.map(&:join)
+ end
+
+ it 'retrieves by order when strictly order is enabled' do
+ fetcher = described_class.new(strict: true, queues: ['first', 'second'])
+
+ Sidekiq.redis do |conn|
+ conn.rpush('queue:first', ['msg3', 'msg2', 'msg1'])
+ conn.rpush('queue:second', 'msg4')
+ end
+
+ jobs = (1..4).map { fetcher.retrieve_work.job }
+
+ expect(jobs).to eq ['msg1', 'msg2', 'msg3', 'msg4']
+ end
+
+ it 'does not starve any queue when queues are not strictly ordered' do
+ fetcher = described_class.new(queues: ['first', 'second'])
+
+ Sidekiq.redis do |conn|
+ conn.rpush('queue:first', (1..200).map { |i| "msg#{i}" })
+ conn.rpush('queue:second', 'this_job_should_not_stuck')
+ end
+
+ jobs = (1..100).map { fetcher.retrieve_work.job }
+
+ expect(jobs).to include 'this_job_should_not_stuck'
+ end
+
+ shared_examples "basic queue handling" do |queue|
+ let (:fetcher) { described_class.new(queues: [queue]) }
+
+ it 'retrieves the job and puts it to working queue' do
+ Sidekiq.redis { |conn| conn.rpush("queue:#{queue}", job) }
+
+ uow = fetcher.retrieve_work
+
+ expect(working_queue_size(queue)).to eq 1
+ expect(uow.queue_name).to eq queue
+ expect(uow.job).to eq job
+ expect(Sidekiq::Queue.new(queue).size).to eq 0
+ end
+
+ it 'does not retrieve a job from foreign queue' do
+ Sidekiq.redis { |conn| conn.rpush("'queue:#{queue}:not", job) }
+ expect(fetcher.retrieve_work).to be_nil
+
+ Sidekiq.redis { |conn| conn.rpush("'queue:not_#{queue}", job) }
+ expect(fetcher.retrieve_work).to be_nil
+
+ Sidekiq.redis { |conn| conn.rpush("'queue:random_name", job) }
+ expect(fetcher.retrieve_work).to be_nil
+ end
+
+ it 'requeues jobs from legacy dead working queue with incremented interrupted_count' do
+ Sidekiq.redis do |conn|
+ conn.rpush(legacy_other_process_working_queue_name(queue), job)
+ end
+
+ expected_job = Sidekiq.load_json(job)
+ expected_job['interrupted_count'] = 1
+ expected_job = Sidekiq.dump_json(expected_job)
+
+ uow = fetcher.retrieve_work
+
+ expect(uow).to_not be_nil
+ expect(uow.job).to eq expected_job
+
+ Sidekiq.redis do |conn|
+ expect(conn.llen(legacy_other_process_working_queue_name(queue))).to eq 0
+ end
+ end
+
+ it 'ignores working queue keys in unknown formats' do
+ # Add a spurious non-numeric char segment at the end; this simulates any other
+ # incorrect form in general
+ malformed_key = "#{other_process_working_queue_name(queue)}:X"
+ Sidekiq.redis do |conn|
+ conn.rpush(malformed_key, job)
+ end
+
+ uow = fetcher.retrieve_work
+
+ Sidekiq.redis do |conn|
+ expect(conn.llen(malformed_key)).to eq 1
+ end
+ end
+
+ it 'requeues jobs from dead working queue with incremented interrupted_count' do
+ Sidekiq.redis do |conn|
+ conn.rpush(other_process_working_queue_name(queue), job)
+ end
+
+ expected_job = Sidekiq.load_json(job)
+ expected_job['interrupted_count'] = 1
+ expected_job = Sidekiq.dump_json(expected_job)
+
+ uow = fetcher.retrieve_work
+
+ expect(uow).to_not be_nil
+ expect(uow.job).to eq expected_job
+
+ Sidekiq.redis do |conn|
+ expect(conn.llen(other_process_working_queue_name(queue))).to eq 0
+ end
+ end
+
+ it 'does not requeue jobs from live working queue' do
+ working_queue = live_other_process_working_queue_name(queue)
+
+ Sidekiq.redis do |conn|
+ conn.rpush(working_queue, job)
+ end
+
+ uow = fetcher.retrieve_work
+
+ expect(uow).to be_nil
+
+ Sidekiq.redis do |conn|
+ expect(conn.llen(working_queue)).to eq 1
+ end
+ end
+ end
+
+ context 'with various queues' do
+ %w[assigned namespace:assigned namespace:deeper:assigned].each do |queue|
+ it_behaves_like "basic queue handling", queue
+ end
+ end
+
+ context 'with short cleanup interval' do
+ let(:short_interval) { 1 }
+ let(:fetcher) { described_class.new(queues: queues, lease_interval: short_interval, cleanup_interval: short_interval) }
+
+ it 'requeues when there is no heartbeat' do
+ Sidekiq.redis { |conn| conn.rpush('queue:assigned', job) }
+ # Use of retrieve_work twice with a sleep ensures we have exercised the
+ # `identity` method to create the working queue key name and that it
+ # matches the patterns used in the cleanup
+ uow = fetcher.retrieve_work
+ sleep(short_interval + 1)
+ uow = fetcher.retrieve_work
+
+ # Will only receive a UnitOfWork if the job was detected as failed and requeued
+ expect(uow).to_not be_nil
+ end
+ end
+ end
+end
+
+def working_queue_size(queue_name)
+ Sidekiq.redis do |c|
+ c.llen(Sidekiq::BaseReliableFetch.working_queue_name("queue:#{queue_name}"))
+ end
+end
+
+def legacy_other_process_working_queue_name(queue)
+ "#{Sidekiq::BaseReliableFetch::WORKING_QUEUE_PREFIX}:queue:#{queue}:#{Socket.gethostname}:#{::Process.pid + 1}"
+end
+
+def other_process_working_queue_name(queue)
+ "#{Sidekiq::BaseReliableFetch::WORKING_QUEUE_PREFIX}:queue:#{queue}:#{Socket.gethostname}:#{::Process.pid + 1}:#{::SecureRandom.hex(6)}"
+end
+
+def live_other_process_working_queue_name(queue)
+ pid = ::Process.pid + 1
+ hostname = Socket.gethostname
+ nonce = SecureRandom.hex(6)
+
+ Sidekiq.redis do |conn|
+ conn.set(Sidekiq::BaseReliableFetch.heartbeat_key("#{hostname}-#{pid}-#{nonce}"), 1)
+ end
+
+ "#{Sidekiq::BaseReliableFetch::WORKING_QUEUE_PREFIX}:queue:#{queue}:#{hostname}:#{pid}:#{nonce}"
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/spec/reliable_fetch_spec.rb b/vendor/gems/sidekiq-reliable-fetch/spec/reliable_fetch_spec.rb
new file mode 100644
index 00000000000..bdef04a021f
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/spec/reliable_fetch_spec.rb
@@ -0,0 +1,8 @@
+require 'spec_helper'
+require 'fetch_shared_examples'
+require 'sidekiq/base_reliable_fetch'
+require 'sidekiq/reliable_fetch'
+
+describe Sidekiq::ReliableFetch do
+ include_examples 'a Sidekiq fetcher'
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/spec/semi_reliable_fetch_spec.rb b/vendor/gems/sidekiq-reliable-fetch/spec/semi_reliable_fetch_spec.rb
new file mode 100644
index 00000000000..84a0203b683
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/spec/semi_reliable_fetch_spec.rb
@@ -0,0 +1,43 @@
+require 'spec_helper'
+require 'fetch_shared_examples'
+require 'sidekiq/base_reliable_fetch'
+require 'sidekiq/semi_reliable_fetch'
+
+describe Sidekiq::SemiReliableFetch do
+ include_examples 'a Sidekiq fetcher'
+
+ describe '#retrieve_work' do
+ context 'timeout config' do
+ let(:queues) { ['stuff_to_do'] }
+ let(:fetcher) { described_class.new(queues: queues) }
+
+ before do
+ stub_env('SIDEKIQ_SEMI_RELIABLE_FETCH_TIMEOUT', timeout)
+ end
+
+ context 'when the timeout is not configured' do
+ let(:timeout) { nil }
+
+ it 'brpops with the default timeout timeout' do
+ Sidekiq.redis do |connection|
+ expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 2 }).once.and_call_original
+
+ fetcher.retrieve_work
+ end
+ end
+ end
+
+ context 'when the timeout is set in the env' do
+ let(:timeout) { '5' }
+
+ it 'brpops with the default timeout timeout' do
+ Sidekiq.redis do |connection|
+ expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 5 }).once.and_call_original
+
+ fetcher.retrieve_work
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/spec/spec_helper.rb b/vendor/gems/sidekiq-reliable-fetch/spec/spec_helper.rb
new file mode 100644
index 00000000000..45418571579
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/spec/spec_helper.rb
@@ -0,0 +1,116 @@
+require 'sidekiq'
+require 'sidekiq/api'
+require 'pry'
+require 'simplecov'
+require 'stub_env'
+
+SimpleCov.start
+
+REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost:6379/10'
+
+Sidekiq.configure_client do |config|
+ config.redis = { url: REDIS_URL }
+end
+
+Sidekiq.logger.level = Logger::ERROR
+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ config.include StubEnv::Helpers
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
+ # have no way to turn it off -- the option exists only for backwards
+ # compatibility in RSpec 3). It causes shared context metadata to be
+ # inherited by the metadata hash of host groups and examples, rather than
+ # triggering implicit auto-inclusion in groups with matching metadata.
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # This setting enables warnings. It's recommended, but in some cases may
+ # be too noisy due to issues in dependencies.
+ config.warnings = true
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = "doc"
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/README.md b/vendor/gems/sidekiq-reliable-fetch/tests/README.md
new file mode 100644
index 00000000000..62ea6f48641
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/README.md
@@ -0,0 +1,37 @@
+# How to run reliability tests
+
+```
+cd tests/reliability
+bundle exec ruby reliability_test.rb
+```
+
+You can adjust some parameters of the test in the `config.rb`.
+
+JOB_FETCHER can be set to one of these values: `semi`, `reliable`, `basic`
+
+You need to have redis server running on default HTTP port `6379`. To use other HTTP port, you can define
+`REDIS_URL` environment varible with the port you need(example: `REDIS_URL="redis://localhost:9999"`).
+
+
+## How it works
+
+This tool spawns configured number of Sidekiq workers and when the amount of processed jobs is about half of origin
+number it will kill all the workers with `kill -9` and then it will spawn new workers again until all the jobs are processed. To track the process and counters we use Redis keys/counters.
+
+# How to run interruption tests
+
+```
+cd tests/interruption
+
+# Verify "KILL" signal
+bundle exec ruby test_kill_signal.rb
+
+# Verify "TERM" signal
+bundle exec ruby test_term_signal.rb
+```
+
+It requires Redis to be running on 6379 port.
+
+## How it works
+
+It spawns Sidekiq workers then creates a job that will kill itself after a moment. The reliable fetcher will bring it back. The purpose is to verify that job is run no more then allowed number of times.
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/interruption/config.rb b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/config.rb
new file mode 100644
index 00000000000..f69cca96d80
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/config.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+require_relative '../../lib/sidekiq-reliable-fetch'
+require_relative 'worker'
+
+TEST_CLEANUP_INTERVAL = 20
+TEST_LEASE_INTERVAL = 5
+
+Sidekiq.configure_server do |config|
+ config[:semi_reliable_fetch] = true
+
+ # We need to override these parameters to not wait too long
+ # The default values are good for production use only
+ # These will be ignored for :basic
+ config[:cleanup_interval] = TEST_CLEANUP_INTERVAL
+ config[:lease_interval] = TEST_LEASE_INTERVAL
+
+ Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_kill_signal.rb b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_kill_signal.rb
new file mode 100755
index 00000000000..6f61f25970b
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_kill_signal.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require 'sidekiq'
+require_relative 'config'
+require_relative '../support/utils'
+
+EXPECTED_NUM_TIMES_BEEN_RUN = 3
+NUM_WORKERS = EXPECTED_NUM_TIMES_BEEN_RUN + 1
+
+Sidekiq.redis(&:flushdb)
+
+pids = spawn_workers(NUM_WORKERS)
+
+RetryTestWorker.perform_async
+
+sleep 300
+
+Sidekiq.redis do |redis|
+ times_has_been_run = redis.get('times_has_been_run').to_i
+ assert 'The job has been run', times_has_been_run, EXPECTED_NUM_TIMES_BEEN_RUN
+end
+
+assert 'Found interruption exhausted jobs', Sidekiq::InterruptedSet.new.size, 1
+
+stop_workers(pids)
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_term_signal.rb b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_term_signal.rb
new file mode 100755
index 00000000000..218cd4cbc9d
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/test_term_signal.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require 'sidekiq'
+require_relative 'config'
+require_relative '../support/utils'
+
+EXPECTED_NUM_TIMES_BEEN_RUN = 3
+NUM_WORKERS = EXPECTED_NUM_TIMES_BEEN_RUN + 1
+
+Sidekiq.redis(&:flushdb)
+
+pids = spawn_workers(NUM_WORKERS)
+
+RetryTestWorker.perform_async('TERM', 60)
+
+sleep 300
+
+Sidekiq.redis do |redis|
+ times_has_been_run = redis.get('times_has_been_run').to_i
+ assert 'The job has been run', times_has_been_run, EXPECTED_NUM_TIMES_BEEN_RUN
+end
+
+assert 'Found interruption exhausted jobs', Sidekiq::InterruptedSet.new.size, 1
+
+stop_workers(pids)
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/interruption/worker.rb b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/worker.rb
new file mode 100644
index 00000000000..0e19bc635f7
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/interruption/worker.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RetryTestWorker
+ include Sidekiq::Worker
+
+ def perform(signal = 'KILL', wait_seconds = 1)
+ Sidekiq.redis do |redis|
+ redis.incr('times_has_been_run')
+ end
+
+ Process.kill(signal, Process.pid)
+
+ sleep wait_seconds
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/reliability/config.rb b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/config.rb
new file mode 100644
index 00000000000..05ffcfca9b5
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/config.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+require_relative '../../lib/sidekiq-reliable-fetch'
+require_relative 'worker'
+
+REDIS_FINISHED_LIST = 'reliable-fetcher-finished-jids'
+
+NUMBER_OF_WORKERS = ENV['NUMBER_OF_WORKERS'] || 10
+NUMBER_OF_JOBS = ENV['NUMBER_OF_JOBS'] || 1000
+JOB_FETCHER = (ENV['JOB_FETCHER'] || :semi).to_sym # :basic, :semi, :reliable
+TEST_CLEANUP_INTERVAL = 20
+TEST_LEASE_INTERVAL = 5
+WAIT_CLEANUP = TEST_CLEANUP_INTERVAL +
+ TEST_LEASE_INTERVAL +
+ Sidekiq::ReliableFetch::HEARTBEAT_LIFESPAN
+
+Sidekiq.configure_server do |config|
+ if %i[semi reliable].include?(JOB_FETCHER)
+ config[:semi_reliable_fetch] = (JOB_FETCHER == :semi)
+
+ # We need to override these parameters to not wait too long
+ # The default values are good for production use only
+ # These will be ignored for :basic
+ config[:cleanup_interval] = TEST_CLEANUP_INTERVAL
+ config[:lease_interval] = TEST_LEASE_INTERVAL
+
+ Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/reliability/reliability_test.rb b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/reliability_test.rb
new file mode 100755
index 00000000000..6324971fe8f
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/reliability_test.rb
@@ -0,0 +1,115 @@
+# frozen_string_literal: true
+
+require 'sidekiq'
+require 'sidekiq/cli'
+require_relative 'config'
+
+def spawn_workers_and_stop_them_on_a_half_way
+ pids = spawn_workers
+
+ wait_until do |queue_size|
+ queue_size < NUMBER_OF_JOBS / 2
+ end
+
+ first_half_pids, second_half_pids = split_array(pids)
+
+ puts 'Killing half of the workers...'
+ signal_to_workers('KILL', first_half_pids)
+
+ puts 'Stopping another half of the workers...'
+ signal_to_workers('TERM', second_half_pids)
+end
+
+def spawn_workers_and_let_them_finish
+ puts 'Spawn workers and let them finish...'
+
+ pids = spawn_workers
+
+ wait_until do |queue_size|
+ queue_size.zero?
+ end
+
+ if %i[semi reliable].include? JOB_FETCHER
+ puts 'Waiting for clean up process that will requeue dead jobs...'
+ sleep WAIT_CLEANUP
+ end
+
+ signal_to_workers('TERM', pids)
+end
+
+def wait_until
+ loop do
+ sleep 3
+
+ queue_size = current_queue_size
+ puts "Jobs in the queue:#{queue_size}"
+
+ break if yield(queue_size)
+ end
+end
+
+def signal_to_workers(signal, pids)
+ pids.each { |pid| Process.kill(signal, pid) }
+ pids.each { |pid| Process.wait(pid) }
+end
+
+def spawn_workers
+ pids = []
+ NUMBER_OF_WORKERS.times do
+ pids << spawn('sidekiq -q default -q low -q high -r ./config.rb')
+ end
+
+ pids
+end
+
+def current_queue_size
+ Sidekiq.redis { |c| c.llen('queue:default') }
+end
+
+def duplicates
+ Sidekiq.redis { |c| c.llen(REDIS_FINISHED_LIST) }
+end
+
+# Splits array into two halves
+def split_array(arr)
+ first_arr = arr.take(arr.size / 2)
+ second_arr = arr - first_arr
+ [first_arr, second_arr]
+end
+
+##########################################################
+
+puts '########################################'
+puts "Mode: #{JOB_FETCHER}"
+puts '########################################'
+
+Sidekiq.redis(&:flushdb)
+
+jobs = []
+
+NUMBER_OF_JOBS.times do
+ jobs << ReliabilityTestWorker.perform_async
+end
+
+puts "Queued #{NUMBER_OF_JOBS} jobs"
+
+spawn_workers_and_stop_them_on_a_half_way
+spawn_workers_and_let_them_finish
+
+jobs_lost = 0
+
+Sidekiq.redis do |redis|
+ jobs.each do |job|
+ next if redis.lrem(REDIS_FINISHED_LIST, 1, job) == 1
+ jobs_lost += 1
+ end
+end
+
+puts "Remaining unprocessed: #{jobs_lost}"
+puts "Duplicates found: #{duplicates}"
+
+if jobs_lost.zero? && duplicates.zero?
+ exit 0
+else
+ exit 1
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/reliability/worker.rb b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/worker.rb
new file mode 100644
index 00000000000..8b580a67ec1
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/reliability/worker.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class ReliabilityTestWorker
+ include Sidekiq::Worker
+
+ def perform
+ # To mimic long running job and to increase the probability of losing the job
+ sleep 1
+
+ Sidekiq.redis do |redis|
+ redis.lpush(REDIS_FINISHED_LIST, jid)
+ end
+ end
+end
diff --git a/vendor/gems/sidekiq-reliable-fetch/tests/support/utils.rb b/vendor/gems/sidekiq-reliable-fetch/tests/support/utils.rb
new file mode 100644
index 00000000000..c481c6dad80
--- /dev/null
+++ b/vendor/gems/sidekiq-reliable-fetch/tests/support/utils.rb
@@ -0,0 +1,26 @@
+def assert(text, actual, expected)
+ if actual == expected
+ puts "#{text}: #{actual} (Success)"
+ else
+ puts "#{text}: #{actual} (Failed). Expected: #{expected}"
+ exit 1
+ end
+end
+
+def spawn_workers(number)
+ pids = []
+
+ number.times do
+ pids << spawn('sidekiq -q default -q high -q low -r ./config.rb')
+ end
+
+ pids
+end
+
+# Stop Sidekiq workers
+def stop_workers(pids)
+ pids.each do |pid|
+ Process.kill('KILL', pid)
+ Process.wait pid
+ end
+end
diff --git a/vendor/project_templates/android.tar.gz b/vendor/project_templates/android.tar.gz
index fff7a7e45a6..ee0689a6e45 100644
--- a/vendor/project_templates/android.tar.gz
+++ b/vendor/project_templates/android.tar.gz
Binary files differ
diff --git a/vendor/project_templates/cluster_management.tar.gz b/vendor/project_templates/cluster_management.tar.gz
index f36d7de462e..252fb2da75a 100644
--- a/vendor/project_templates/cluster_management.tar.gz
+++ b/vendor/project_templates/cluster_management.tar.gz
Binary files differ
diff --git a/vendor/project_templates/express.tar.gz b/vendor/project_templates/express.tar.gz
index bd746dbfb5b..3babc60a5bc 100644
--- a/vendor/project_templates/express.tar.gz
+++ b/vendor/project_templates/express.tar.gz
Binary files differ
diff --git a/vendor/project_templates/gitbook.tar.gz b/vendor/project_templates/gitbook.tar.gz
deleted file mode 100644
index 07037a83db6..00000000000
--- a/vendor/project_templates/gitbook.tar.gz
+++ /dev/null
Binary files differ
diff --git a/vendor/project_templates/gomicro.tar.gz b/vendor/project_templates/gomicro.tar.gz
index c7d8687fdd8..50899e661c7 100644
--- a/vendor/project_templates/gomicro.tar.gz
+++ b/vendor/project_templates/gomicro.tar.gz
Binary files differ
diff --git a/vendor/project_templates/hexo.tar.gz b/vendor/project_templates/hexo.tar.gz
index 489da1a34ec..cc30ff0a67e 100644
--- a/vendor/project_templates/hexo.tar.gz
+++ b/vendor/project_templates/hexo.tar.gz
Binary files differ
diff --git a/vendor/project_templates/hipaa_audit_protocol.tar.gz b/vendor/project_templates/hipaa_audit_protocol.tar.gz
index 7ca94675d35..00c6c9f324c 100644
--- a/vendor/project_templates/hipaa_audit_protocol.tar.gz
+++ b/vendor/project_templates/hipaa_audit_protocol.tar.gz
Binary files differ
diff --git a/vendor/project_templates/iosswift.tar.gz b/vendor/project_templates/iosswift.tar.gz
index 76f32a3a681..80a71b432b5 100644
--- a/vendor/project_templates/iosswift.tar.gz
+++ b/vendor/project_templates/iosswift.tar.gz
Binary files differ
diff --git a/vendor/project_templates/jekyll.tar.gz b/vendor/project_templates/jekyll.tar.gz
index 0a97723712a..8dc68699baa 100644
--- a/vendor/project_templates/jekyll.tar.gz
+++ b/vendor/project_templates/jekyll.tar.gz
Binary files differ
diff --git a/vendor/project_templates/laravel.tar.gz b/vendor/project_templates/laravel.tar.gz
new file mode 100644
index 00000000000..49324636f5e
--- /dev/null
+++ b/vendor/project_templates/laravel.tar.gz
Binary files differ
diff --git a/vendor/project_templates/learn_gitlab_ultimate.tar.gz b/vendor/project_templates/learn_gitlab_ultimate.tar.gz
deleted file mode 100644
index b134ac89815..00000000000
--- a/vendor/project_templates/learn_gitlab_ultimate.tar.gz
+++ /dev/null
Binary files differ
diff --git a/vendor/project_templates/nfgitbook.tar.gz b/vendor/project_templates/nfgitbook.tar.gz
index 71f526ac43d..f09a5f41171 100644
--- a/vendor/project_templates/nfgitbook.tar.gz
+++ b/vendor/project_templates/nfgitbook.tar.gz
Binary files differ
diff --git a/vendor/project_templates/nfhexo.tar.gz b/vendor/project_templates/nfhexo.tar.gz
index 79cc74f8d72..3a241f68df4 100644
--- a/vendor/project_templates/nfhexo.tar.gz
+++ b/vendor/project_templates/nfhexo.tar.gz
Binary files differ
diff --git a/vendor/project_templates/nfhugo.tar.gz b/vendor/project_templates/nfhugo.tar.gz
index 1a4aab028a8..093ecdea96a 100644
--- a/vendor/project_templates/nfhugo.tar.gz
+++ b/vendor/project_templates/nfhugo.tar.gz
Binary files differ
diff --git a/vendor/project_templates/nfjekyll.tar.gz b/vendor/project_templates/nfjekyll.tar.gz
index 56bf955afbe..f554181e1db 100644
--- a/vendor/project_templates/nfjekyll.tar.gz
+++ b/vendor/project_templates/nfjekyll.tar.gz
Binary files differ
diff --git a/vendor/project_templates/nfplainhtml.tar.gz b/vendor/project_templates/nfplainhtml.tar.gz
index 3a90983bd06..13dd13a6830 100644
--- a/vendor/project_templates/nfplainhtml.tar.gz
+++ b/vendor/project_templates/nfplainhtml.tar.gz
Binary files differ
diff --git a/vendor/project_templates/pelican.tar.gz b/vendor/project_templates/pelican.tar.gz
index 1877d3fb24b..bc87d498ced 100644
--- a/vendor/project_templates/pelican.tar.gz
+++ b/vendor/project_templates/pelican.tar.gz
Binary files differ
diff --git a/vendor/project_templates/plainhtml.tar.gz b/vendor/project_templates/plainhtml.tar.gz
index 1ed17ddc140..dc0354172be 100644
--- a/vendor/project_templates/plainhtml.tar.gz
+++ b/vendor/project_templates/plainhtml.tar.gz
Binary files differ
diff --git a/vendor/project_templates/salesforcedx.tar.gz b/vendor/project_templates/salesforcedx.tar.gz
index f92721a453f..9486b410507 100644
--- a/vendor/project_templates/salesforcedx.tar.gz
+++ b/vendor/project_templates/salesforcedx.tar.gz
Binary files differ
diff --git a/vendor/project_templates/serverless_framework.tar.gz b/vendor/project_templates/serverless_framework.tar.gz
index b09de0ec3a2..279d0f2eb5c 100644
--- a/vendor/project_templates/serverless_framework.tar.gz
+++ b/vendor/project_templates/serverless_framework.tar.gz
Binary files differ
diff --git a/vendor/project_templates/spring.tar.gz b/vendor/project_templates/spring.tar.gz
index c1198bf13b7..12960e91f85 100644
--- a/vendor/project_templates/spring.tar.gz
+++ b/vendor/project_templates/spring.tar.gz
Binary files differ