kubernetes-cli 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +15 -3
- data/README.md +49 -0
- data/Rakefile +3 -1
- data/kubernetes-cli.gemspec +2 -2
- data/lib/kubernetes-cli/version.rb +3 -1
- data/lib/kubernetes-cli.rb +274 -52
- data/rbi/kubernetes-cli.rbi +216 -0
- data/spec/cli_spec.rb +597 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/support/matchers.rb +123 -0
- data/spec/support/test_cli.rb +31 -0
- data/spec/support/test_config_map.yaml +7 -0
- data/spec/support/test_config_map_bad.yaml +8 -0
- data/spec/support/test_resource.rb +22 -0
- metadata +14 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0707011c2436682540842704a82abf87ab93497f7195ca11603ecdd78216d2a9
|
4
|
+
data.tar.gz: 29af2ba1be9b5c483817e91b10ed410103a96bf59f32d9f03e8056d37e06e55d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2702486be69a391fdabfd0cf1d3acce0034b5f7e59006145d4987b42699a425a6a08eae66af6abc538dc55c00d984003c4a903c96ea01a49eecf5c37e1e829
|
7
|
+
data.tar.gz: ff00655941c13e125b838c4aac18008b11b58883b204eede1e9660f25e6f7e0749a8cf063f20fe79e11fd24bf86151546d9b687bd1d81d4b879ab00ac2d989a4
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -6,10 +6,22 @@ gemspec
|
|
6
6
|
# See: https://github.com/rubygems/rubygems/issues/3646
|
7
7
|
gem 'kubectl-rb'
|
8
8
|
|
9
|
+
group :test do
|
10
|
+
gem 'rspec'
|
11
|
+
gem 'kind-rb', '~> 0.1'
|
12
|
+
gem 'kube-dsl', '~> 0.6'
|
13
|
+
end
|
14
|
+
|
9
15
|
group :development do
|
10
|
-
gem '
|
16
|
+
gem 'curdle', '~> 1.0'
|
17
|
+
|
18
|
+
# lock to same version as kuby-core
|
19
|
+
gem 'sorbet', '= 0.5.10851'
|
20
|
+
gem 'parlour', '~> 7.0'
|
21
|
+
gem 'tapioca', '~> 0.11'
|
11
22
|
end
|
12
23
|
|
13
|
-
group :test do
|
14
|
-
gem '
|
24
|
+
group :development, :test do
|
25
|
+
gem 'pry-byebug'
|
26
|
+
gem 'rake'
|
15
27
|
end
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
## kubernetes-cli
|
2
|
+
|
3
|
+

|
4
|
+

|
5
|
+
|
6
|
+
A Ruby wrapper around the Kubernetes CLI.
|
7
|
+
|
8
|
+
### Usage
|
9
|
+
|
10
|
+
Create a new instance by passing the path to your Kube config (usually ~/.kube/config) and optionally the path to the kubectl executable (by default, the executable path comes from the [kubectl-rb gem](https://github.com/getkuby/kubectl-rb)).
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
cli = KubernetesCLI(File.join(ENV['HOME'], '.kube', 'config'))
|
14
|
+
```
|
15
|
+
|
16
|
+
### Available Methods
|
17
|
+
|
18
|
+
- `annotate`
|
19
|
+
- `api_resources`
|
20
|
+
- `apply`
|
21
|
+
- `apply_uri`
|
22
|
+
- `current_context`
|
23
|
+
- `delete_object`
|
24
|
+
- `delete_objects`
|
25
|
+
- `exec_cmd`
|
26
|
+
- `executable`
|
27
|
+
- `get_object`
|
28
|
+
- `get_objects`
|
29
|
+
- `kubeconfig_path`
|
30
|
+
- `last_status`
|
31
|
+
- `logtail`
|
32
|
+
- `patch_object`
|
33
|
+
- `restart_deployment`
|
34
|
+
- `run_cmd`
|
35
|
+
- `system_cmd`
|
36
|
+
|
37
|
+
Please see the source code for available options.
|
38
|
+
|
39
|
+
## Running Tests
|
40
|
+
|
41
|
+
`bundle exec rspec` should do the trick. Requires that you have Docker installed.
|
42
|
+
|
43
|
+
## License
|
44
|
+
|
45
|
+
Licensed under the MIT license. See LICENSE for details.
|
46
|
+
|
47
|
+
## Authors
|
48
|
+
|
49
|
+
* Cameron C. Dutro: http://github.com/camertron
|
data/Rakefile
CHANGED
data/kubernetes-cli.gemspec
CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
|
|
11
11
|
|
12
12
|
s.description = s.summary = 'Ruby wrapper around the Kubernetes CLI.'
|
13
13
|
|
14
|
-
s.add_dependency 'kubectl-rb', '~> 0.
|
14
|
+
s.add_dependency 'kubectl-rb', '~> 0.2'
|
15
15
|
|
16
16
|
s.require_path = 'lib'
|
17
|
-
s.files = Dir['{lib,spec,
|
17
|
+
s.files = Dir['{lib,spec,rbi}/**/*', 'Gemfile', 'LICENSE', 'CHANGELOG.md', 'README.md', 'Rakefile', 'kubernetes-cli.gemspec']
|
18
18
|
end
|