From 23707a7e40dd2646a6e119f6e8eeb2cc3fbb197a Mon Sep 17 00:00:00 2001 From: Matt Conway Date: Thu, 11 Feb 2021 11:36:54 -0500 Subject: [PATCH] Add the ability to use a namespaceTemplate to determine which namespace the kube resources will be created in --- Gemfile.lock | 21 +- README.md | 10 +- helm/kubetruth/Chart.yaml | 4 +- helm/kubetruth/templates/deployment.yaml | 4 + helm/kubetruth/values.yaml | 1 + lib/kubetruth/cli.rb | 14 +- lib/kubetruth/etl.rb | 59 +- lib/kubetruth/kubeapi.rb | 11 + lib/kubetruth/version.rb | 2 +- .../configmaps/can_crud_config_maps.yml | 70 +- ...se_multiple_namespaces_for_config_maps.yml | 937 ++++++++++++++++++ .../creates_namespace_if_not_present.yml | 233 +++++ .../secrets/can_crud_secrets.yml | 68 +- ...an_use_multiple_namespaces_for_secrets.yml | 937 ++++++++++++++++++ spec/kubetruth/cli_spec.rb | 3 +- spec/kubetruth/etl_spec.rb | 128 ++- spec/kubetruth/kubeapi_spec.rb | 84 +- 17 files changed, 2450 insertions(+), 136 deletions(-) create mode 100644 spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_use_multiple_namespaces_for_config_maps.yml create mode 100644 spec/fixtures/vcr/Kubetruth_KubeApi/ensure_namespace/creates_namespace_if_not_present.yml create mode 100644 spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_use_multiple_namespaces_for_secrets.yml diff --git a/Gemfile.lock b/Gemfile.lock index 274b2ee..7061a7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - kubetruth (0.1.0) + kubetruth (0.2.0) activesupport clamp gem_logger @@ -12,12 +12,12 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.4) + activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) byebug (11.1.3) @@ -57,7 +57,7 @@ GEM http-form_data (2.3.0) http-parser (1.2.2) ffi-compiler - i18n (1.8.5) + i18n (1.8.7) concurrent-ruby (~> 1.0) json (2.3.1) jsonpath (1.0.6) @@ -75,7 +75,7 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2020.1104) - minitest (5.14.2) + minitest (5.14.3) multi_json (1.15.0) netrc (0.11.0) pry (0.13.1) @@ -114,11 +114,10 @@ GEM term-ansicolor (1.7.1) tins (~> 1.0) thor (1.0.1) - thread_safe (0.3.6) tins (1.26.0) sync - tzinfo (1.2.8) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext unf_ext (0.0.7.7) diff --git a/README.md b/README.md index 729bc96..be7a294 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Parameterize the helm install with `--set appSettings.**` to control how kubetru | appSettings.environment | The cloudtruth environment to lookup parameter values for. Use a separate helm install for each environment | string | `default` | yes | | appSettings.keyPrefix | Limit the parameters looked up to one of these prefixes | list(string) | n/a | no | | appSettings.keyPattern | The pattern to match against key names to select params and provide keywords for generating resource names via nameTemplate and keyTemplate | list(regex) | `^(?[^\.]+)\.(?[^\.]+)\.(?.*)` | no | +| appSettings.namespaceTemplate | The template for generating the namespace that resources get created in | string | n/a | no | | appSettings.nameTemplate | The template for generating resources (ConfigMaps and Secrets) | string | `%{name}` | no | | appSettings.keyTemplate | The template for generating key names within a resource | string | `%{key}` | no | | appSettings.skipSecrets | Do not transfer parameters that are marked as secret | flag | false | no | @@ -100,7 +101,14 @@ updated automatically in a running pod After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. +To install and run via helm in a local cluster: +``` +docker build -t kubetruth . && helm install \ + --set image.repository=kubetruth --set image.pullPolicy=Never --set image.tag=latest \ + --set appSettings.debug=true --set appSettings.apiKey=$CT_API_KEY --set appSettings.environment=development \ + kubetruth ./helm/kubetruth/ +``` + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/cloudtruth/kubetruth. - diff --git a/helm/kubetruth/Chart.yaml b/helm/kubetruth/Chart.yaml index 8f7ff15..b3d4225 100644 --- a/helm/kubetruth/Chart.yaml +++ b/helm/kubetruth/Chart.yaml @@ -15,9 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.1.0 +appVersion: 0.2.0 diff --git a/helm/kubetruth/templates/deployment.yaml b/helm/kubetruth/templates/deployment.yaml index 9e44786..86aec19 100644 --- a/helm/kubetruth/templates/deployment.yaml +++ b/helm/kubetruth/templates/deployment.yaml @@ -52,6 +52,10 @@ spec: - --key-pattern - {{ toYaml . | quote }} {{- end }} + {{- if .Values.appSettings.namespaceTemplate }} + - --namespace-template + - {{ .Values.appSettings.namespaceTemplate | quote }} + {{- end }} {{- if .Values.appSettings.nameTemplate }} - --name-template - {{ .Values.appSettings.nameTemplate | quote }} diff --git a/helm/kubetruth/values.yaml b/helm/kubetruth/values.yaml index 9f1f3b0..c3f02f7 100644 --- a/helm/kubetruth/values.yaml +++ b/helm/kubetruth/values.yaml @@ -70,6 +70,7 @@ appSettings: environment: keyPrefix: [] keyPattern: [] + namespaceTemplate: nameTemplate: keyTemplate: skipSecrets: false diff --git a/lib/kubetruth/cli.rb b/lib/kubetruth/cli.rb index 81eb890..dc0c654 100755 --- a/lib/kubetruth/cli.rb +++ b/lib/kubetruth/cli.rb @@ -26,10 +26,12 @@ class CLI < Clamp::Command environment_variable: 'CT_API_KEY', required: true - option "--name-template", "TMPL", "the template for generating the configmap name from key pattern matches", + option "--namespace-template", "TMPL", "the template for generating the namespace name where configmap/secrets are created from key pattern matches. Defaults to the namespace kubetruth is running in" + + option "--name-template", "TMPL", "the template for generating the configmap/secret name from key pattern matches", default: "%{name}" - option "--key-template", "TMPL", "the template for generating the configmap keys from key pattern matches", + option "--key-template", "TMPL", "the template for generating the configmap/secret keys from key pattern matches", default: "%{key}" option "--key-prefix", "PREFIX", "the key prefix to restrict the keys fetched from cloudtruth", @@ -53,13 +55,13 @@ class CLI < Clamp::Command default: false option "--kube-namespace", - 'NAMESPACE', "The kubernetes namespace Defaults to runtime namespace when run in kube" + 'NAMESPACE', "The kubernetes namespace. Defaults to runtime namespace when run in kube" option "--kube-token", - 'TOKEN', "The kubernetes token to use for api Defaults to mounted when run in kube" + 'TOKEN', "The kubernetes token to use for api. Defaults to mounted when run in kube" option "--kube-url", - 'ENDPOINT', "The kubernetes api url Defaults to internal api endpoint when run in kube" + 'ENDPOINT', "The kubernetes api url. Defaults to internal api endpoint when run in kube" option "--polling-interval", "INTERVAL", "the polling interval", default: 300 do |a| Integer(a) @@ -116,7 +118,7 @@ def execute } etl = ETL.new(key_prefixes: key_prefix_list, key_patterns: key_pattern_list, - name_template: name_template, key_template: key_template, + namespace_template: namespace_template, name_template: name_template, key_template: key_template, ct_context: ct_context, kube_context: kube_context) while true diff --git a/lib/kubetruth/etl.rb b/lib/kubetruth/etl.rb index 0bdc13a..57abaf8 100644 --- a/lib/kubetruth/etl.rb +++ b/lib/kubetruth/etl.rb @@ -8,15 +8,17 @@ class ETL include GemLogger::LoggerSupport def initialize(key_prefixes:, key_patterns:, - name_template:, key_template:, + namespace_template:, name_template:, key_template:, ct_context:, kube_context:) @key_prefixes = key_prefixes @key_patterns = key_patterns @name_template = name_template + @namespace_template = namespace_template @key_template = key_template @ct_context = ct_context @kube_context = kube_context + @kubeapis = {} end def ctapi @@ -27,8 +29,8 @@ def ctapi end end - def kubeapi - @kubeapi ||= KubeApi.new(**@kube_context) + def kubeapi(namespace) + @kubeapis[namespace] ||= KubeApi.new(**@kube_context.merge(namespace: namespace)) end def apply(dry_run: false, skip_secrets: false, secrets_as_config: false) @@ -85,7 +87,7 @@ def get_param_groups end logger.debug { "Filtered params: #{filtered_params.inspect}"} - # Group those parameters by the name selected by the key_pattern + # Group those parameters by the name selected by the name_pattern # param_groups = {} @key_patterns.each do |key_pattern| @@ -97,11 +99,15 @@ def get_param_groups matches_hash = Hash[*matches_hash.collect {|k, v| [k, v, "#{k}_upcase".to_sym, v.upcase]}.flatten] logger.debug {"Pattern matches '#{param.key}' with: #{matches_hash}"} - name = @name_template % matches_hash + + namespace = dns_friendly(@namespace_template % matches_hash) if @namespace_template + name = dns_friendly(@name_template % matches_hash) key = @key_template % matches_hash param.original_key, param.key = param.key, key - param_groups[name] ||= [] - param_groups[name] << param + + group_key = {namespace: namespace, name: name} + param_groups[group_key] ||= [] + param_groups[group_key] << param else logger.debug {"Pattern does not match '#{param.key}'"} end @@ -126,26 +132,32 @@ def apply_config_maps(param_groups) # to the config map with that name # - logger.debug { "Existing config maps: #{kubeapi.get_config_map_names}" } + param_groups.collect {|k, v| k[:namespace] }.sort.uniq.each do |ns| + kapi = kubeapi(ns) + # only create namespace when user chooses to use multiple namespaces determined from the pattern + kapi.ensure_namespace if @namespace_template + logger.debug { "Existing config maps (ns=#{ns}): #{kapi.get_config_map_names}" } + end param_groups.each do |k, v| - - config_map_name = dns_friendly(k) - + config_map_namespace = k[:namespace] + config_map_name = k[:name] + kapi = kubeapi(config_map_namespace) param_hash = Hash[v.collect {|param| [param.key, param.value]}] begin - data = kubeapi.get_config_map(config_map_name) + logger.debug { "Namespace '#{kapi.namespace}'" } + data = kapi.get_config_map(config_map_name) logger.debug("Config map for '#{config_map_name}': #{data.inspect}") if param_hash != data.transform_keys! {|k| k.to_s } logger.info "Updating config map '#{config_map_name}' with params: #{param_hash.inspect}" - kubeapi.update_config_map(config_map_name, param_hash) + kapi.update_config_map(config_map_name, param_hash) else logger.info "No changes needed for config map '#{config_map_name}' with params: #{param_hash.inspect}}" end rescue Kubeclient::ResourceNotFoundError logger.info "Creating config map '#{config_map_name}' with params: #{param_hash.inspect}}" - kubeapi.create_config_map(config_map_name, param_hash) + kapi.create_config_map(config_map_name, param_hash) end end end @@ -156,26 +168,35 @@ def apply_secrets(param_groups) # For each set of parameters grouped by name, add those parameters # to the secret with that name # - logger.debug { "Existing secrets: #{kubeapi.get_secret_names}" } + + param_groups.collect {|k, v| k[:namespace] }.uniq.each do |ns| + kapi = kubeapi(ns) + # only create namespace when user chooses to use multiple namespaces determined from the pattern + kapi.ensure_namespace if @namespace_template + logger.debug { "Existing secrets (ns=#{kapi.namespace}): #{kapi.get_secret_names}" } + end param_groups.each do |k, v| - secret_name = dns_friendly(k) + secret_namespace = k[:namespace] + secret_name = k[:name] + kapi = kubeapi(secret_namespace) param_hash = Hash[v.collect {|param| [param.key, param.value]}] begin - data = kubeapi.get_secret(secret_name) + logger.debug { "Namespace '#{kapi.namespace}'" } + data = kapi.get_secret(secret_name) logger.debug("Secret for '#{secret_name}': #{data}") if param_hash != data.transform_keys! {|k| k.to_s } logger.info "Updating secret '#{secret_name}' with params: #{param_hash.keys.inspect}" - kubeapi.update_secret(secret_name, param_hash) + kapi.update_secret(secret_name, param_hash) else logger.info "No changes needed for secret '#{secret_name}' with params: #{param_hash.keys.inspect}}" end rescue Kubeclient::ResourceNotFoundError logger.info "Creating secret '#{secret_name}' with params: #{param_hash.keys.inspect}}" - kubeapi.create_secret(secret_name, param_hash) + kapi.create_secret(secret_name, param_hash) end end end diff --git a/lib/kubetruth/kubeapi.rb b/lib/kubetruth/kubeapi.rb index fd6991d..6030b2e 100644 --- a/lib/kubetruth/kubeapi.rb +++ b/lib/kubetruth/kubeapi.rb @@ -40,6 +40,17 @@ def client ) end + def ensure_namespace + begin + client.get_namespace(namespace) + rescue Kubeclient::ResourceNotFoundError + ns = Kubeclient::Resource.new + ns.metadata = {} + ns.metadata.name = namespace + client.create_namespace(ns) + end + end + def get_config_map_names client.get_config_maps(namespace: namespace).collect(&:metadata).collect(&:name) end diff --git a/lib/kubetruth/version.rb b/lib/kubetruth/version.rb index 17ded94..da301d1 100644 --- a/lib/kubetruth/version.rb +++ b/lib/kubetruth/version.rb @@ -1,3 +1,3 @@ module Kubetruth - VERSION = "0.1.0" + VERSION = "0.2.0" end diff --git a/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_crud_config_maps.yml b/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_crud_config_maps.yml index af5fa94..6c43fd6 100644 --- a/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_crud_config_maps.yml +++ b/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_crud_config_maps.yml @@ -27,7 +27,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Transfer-Encoding: - chunked body: @@ -35,7 +35,7 @@ http_interactions: string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -63,7 +63,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - '186' body: @@ -72,7 +72,7 @@ http_interactions: \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: post uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps @@ -104,15 +104,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '478' + - '477' body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220118","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818917","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps @@ -140,15 +140,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '596' + - '594' body: encoding: UTF-8 - string: '{"kind":"ConfigMapList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps","resourceVersion":"3220118"},"items":[{"metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220118","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}}]} + string: '{"kind":"ConfigMapList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps","resourceVersion":"818917"},"items":[{"metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818917","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}}]} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -176,15 +176,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '478' + - '477' body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220118","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818917","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -212,21 +212,21 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '478' + - '477' body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220118","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818917","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: put uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220118","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}}' + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818917","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}}' headers: Accept: - "*/*" @@ -237,7 +237,7 @@ http_interactions: Authorization: - Bearer Content-Length: - - '477' + - '476' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Host: @@ -252,15 +252,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '478' + - '477' body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220119","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818918","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -288,15 +288,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - - '478' + - '477' body: encoding: UTF-8 - string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df","resourceVersion":"3220119","creationTimestamp":"2020-12-02T20:06:03Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/configmaps/foo","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9","resourceVersion":"818918","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: delete uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -326,15 +326,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - '159' body: encoding: UTF-8 - string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"configmaps","uid":"1f671c08-51fd-4d36-8ca0-a19531ca40df"}} + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"configmaps","uid":"8b3e3145-0625-4a64-831c-2e222aea99c9"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/configmaps/foo @@ -362,7 +362,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:03 GMT + - Wed, 10 Feb 2021 19:24:56 GMT Content-Length: - '186' body: @@ -371,5 +371,5 @@ http_interactions: \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} ' - recorded_at: Wed, 02 Dec 2020 20:06:03 GMT + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT recorded_with: VCR 6.0.0 diff --git a/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_use_multiple_namespaces_for_config_maps.yml b/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_use_multiple_namespaces_for_config_maps.yml new file mode 100644 index 0000000..93ac2e3 --- /dev/null +++ b/spec/fixtures/vcr/Kubetruth_KubeApi/configmaps/can_use_multiple_namespaces_for_config_maps.yml @@ -0,0 +1,937 @@ +--- +http_interactions: +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '226' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-cmns1\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-cmns1","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces + body: + encoding: UTF-8 + string: '{"metadata":{"name":"kubetruth-test-ns-cmns1"},"kind":"Namespace","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '84' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '497' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1","uid":"61e2925b-a5fd-4d65-88d9-89423003535b","resourceVersion":"818921","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '497' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1","uid":"61e2925b-a5fd-4d65-88d9-89423003535b","resourceVersion":"818921","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '226' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-cmns2\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-cmns2","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces + body: + encoding: UTF-8 + string: '{"metadata":{"name":"kubetruth-test-ns-cmns2"},"kind":"Namespace","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '84' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '497' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2","uid":"4a05ada6-5d8b-4a5f-9d74-27eb9895aeec","resourceVersion":"818925","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '186' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1"},"data":{"bar":"baz"},"kind":"ConfigMap","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '123' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818928","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '612' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMapList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps","resourceVersion":"818929"},"items":[{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818928","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818928","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818928","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: put + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818928","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '488' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818930","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo","uid":"0891e711-0216-44b4-b58d-030d09435ff2","resourceVersion":"818930","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: delete + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '159' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"configmaps","uid":"0891e711-0216-44b4-b58d-030d09435ff2"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns1/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '186' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '186' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2"},"data":{"bar":"baz"},"kind":"ConfigMap","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '123' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818932","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '612' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMapList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps","resourceVersion":"818932"},"items":[{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818932","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818932","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818932","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: put + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818932","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '488' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818933","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-cmns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo","uid":"42df473f-6679-4689-aa7c-09e2465f85f2","resourceVersion":"818933","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"bum"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: delete + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '159' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"configmaps","uid":"42df473f-6679-4689-aa7c-09e2465f85f2"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-cmns2/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:57 GMT + Content-Length: + - '186' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"configmaps + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"configmaps"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT +recorded_with: VCR 6.0.0 diff --git a/spec/fixtures/vcr/Kubetruth_KubeApi/ensure_namespace/creates_namespace_if_not_present.yml b/spec/fixtures/vcr/Kubetruth_KubeApi/ensure_namespace/creates_namespace_if_not_present.yml new file mode 100644 index 0000000..3402bce --- /dev/null +++ b/spec/fixtures/vcr/Kubetruth_KubeApi/ensure_namespace/creates_namespace_if_not_present.yml @@ -0,0 +1,233 @@ +--- +http_interactions: +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-newns/configmaps + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-newns"},"data":{},"kind":"ConfigMap","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '112' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Content-Length: + - '226' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-newns\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-newns","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-newns + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Content-Length: + - '226' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-newns\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-newns","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces + body: + encoding: UTF-8 + string: '{"metadata":{"name":"kubetruth-test-ns-newns"},"kind":"Namespace","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '84' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Content-Length: + - '497' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-newns","selfLink":"/api/v1/namespaces/kubetruth-test-ns-newns","uid":"65c34bc5-306d-4d44-9fd3-b930f9f32a8c","resourceVersion":"818910","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-newns/configmaps + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-newns"},"data":{"bar":"baz"},"kind":"ConfigMap","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '123' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-newns","selfLink":"/api/v1/namespaces/kubetruth-test-ns-newns/configmaps/foo","uid":"2463f79e-a0f8-4a29-a16a-be244efcc12b","resourceVersion":"818912","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-newns/configmaps/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:56 GMT + Content-Length: + - '489' + body: + encoding: UTF-8 + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-newns","selfLink":"/api/v1/namespaces/kubetruth-test-ns-newns/configmaps/foo","uid":"2463f79e-a0f8-4a29-a16a-be244efcc12b","resourceVersion":"818912","creationTimestamp":"2021-02-10T19:24:56Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}}}}]},"data":{"bar":"baz"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:56 GMT +recorded_with: VCR 6.0.0 diff --git a/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_crud_secrets.yml b/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_crud_secrets.yml index b583241..c816556 100644 --- a/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_crud_secrets.yml +++ b/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_crud_secrets.yml @@ -27,7 +27,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Transfer-Encoding: - chunked body: @@ -35,7 +35,7 @@ http_interactions: string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -63,7 +63,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - '180' body: @@ -72,7 +72,7 @@ http_interactions: \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: post uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets @@ -104,15 +104,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - - '501' + - '500' body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220122","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818939","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets @@ -140,15 +140,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Transfer-Encoding: - chunked body: encoding: UTF-8 - string: '{"kind":"SecretList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets","resourceVersion":"3220122"},"items":[{"metadata":{"name":"default-token-27jbs","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/default-token-27jbs","uid":"91965888-f5d7-4956-807b-748e96568885","resourceVersion":"3220100","creationTimestamp":"2020-12-02T20:06:03Z","annotations":{"kubernetes.io/service-account.name":"default","kubernetes.io/service-account.uid":"b93df9ee-dc04-43ac-9c17-16bdf2765242"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTk5VCnJRS3NjVk5OQVBjbGF5MEkzMUQ2TjVrVmNvQ0o3b1ZTa3VjVG5ZZFFKT1dodTFjdHJPV3NXbzhIenZDZnpuQUoKb2h4Vk9UajZib1NNZ2RkcW9xVDYwVjJpcVRNanJwbXN3MTM1dGhLVnVIOGhyRldUKzNGbld3NFdCaExpOTlGUgo1WlNhQlAvaXJmRk9qR1ovTTY5OUpyRU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jWmNsbDgtbXRIU2c="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220122","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"},{"metadata":{"name":"kubetruth-test-app-token-qc2bt","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/kubetruth-test-app-token-qc2bt","uid":"83e6f396-7e35-41da-8232-4ed044c3faea","resourceVersion":"3220099","creationTimestamp":"2020-12-02T20:06:03Z","annotations":{"kubernetes.io/service-account.name":"kubetruth-test-app","kubernetes.io/service-account.uid":"18783629-3c17-4830-a251-00805ec8d8db"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTk5VCnJRS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FT3NrcGRJcVA1dlRNckxiaU11bHN2ZUo4TGtVOVAwSWl1Wnl4R0wxRG5DZC0xRXFHcGpPQlk5UmQzLVBaYXR3VEpPNXIta0IxdENNX3VaSTBDVjAxSWFIVzRJY3dndEZFUHR0YThoeWwzUHp1ZEpGSHlrb0lscFhrdi1NU1hxSFRjWW9uYWx5U2VzMFo0MmVCc2ozc1NsOVMwbDMyX3B2NnpZRVoxZklPZG91WWZwQ2RpYldQN0I1ajAtYWloVXVXMXBDMC14YjJXWmZLaEhzTldOdw=="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"sh.helm.release.v1.kubetruth-test-app.v1","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/sh.helm.release.v1.kubetruth-test-app.v1","uid":"a3910831-c6d0-4d8d-92c7-7e775d68f60b","resourceVersion":"3220105","creationTimestamp":"2020-12-02T20:06:03Z","labels":{"modifiedAt":"1606939563","name":"kubetruth-test-app","owner":"helm","status":"deployed","version":"1"},"managedFields":[{"manager":"helm","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:03Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:release":{}},"f:metadata":{"f:labels":{".":{},"f:modifiedAt":{},"f:name":{},"f:owner":{},"f:status":{},"f:version":{}}},"f:type":{}}}]},"data":{"release":"SDRzSUFBQUFBQUFDLyt4YmVXK2p5TGIvS2hiMzN5UURPUFMwTGQwL0RCMWpITWRwWTV0dE1ocFZRUVd3cTRCaHNZMUgvZDJmaXMxNFRYcnVYRDA5NmJYVWFrTXQ1NXpmV2V0US9SY1RBSUtZUHJQT0lFcmpMUFh1VTVTazl5Q0ttRHZHRDk1RHB2OFg4KzdIU2ZxSGd5SWM1c2hoK2d6UDh1dzl4OSt6L0lJVCt1eVhQdHQ5WUI5WjRldmpQU3YwV1phNVl6RDQ2U1VPd2lndEpoY1BpUjM3VWVxSEFkTm5sQ0JKQWNZZE95UVJuY1RjTVVrSzBpeGgra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a0ViSUx1YXBpSitsM09QcVlWTVZVSlRNQnFlMU4yaWg4V3NhL0kyV3QycHA2VzAvMER6N201Q2Q0K1h1WU55Z1ZEMGUrTTczcE5YVDJVWkhZNHZtdkgvVnZPd3hTNEFjb2JvdDAzN2txd3ExZGozZW1mNG9hbWhySHBXcTdmMlF4clFYZm0rcTkzeW1MOS9hVVExQytSUmtGbTVQeFdpaHA4Y2ZndS9MSDg1TjVQTjdwRk9ldGZ1ZGFJZE9lRG1JM09kdS9nTDc5bjJPNHNzUXVZdGY1L3pJS0V1Ykgvd1FBQVAvL2tEU0VGSUkwQUFBPQ=="},"type":"helm.sh/release.v1"}]} + string: '{"kind":"SecretList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets","resourceVersion":"818939"},"items":[{"metadata":{"name":"default-token-btnzt","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/default-token-btnzt","uid":"6ef15ddd-84dc-4c91-bb02-036e36738f2f","resourceVersion":"818890","creationTimestamp":"2021-02-10T19:24:55Z","annotations":{"kubernetes.io/service-account.name":"default","kubernetes.io/service-account.uid":"e1912bd8-7458-46ae-98af-e458d52c4729"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:55Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQ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CUjU5T1JoRTJpcjl4Y2VveEcyU2tibnAybE5KcGRtbjlQaW81QkdTZ1JWQ21FU0FDck9aM1JzWDIyWU9pYWl2SzRfeko5TVh3NDM5eVZMeXpVci1GUVFFc0ZvV2tXcnhUcWlIb01DeFRLUTNEaDdYUFoyTjZsc2MwaHNfcnBtQnFCaUNaejBOV1c0UldtRGJsU3FaYnp5ZUZON05HdzBqRmQtZDNFUEhvVXl1a0NYenlNUF9UWUZ5dldsWEtmWUlaM2ZnRHhXd1J6NDQ3Tkp3clpSbzJyYkFzZ25TWjY2MVEyNnVWU3ZVRWxkRWc="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818939","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"},{"metadata":{"name":"kubetruth-test-app","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/kubetruth-test-app","uid":"cdd1b524-e47b-473e-b4fa-5ef9a4320066","resourceVersion":"818889","creationTimestamp":"2021-02-10T19:24:55Z","labels":{"app.kubernetes.io/instance":"kubetruth-test-app","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kubetruth","app.kubernetes.io/version":"0.1.0","helm.sh/chart":"kubetruth-0.1.0"},"annotations":{"meta.helm.sh/release-name":"kubetruth-test-app","meta.helm.sh/release-namespace":"kubetruth-test-ns"},"managedFields":[{"manager":"Go-http-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:55Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:CT_API_KEY":{}},"f:metadata":{"f:annotations":{".":{},"f:meta.helm.sh/release-name":{},"f:meta.helm.sh/release-namespace":{}},"f:labels":{".":{},"f:app.kubernetes.io/instance":{},"f:app.kubernetes.io/managed-by":{},"f:app.kubernetes.io/name":{},"f:app.kubernetes.io/version":{},"f:helm.sh/chart":{}}},"f:type":{}}}]},"data":{"CT_API_KEY":"czlEN0VNa0xGVGkzUGJraUdwdjViY1JS"},"type":"Opaque"},{"metadata":{"name":"kubetruth-test-app-token-vv25g","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/kubetruth-test-app-token-vv25g","uid":"295c0cf2-b63e-49fc-8488-f2173c7dbdf0","resourceVersion":"818894","creationTimestamp":"2021-02-10T19:24:55Z","annotations":{"kubernetes.io/service-account.name":"kubetruth-test-app","kubernetes.io/service-account.uid":"6242e898-2701-4e08-89bb-554439ee75f7"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:55Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTk5VCnJRS3NjVk5OQVBjbGF5MEkzMUQ2TjVrVmNvQ0o3b1ZTa3VjVG5ZZFFKT1dodTFjdHJPV3NXbzhIenZDZnpuQUoKb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JUTE9zZXBFTk4ybTYyLXg3VlBlei1nV3hiWVJMUFA0cmRVOUxKY0NvajJGcjFDMUxRd3lKd0hMNmFmWlBsV3BrdDZXbW1YM2VOdTBfZ0Q2aTY1S1JOOURnOU01YzlScGMtRnBzVzRxZ0NQbXBjZDZ3YVFSWkdrQTJrYmlNbkpUenJWVTZwNEZLMjhuUFNhdw=="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"sh.helm.release.v1.kubetruth-test-app.v1","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/sh.helm.release.v1.kubetruth-test-app.v1","uid":"e5eab880-1804-4c40-8435-684e7b93eef8","resourceVersion":"818897","creationTimestamp":"2021-02-10T19:24:55Z","labels":{"modifiedAt":"1612985095","name":"kubetruth-test-app","owner":"helm","status":"deployed","version":"1"},"managedFields":[{"manager":"helm","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:56Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:release":{}},"f:metadata":{"f:labels":{".":{},"f:modifiedAt":{},"f:name":{},"f:owner":{},"f:status":{},"f:version":{}}},"f:type":{}}}]},"data":{"release":"SDRzSUFBQUFBQUFDLyt4YmVZK2J5TGIvS2hiMzMrNE00RENKTGQwL0RHbGphTGNUNHpaTFRZOUdWRUVEZGhVd0xMWnhsTy8rVkd6R2EzZm16cnluOS9SYWlzSlMxRG5uZC9hcThuY210SW5MREpsMUR0MHN5VFAvUG5QVDdONk9ZK2FPQ2NMWGlCbCtaMTZESk0zK2NOd1lSNFhyTUVPR1ozbnVudVh2T2ZhWit6amtQdzRGNGNNbm9UL2dQOTJ6d3BCbG1Uc0cyei85aWVOaU55c0hsemNwU29JNEM2S1FHVEpLbUdZMnhqMFVrWmdPWXU2WU5MT3pQR1dHVEV2a2pnbWp6S1dQWGtMbXh4MkRmRHZKS1AvRXpXekh6bXg2ZlNvdmM4ZHMzQ1N0eUxBZnVBL3NHZkZuMysxSk9NcWRaL3B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ri9HNGZ2VkdoM3plQ3Y2VldzWnZockhucEI5V2tPVnk3S0dnMWZEcThVb1ZzazNpSkNSZGZjMTVKRzEwUnZ6OXBvL0FZNDd3TCs1QkRqTWU1MkhLY2RpTCswWS84L3FaQ1hNSTFkVk1wVlY2YnBzTWZSMjdTdWZHdVppWjBoZjlwRjRkMHkvaFVwRzlVMjFMdDZvbi80bUpPZjRPV3ZZZDZpVk40YytjN3NwdGZRMFVjVmZZZm43eithYXhTRm1SMkVidElWNmI1M1ZZUmJzeDdQVFAvS2hxZk1XeGRhbytHUnhYUSsrTmEyV3NOZTFXbDFoeHlDOGkzS2JyZ1pKeEU1R1hOZi8wYXRpUmZIZitFYmVKWXFUTHowYk5KeVRQZUhlRnpWQ0pWQjYvekhpV0hLL1BpdkFBQUEvLytsS1JDVnVUZ0FBQT09"},"type":"helm.sh/release.v1"}]} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -176,15 +176,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - - '501' + - '500' body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220122","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818939","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -212,21 +212,21 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - - '501' + - '500' body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220122","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818939","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: put uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220122","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque","stringData":{"bar":"bum"}}' + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818939","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque","stringData":{"bar":"bum"}}' headers: Accept: - "*/*" @@ -237,7 +237,7 @@ http_interactions: Authorization: - Bearer Content-Length: - - '527' + - '526' Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Host: @@ -252,15 +252,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - - '501' + - '500' body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220124","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818941","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -288,15 +288,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - - '501' + - '500' body: encoding: UTF-8 - string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960","resourceVersion":"3220124","creationTimestamp":"2020-12-02T20:06:04Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2020-12-02T20:06:04Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns","selfLink":"/api/v1/namespaces/kubetruth-test-ns/secrets/foo","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4","resourceVersion":"818941","creationTimestamp":"2021-02-10T19:24:57Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: delete uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -326,15 +326,15 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - '156' body: encoding: UTF-8 - string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"secrets","uid":"6e068b40-be96-499d-bcfa-b97d2b8aa960"}} + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"secrets","uid":"26fc7eaa-409a-494c-ada6-aab1532ff1b4"}} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT - request: method: get uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns/secrets/foo @@ -362,7 +362,7 @@ http_interactions: Content-Type: - application/json Date: - - Wed, 02 Dec 2020 20:06:04 GMT + - Wed, 10 Feb 2021 19:24:57 GMT Content-Length: - '180' body: @@ -371,5 +371,5 @@ http_interactions: \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} ' - recorded_at: Wed, 02 Dec 2020 20:06:04 GMT + recorded_at: Wed, 10 Feb 2021 19:24:57 GMT recorded_with: VCR 6.0.0 diff --git a/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_use_multiple_namespaces_for_secrets.yml b/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_use_multiple_namespaces_for_secrets.yml new file mode 100644 index 0000000..e5b875c --- /dev/null +++ b/spec/fixtures/vcr/Kubetruth_KubeApi/secrets/can_use_multiple_namespaces_for_secrets.yml @@ -0,0 +1,937 @@ +--- +http_interactions: +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '234' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-secretns1\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-secretns1","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces + body: + encoding: UTF-8 + string: '{"metadata":{"name":"kubetruth-test-ns-secretns1"},"kind":"Namespace","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '88' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '505' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1","uid":"2862d200-16bf-4633-b646-5cbd7f3c5a59","resourceVersion":"818943","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '505' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1","uid":"2862d200-16bf-4633-b646-5cbd7f3c5a59","resourceVersion":"818943","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"],"storageVersionHash":"EBKMFVe6cwo="},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"],"storageVersionHash":"Q3oi5N2YM8M="},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"],"storageVersionHash":"XwShjMxG9Fs="},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"NodeProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"],"storageVersionHash":"QWTyNDq0dC4="},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"],"storageVersionHash":"HN/zwEC+JgM="},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"],"storageVersionHash":"xPOwRZ+Yhw8="},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"PodAttachOptions","verbs":["create","get"]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"PodExecOptions","verbs":["create","get"]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"PodPortForwardOptions","verbs":["create","get"]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"PodProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"LIXB2x4IFpk="},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"],"storageVersionHash":"Jond2If31h0="},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"],"storageVersionHash":"8uhSgffRX6w="},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"storageVersionHash":"S6u1pOWzb84="},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"],"storageVersionHash":"pbx9ZvyFpBE="},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"],"storageVersionHash":"0/CO1lhkEBI="},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"ServiceProxyOptions","verbs":["create","delete","get","patch","update"]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '234' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces + \"kubetruth-test-ns-secretns2\" not found","reason":"NotFound","details":{"name":"kubetruth-test-ns-secretns2","kind":"namespaces"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces + body: + encoding: UTF-8 + string: '{"metadata":{"name":"kubetruth-test-ns-secretns2"},"kind":"Namespace","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '88' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '505' + body: + encoding: UTF-8 + string: '{"kind":"Namespace","apiVersion":"v1","metadata":{"name":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2","uid":"d0a8b81e-3b91-44f8-abdb-a402d9e24b3d","resourceVersion":"818948","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}}}]},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '180' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"secrets + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1"},"stringData":{"bar":"baz"},"kind":"Secret","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '130' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818952","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"SecretList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets","resourceVersion":"818953"},"items":[{"metadata":{"name":"default-token-lqsxc","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/default-token-lqsxc","uid":"fa905845-3297-4f4d-b7cd-9a61984157e4","resourceVersion":"818945","creationTimestamp":"2021-02-10T19:24:58Z","annotations":{"kubernetes.io/service-account.name":"default","kubernetes.io/service-account.uid":"c9179c91-4081-4aa8-bc03-be76cee94606"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTk5VCnJRS3NjVk5OQVBjbGF5MEkzMUQ2TjVrVmNvQ0o3b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ZW5ZUG8wTVZLWktWanFORWNmSFJkU1VyRFpQV2tVR1J1blBqOE1fajZWdmxsY05qOTljYWVQX2ZFUHRrNFdKZm1IVzZRMl92cG92SEVCYy16V1pOanJIZFBMNXJqMlJJcFRUMUtOcVRoajF0QmxkSTRTMk9uUnVXbWxfa1Z5cm9KS3RwMTU3VExHYjFjbUo4V2RqeVJUY01wWGkzSlZuUU5yYVE="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818952","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818952","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818952","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: put + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818952","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque","stringData":{"bar":"bum"}}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '546' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818955","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns1","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9","resourceVersion":"818955","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: delete + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '156' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"secrets","uid":"6b7172a0-49a0-4913-aaa4-230e050473e9"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns1/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '180' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"secrets + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '180' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"secrets + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: post + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets + body: + encoding: UTF-8 + string: '{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2"},"stringData":{"bar":"baz"},"kind":"Secret","apiVersion":"v1"}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '130' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 201 + message: Created + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818957","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: '{"kind":"SecretList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets","resourceVersion":"818957"},"items":[{"metadata":{"name":"default-token-7nfft","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/default-token-7nfft","uid":"b43aec7a-5486-48af-9669-2bf339fd28a0","resourceVersion":"818953","creationTimestamp":"2021-02-10T19:24:58Z","annotations":{"kubernetes.io/service-account.name":"default","kubernetes.io/service-account.uid":"f2a9bcf5-652c-44b7-ab4c-e07d0f185478"},"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:ca.crt":{},"f:namespace":{},"f:token":{}},"f:metadata":{"f:annotations":{".":{},"f:kubernetes.io/service-account.name":{},"f:kubernetes.io/service-account.uid":{}}},"f:type":{}}}]},"data":{"ca.crt":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJd01UQXlNREU0TVRNME9Wb1hEVE13TVRBeE9ERTRNVE0wT1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTk5VCnJRS3NjVk5OQVBjbGF5MEkzMUQ2TjVrVmNvQ0o3b1ZTa3VjVG5ZZFFKT1dodTFjdHJPV3NXbzhIenZDZnpuQUoKb2h4Vk9UajZib1NNZ2RkcW9xVDYwVjJpcVRNanJwbXN3MTM1dGhLVnVIOGhyRldUKzNGbld3NFdCaExpOTlGUgo1WlNhQlAvaXJmRk9qR1ovTTY5OUpyRUZ6K2hITDhCT1NaQVRqREtIRysyaEVjYTZidS8wcHpvVDBYSWwvcWNRClRLOUFsUjdqaUZkWitrTW5iaWF0M2dXakhZcjkxUmpTMi8ycWJGVnczTGVBdHRKZHh2eHFxeCtKdm00NVhpNDcKZXpaRUNmcmhsWHNZT3dPbTBjcHVGMEpFVE1od2NZK2VJNmpmUjdpMDFFbENEaW5HSVY0OExhN1ZKV3l6NlYvUwpVSFQ2OTBvcVF1RXVydGYyeDE4Q0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWU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ZG1salpTMWhZMk52ZFc1MExtNWhiV1VpT2lKa1pXWmhkV3gwSWl3aWEzVmlaWEp1WlhSbGN5NXBieTl6WlhKMmFXTmxZV05qYjNWdWRDOXpaWEoyYVdObExXRmpZMjkxYm5RdWRXbGtJam9pWmpKaE9XSmpaalV0TmpVeVl5MDBOR0kzTFdGaU5HTXRaVEEzWkRCbU1UZzFORGM0SWl3aWMzVmlJam9pYzNsemRHVnRPbk5sY25acFkyVmhZMk52ZFc1ME9tdDFZbVYwY25WMGFDMTBaWE4wTFc1ekxYTmxZM0psZEc1ek1qcGtaV1poZFd4MEluMC5qbnNCekFPYkZDZjdWVjRpU1M2RGpTVlNmencyd3RKc1FFZVJZbVNOdnpFVzBYYXktVXd3ai0xZVdMNEtpb2dKS0NsQngxa08wRGRSN1duellCdWxyR1RjUXVuNWh4cWRkV29VUE9XQ180MFZLUW0tME9hZ2IwdnVZLVQ1QUZZXzlJYTEwbFZ2Q2pLMU5mTnRKNXNtRWlFN1hnQVV2X1lqZ29wYmxiLVVkWkM4dWFCUzZya0Z3MVZsSFZEOWMwMjI5YUlPajFTTUJkVHRJNHdxcXhaVy1ZVmpnZnhkSThKV2k3R0FsRjBTeVJSZjhOYzlhVUVDT0Q0TjVoR2V1anRoSmJMbHRfdzlOZlFDQVdnVGpUcFF2dzVLZS1TUmhVOFg3OHR5RjZDdjRucnI1WFBZYkNnSDR6WjFLdzNuX1RsUTlrcFd0N2JyZXlQYnp1YWVGaTZWUVE="},"type":"kubernetes.io/service-account-token"},{"metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818957","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"}]} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818957","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818957","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: put + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818957","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YmF6"},"type":"Opaque","stringData":{"bar":"bum"}}' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Content-Length: + - '546' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818958","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '520' + body: + encoding: UTF-8 + string: '{"kind":"Secret","apiVersion":"v1","metadata":{"name":"foo","namespace":"kubetruth-test-ns-secretns2","selfLink":"/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f","resourceVersion":"818958","creationTimestamp":"2021-02-10T19:24:58Z","managedFields":[{"manager":"rest-client","operation":"Update","apiVersion":"v1","time":"2021-02-10T19:24:58Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:bar":{}},"f:type":{}}}]},"data":{"bar":"YnVt"},"type":"Opaque"} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: delete + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Content-Type: + - application/json + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '156' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"foo","kind":"secrets","uid":"5f7701f3-ca35-42b7-8853-4fd668e3803f"}} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +- request: + method: get + uri: https://kubernetes.docker.internal:6443/api/v1/namespaces/kubetruth-test-ns-secretns2/secrets/foo + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*" + User-Agent: + - rest-client/2.1.0 (darwin19.6.0 x86_64) ruby/2.7.2p137 + Authorization: + - Bearer + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Host: + - kubernetes.docker.internal:6443 + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache, private + Content-Type: + - application/json + Date: + - Wed, 10 Feb 2021 19:24:58 GMT + Content-Length: + - '180' + body: + encoding: UTF-8 + string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"secrets + \"foo\" not found","reason":"NotFound","details":{"name":"foo","kind":"secrets"},"code":404} + + ' + recorded_at: Wed, 10 Feb 2021 19:24:58 GMT +recorded_with: VCR 6.0.0 diff --git a/spec/kubetruth/cli_spec.rb b/spec/kubetruth/cli_spec.rb index 80efda0..fcfaf04 100644 --- a/spec/kubetruth/cli_spec.rb +++ b/spec/kubetruth/cli_spec.rb @@ -90,6 +90,7 @@ def all_usage(clazz, path=[]) --environment production --organization acme --api-key abc123 + --namespace-template nstmpl --name-template ntmpl --key-template ktmpl --key-prefix prefix1 @@ -105,7 +106,7 @@ def all_usage(clazz, path=[]) ] etl = double(ETL) expect(ETL).to receive(:new).with(key_prefixes: %w[prefix1 prefix2], key_patterns: [/pat1/, /pat2/], - name_template: "ntmpl", key_template: "ktmpl", + namespace_template: "nstmpl", name_template: "ntmpl", key_template: "ktmpl", ct_context: { organization: "acme", environment: "production", diff --git a/spec/kubetruth/etl_spec.rb b/spec/kubetruth/etl_spec.rb index 9b76247..7553114 100644 --- a/spec/kubetruth/etl_spec.rb +++ b/spec/kubetruth/etl_spec.rb @@ -6,20 +6,27 @@ module Kubetruth let(:init_args) {{ key_prefixes: [""], key_patterns: [/./], - name_template: "%s", key_template: "%s", + namespace_template: nil, name_template: "%s", key_template: "%s", ct_context: {}, kube_context: {} }} + def kubeapi(ns) + kapi = double(Kubetruth::KubeApi) + allow(Kubetruth::KubeApi).to receive(:new).with(hash_including(namespace: ns)).and_return(kapi) + allow(kapi).to receive(:get_config_map_names).and_return([]) + allow(kapi).to receive(:get_secret_names).and_return([]) + allow(kapi).to receive(:ensure_namespace) unless ns.nil? + allow(kapi).to receive(:namespace).and_return(ns.nil? ? "default_ns" : ns) + kapi + end + before(:each) do @ctapi_class = Class.new @ctapi = double() allow(Kubetruth).to receive(:CtApi).and_return(@ctapi_class) allow(@ctapi_class).to receive(:new).and_return(@ctapi) - @kubeapi = double(Kubetruth::KubeApi) - allow(Kubetruth::KubeApi).to receive(:new).and_return(@kubeapi) - allow(@kubeapi).to receive(:get_config_map_names).and_return([]) - allow(@kubeapi).to receive(:get_secret_names).and_return([]) + @kubeapi = kubeapi(nil) end describe "#ctapi" do @@ -33,9 +40,21 @@ module Kubetruth describe "#kubeapi" do + it "passes namespace to ctor" do + etl = described_class.new(init_args) + expect(Kubetruth::KubeApi).to receive(:new).with(hash_including(namespace: "foo")) + etl.kubeapi("foo") + end + + it "overrides namespace from kube context in ctor" do + etl = described_class.new(init_args.merge({kube_context: {namespace: "bar"}})) + expect(Kubetruth::KubeApi).to receive(:new).with(hash_including(namespace: "foo")) + etl.kubeapi("foo") + end + it "is memoized" do etl = described_class.new(init_args) - expect(etl.kubeapi).to equal(etl.kubeapi) + expect(etl.kubeapi(nil)).to equal(etl.kubeapi(nil)) end end @@ -52,11 +71,11 @@ module Kubetruth it "segregates secret params into their own hash" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: false) ], - group2: [ + {namespace: nil, name: "group2"} => [ Parameter.new(key: "param3", value: "value3", secret: true), Parameter.new(key: "param4", value: "value4", secret: false) ] @@ -64,7 +83,7 @@ module Kubetruth config, secrets = etl.partition_secrets(param_groups) expect(config.keys).to eq(param_groups.keys) expect(config.values.flatten.collect(&:key)).to eq(["param1", "param2", "param4"]) - expect(secrets.keys).to eq([:group2]) + expect(secrets.keys).to eq([{namespace: nil, name: "group2"}]) expect(secrets.values.flatten.collect(&:key)).to eq(["param3"]) end @@ -149,6 +168,7 @@ module Kubetruth it "applies templates to matches" do etl = described_class.new(init_args.merge( key_patterns: [/^(?[^\.]+)\.(?[^\.]+)\.(?.*)/], + namespace_template: "ns-%{name}", name_template: "%{name}", key_template: "%{key}" )) @@ -158,8 +178,25 @@ module Kubetruth ]) param_groups = etl.get_param_groups expect(param_groups.size).to eq(2) - expect(param_groups["name1"]).to eq([Parameter.new(original_key: "svc.name1.key1", key: "key1", value: "value1", secret: false)]) - expect(param_groups["name2"]).to eq([Parameter.new(original_key: "svc.name2.key2", key: "key2", value: "value2", secret: false)]) + expect(param_groups[{namespace: "ns-name1", name: "name1"}]).to eq([Parameter.new(original_key: "svc.name1.key1", key: "key1", value: "value1", secret: false)]) + expect(param_groups[{namespace: "ns-name2", name: "name2"}]).to eq([Parameter.new(original_key: "svc.name2.key2", key: "key2", value: "value2", secret: false)]) + end + + it "makes name and namespace dns safe" do + etl = described_class.new(init_args.merge( + key_patterns: [/^(?[^\.]+)\.(?[^\.]+)\.(?.*)/], + namespace_template: "ns_%{name}", + name_template: "nm_%{name}", + key_template: "k_%{key}" + )) + expect(@ctapi).to receive(:parameters).and_return([ + Parameter.new(key: "svc.name1.key1", value: "value1", secret: false), + Parameter.new(key: "svc.name2.key2", value: "value2", secret: false) + ]) + param_groups = etl.get_param_groups + expect(param_groups.size).to eq(2) + expect(param_groups[{namespace: "ns-name1", name: "nm-name1"}]).to eq([Parameter.new(original_key: "svc.name1.key1", key: "k_key1", value: "value1", secret: false)]) + expect(param_groups[{namespace: "ns-name2", name: "nm-name2"}]).to eq([Parameter.new(original_key: "svc.name2.key2", key: "k_key2", value: "value2", secret: false)]) end it "has a number of template options" do @@ -173,7 +210,7 @@ module Kubetruth ]) param_groups = etl.get_param_groups expect(param_groups.size).to eq(1) - expect(param_groups["svc.name1"]).to eq([Parameter.new(original_key: "svc.name1.key1", key: "start.key1.name1.svc.middle.KEY1.NAME1.SVC.end", value: "value1", secret: false)]) + expect(param_groups[{namespace: nil, name: "svc.name1"}]).to eq([Parameter.new(original_key: "svc.name1.key1", key: "start.key1.name1.svc.middle.KEY1.NAME1.SVC.end", value: "value1", secret: false)]) end end @@ -183,7 +220,7 @@ module Kubetruth it "calls kube to create new config map" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: false) ] @@ -197,7 +234,7 @@ module Kubetruth it "calls kube to update config map" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: false) ] @@ -211,7 +248,7 @@ module Kubetruth it "doesn't update config map if data same" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: false) ] @@ -222,6 +259,30 @@ module Kubetruth etl.apply_config_maps(param_groups) end + it "uses namespace for kube when supplied" do + etl = described_class.new(init_args.merge(namespace_template: "%{name}")) + param_groups = { + {namespace: "foo", name: "group1"} => [ + Parameter.new(key: "param1", value: "value1", secret: false), + Parameter.new(key: "param2", value: "value2", secret: false) + ], + {namespace: "bar", name: "group2"} => [ + Parameter.new(key: "param21", value: "value21", secret: false) + ] + } + foo_kapi = kubeapi("foo") + bar_kapi = kubeapi("bar") + expect(etl).to receive(:kubeapi).with("foo").at_least(:once).and_return(foo_kapi) + expect(etl).to receive(:kubeapi).with("bar").at_least(:once).and_return(bar_kapi) + expect(foo_kapi).to receive(:get_config_map).with("group1").and_raise(Kubeclient::ResourceNotFoundError.new(1, "", 2)) + expect(foo_kapi).to_not receive(:update_config_map) + expect(foo_kapi).to receive(:create_config_map).with("group1", {"param1" => "value1", "param2" => "value2"}) + expect(bar_kapi).to receive(:get_config_map).with("group2").and_raise(Kubeclient::ResourceNotFoundError.new(1, "", 2)) + expect(bar_kapi).to_not receive(:update_config_map) + expect(bar_kapi).to receive(:create_config_map).with("group2", {"param21" => "value21"}) + etl.apply_config_maps(param_groups) + end + end describe "#apply_secrets" do @@ -229,7 +290,7 @@ module Kubetruth it "calls kube to create new secret" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: true), Parameter.new(key: "param2", value: "value2", secret: true) ] @@ -243,7 +304,7 @@ module Kubetruth it "calls kube to update secret" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: true), Parameter.new(key: "param2", value: "value2", secret: true) ] @@ -257,7 +318,7 @@ module Kubetruth it "doesn't update secret if data same" do etl = described_class.new(init_args) param_groups = { - group1: [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: true), Parameter.new(key: "param2", value: "value2", secret: true) ] @@ -268,6 +329,21 @@ module Kubetruth etl.apply_secrets(param_groups) end + it "uses namespace for kube when supplied" do + etl = described_class.new(init_args) + param_groups = { + {namespace: "foo", name: "group1"} => [ + Parameter.new(key: "param1", value: "value1", secret: true), + Parameter.new(key: "param2", value: "value2", secret: true) + ] + } + foo_kapi = kubeapi("foo") + expect(foo_kapi).to receive(:get_secret).with("group1").and_raise(Kubeclient::ResourceNotFoundError.new(1, "", 2)) + expect(foo_kapi).to_not receive(:update_secret) + expect(foo_kapi).to receive(:create_secret).with("group1", {"param1" => "value1", "param2" => "value2"}) + etl.apply_secrets(param_groups) + end + end describe "#apply" do @@ -275,21 +351,22 @@ module Kubetruth it "sets config and secrets" do etl = described_class.new(init_args) param_groups = { - "group1" => [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: true) ] } + pgkey = {namespace: nil, name: "group1"} expect(etl).to receive(:get_param_groups).and_return(param_groups) - expect(etl).to receive(:apply_config_maps).with({"group1" => [param_groups["group1"][0]]}) - expect(etl).to receive(:apply_secrets).with({"group1" => [param_groups["group1"][1]]}) + expect(etl).to receive(:apply_config_maps).with({pgkey => [param_groups[pgkey][0]]}) + expect(etl).to receive(:apply_secrets).with({pgkey => [param_groups[pgkey][1]]}) etl.apply() end it "sets secrets as config" do etl = described_class.new(init_args) param_groups = { - "group1" => [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: true) ] @@ -303,13 +380,14 @@ module Kubetruth it "skips secrets" do etl = described_class.new(init_args) param_groups = { - "group1" => [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: true) ] } + pgkey = {namespace: nil, name: "group1"} expect(etl).to receive(:get_param_groups).and_return(param_groups) - expect(etl).to receive(:apply_config_maps).with({"group1" => [param_groups["group1"][0]]}) + expect(etl).to receive(:apply_config_maps).with({pgkey => [param_groups[pgkey][0]]}) expect(etl).to receive(:apply_secrets).never etl.apply(skip_secrets: true) end @@ -317,7 +395,7 @@ module Kubetruth it "allows dryrun" do etl = described_class.new(init_args) param_groups = { - "group1" => [ + {namespace: nil, name: "group1"} => [ Parameter.new(key: "param1", value: "value1", secret: false), Parameter.new(key: "param2", value: "value2", secret: true) ] diff --git a/spec/kubetruth/kubeapi_spec.rb b/spec/kubetruth/kubeapi_spec.rb index 7954c00..c7f0f90 100644 --- a/spec/kubetruth/kubeapi_spec.rb +++ b/spec/kubetruth/kubeapi_spec.rb @@ -2,6 +2,7 @@ require 'kubetruth/kubeapi' module Kubetruth + # describe KubeApi, :vcr => {:record => :all} do describe KubeApi, :vcr do def namespace; "kubetruth-test-ns"; end @@ -10,7 +11,9 @@ def helm_name; "kubetruth-test-app"; end if ! ENV['CI'] def teardown sysrun("helm delete --namespace #{namespace} #{helm_name}", output_on_fail: false, allow_fail: true) - sysrun("kubectl --context docker-desktop delete namespace #{namespace}", output_on_fail: false, allow_fail: true) + existing_namespaces.each do |ns| + sysrun("kubectl --context docker-desktop delete namespace #{ns}", output_on_fail: false, allow_fail: true) + end end def setup @@ -30,6 +33,13 @@ def token end end + def existing_namespaces + names = sysrun("kubectl --context docker-desktop get namespace").lines + names = names.grep(/#{namespace}/) + names = names.collect {|n| n.split.first } + names + end + before(:all) do setup end @@ -43,6 +53,26 @@ def token; ""; end let(:kubeapi) { described_class.new(namespace: namespace, token: token, api_url: "https://kubernetes.docker.internal:6443") } + describe "initialize" do + + it "uses supplied namespace" do + expect(described_class.new(namespace: "foo").namespace).to eq("foo") + end + + end + + describe "ensure_namespace" do + + it "creates namespace if not present" do + kapi = described_class.new(namespace: "#{namespace}-newns", token: token, api_url: "https://kubernetes.docker.internal:6443") + expect { kapi.create_config_map("foo", {}) }.to raise_error(Kubeclient::ResourceNotFoundError, /namespaces.*not found/) + kapi.ensure_namespace + kapi.create_config_map("foo", {bar: "baz"}) + expect(kapi.get_config_map("foo")).to eq(bar: "baz") + end + + end + describe "configmaps" do it "can crud config maps" do @@ -56,6 +86,32 @@ def token; ""; end expect { kubeapi.get_config_map("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) end + it "can use multiple namespaces for config maps" do + ns1_kapi = described_class.new(namespace: "#{namespace}-cmns1", token: token, api_url: "https://kubernetes.docker.internal:6443") + ns1_kapi.ensure_namespace + ns1_kapi.ensure_namespace + ns2_kapi = described_class.new(namespace: "#{namespace}-cmns2", token: token, api_url: "https://kubernetes.docker.internal:6443") + ns2_kapi.ensure_namespace + + expect { ns1_kapi.get_config_map("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + cm = ns1_kapi.create_config_map("foo", {bar: "baz"}) + expect(ns1_kapi.get_config_map_names).to include("foo") + expect(ns1_kapi.get_config_map("foo")).to eq({bar: "baz"}) + ns1_kapi.update_config_map("foo", {bar: "bum"}) + expect(ns1_kapi.get_config_map("foo")).to eq({bar: "bum"}) + ns1_kapi.delete_config_map("foo") + expect { ns1_kapi.get_config_map("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + + expect { ns2_kapi.get_config_map("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + cm = ns2_kapi.create_config_map("foo", {bar: "baz"}) + expect(ns2_kapi.get_config_map_names).to include("foo") + expect(ns2_kapi.get_config_map("foo")).to eq({bar: "baz"}) + ns2_kapi.update_config_map("foo", {bar: "bum"}) + expect(ns2_kapi.get_config_map("foo")).to eq({bar: "bum"}) + ns2_kapi.delete_config_map("foo") + expect { ns2_kapi.get_config_map("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + end + end describe "secrets" do @@ -71,6 +127,32 @@ def token; ""; end expect { kubeapi.get_secret("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) end + it "can use multiple namespaces for secrets" do + ns1_kapi = described_class.new(namespace: "#{namespace}-secretns1", token: token, api_url: "https://kubernetes.docker.internal:6443") + ns1_kapi.ensure_namespace + ns1_kapi.ensure_namespace + ns2_kapi = described_class.new(namespace: "#{namespace}-secretns2", token: token, api_url: "https://kubernetes.docker.internal:6443") + ns2_kapi.ensure_namespace + + expect { ns1_kapi.get_secret("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + cm = ns1_kapi.create_secret("foo", {bar: "baz"}) + expect(ns1_kapi.get_secret_names).to include("foo") + expect(ns1_kapi.get_secret("foo")).to eq({bar: "baz"}) + ns1_kapi.update_secret("foo", {bar: "bum"}) + expect(ns1_kapi.get_secret("foo")).to eq({bar: "bum"}) + ns1_kapi.delete_secret("foo") + expect { ns1_kapi.get_secret("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + + expect { ns2_kapi.get_secret("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + cm = ns2_kapi.create_secret("foo", {bar: "baz"}) + expect(ns2_kapi.get_secret_names).to include("foo") + expect(ns2_kapi.get_secret("foo")).to eq({bar: "baz"}) + ns2_kapi.update_secret("foo", {bar: "bum"}) + expect(ns2_kapi.get_secret("foo")).to eq({bar: "bum"}) + ns2_kapi.delete_secret("foo") + expect { ns2_kapi.get_secret("foo") }.to raise_error(Kubeclient::ResourceNotFoundError) + end + end end