kubes 0.7.9 → 0.7.10
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 +7 -0
- data/docs/.gitignore +1 -0
- data/docs/Gemfile +1 -0
- data/docs/_config.yml +2 -0
- data/docs/_docs/config/hooks/docker.md +2 -0
- data/docs/_docs/config/hooks/generator.md +16 -0
- data/docs/_docs/config/hooks/kubectl.md +2 -0
- data/docs/_docs/config/hooks/kubes.md +2 -0
- data/docs/_docs/helpers/aws/iam-role.md +1 -0
- data/docs/_docs/vs/kustomize.md +1 -1
- data/docs/_includes/banner/foot.html +2 -0
- data/docs/_includes/banner/head.html +5 -0
- data/docs/_includes/config/hooks/generator.md +6 -0
- data/docs/_includes/intro/install.md +1 -1
- data/docs/_includes/learn/next-steps.md +11 -0
- data/docs/_includes/sidebar.html +1 -1
- data/docs/_layouts/default.html +2 -0
- data/docs/_reference/kubes-new-hook.md +30 -0
- data/docs/_reference/kubes-new-variable.md +7 -0
- data/docs/_reference/kubes-new.md +1 -0
- data/docs/bin/web +1 -1
- data/kubes.gemspec +1 -0
- data/lib/kubes/cli/help/new/hook.md +9 -0
- data/lib/kubes/cli/help/new/variable.md +6 -0
- data/lib/kubes/cli/new/hook.rb +18 -0
- data/lib/kubes/cli/new.rb +4 -0
- data/lib/kubes/version.rb +1 -1
- data/lib/kubes.rb +1 -0
- data/lib/templates/new/hooks/docker.rb +9 -0
- data/lib/templates/new/hooks/kubectl.rb +11 -0
- data/lib/templates/new/hooks/kubes.rb +9 -0
- data/lib/templates/yaml/.kubes/resources/base/deployment.yaml.tt +2 -0
- metadata +28 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6529d951f35f31cf105591f8d5ea0f3b8819e358f0b3388f22d17340af1f2bbf
|
4
|
+
data.tar.gz: d1c6e87a899a75a8f7078046c4058c69c46328c3b7138b4a934dae7fe287be4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 245ca41ceec0499da84ef056b19ad6f99e422f3c1013718d3e466128aeab6503fc1d0c3be19892633dab1acff1865816885fa6f7d1589c60d5ebe65cfaffab50
|
7
|
+
data.tar.gz: 551a265282d0a6af874517382859492bbe27bcd201790e94f3f7a9540d6ffeb4b6dc678b0aa1cfeab4e5983a0a591625da21ef7ec59bb01fe8c33fdbf681e8c2
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.7.10] - 2021-12-18
|
7
|
+
- [#56](https://github.com/boltops-tools/kubes/pull/56) New hook generator
|
8
|
+
- [#57](https://github.com/boltops-tools/kubes/pull/57) Fix activesupport require
|
9
|
+
- add nokogiri dependency. looks like aws-sdk removed it and its breaking specs
|
10
|
+
- hook generator docs
|
11
|
+
- new hook generator
|
12
|
+
|
6
13
|
## [0.7.9] - 2021-11-07
|
7
14
|
- [#55](https://github.com/boltops-tools/kubes/pull/55) make helper methods available in variables files
|
8
15
|
|
data/docs/.gitignore
CHANGED
data/docs/Gemfile
CHANGED
data/docs/_config.yml
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: Hook Generator
|
3
|
+
nav_text: Generator
|
4
|
+
categories: hooks
|
5
|
+
order: 9
|
6
|
+
---
|
7
|
+
|
8
|
+
## Examples
|
9
|
+
|
10
|
+
$ kubes new hook docker
|
11
|
+
create .kubes/config/hooks/docker.rb
|
12
|
+
$ kubes new hook kubectl
|
13
|
+
create .kubes/config/hooks/kubectl.rb
|
14
|
+
$ kubes new hook kubes
|
15
|
+
create .kubes/config/hooks/kubes.rb
|
16
|
+
$
|
@@ -4,6 +4,8 @@ nav_text: Kubectl
|
|
4
4
|
categories: hooks
|
5
5
|
---
|
6
6
|
|
7
|
+
{% include config/hooks/generator.md type="kubectl" %}
|
8
|
+
|
7
9
|
You can use hooks to run scripts at any part of the `kubectl` commands. Here's an example of running a script before and after the `kubectl apply` command for the `web/deployment` resource.
|
8
10
|
|
9
11
|
.kubes/config/hooks/kubectl.rb
|
@@ -16,6 +16,7 @@ iam_role = KubesAws::IamRole.new(
|
|
16
16
|
namespace: "demo-#{Kubes.env}", # defaults to APP-ENV when not set. IE: demo-dev
|
17
17
|
managed_policies: ["AmazonS3ReadOnlyAccess", "AmazonSSMReadOnlyAccess"], # defaults to empty when not set
|
18
18
|
inline_policies: [:secrets_read_only], # See Secrets Read Only Inline Policy at the bottom
|
19
|
+
# cluster: "eks-cluster-name", # inferred with kubectl when not set
|
19
20
|
)
|
20
21
|
before("apply",
|
21
22
|
label: "create iam role",
|
data/docs/_docs/vs/kustomize.md
CHANGED
@@ -135,7 +135,7 @@ You can even define your own custom helpers for even more control. See: [Helpers
|
|
135
135
|
|
136
136
|
## Kubes Features
|
137
137
|
|
138
|
-
Kubes does a lot more than
|
138
|
+
Kubes does a lot more than building YAML files. Here's a list of features:
|
139
139
|
|
140
140
|
{% include intro/features.md %}
|
141
141
|
|
@@ -0,0 +1,5 @@
|
|
1
|
+
{% assign buildtime = "now" | date: "%Y%m%d%H%M%S" %}
|
2
|
+
<link rel="preload" href="{{ site.ads_url }}/ads/{{ site.time | date: '%s' }}.js" as="script" />
|
3
|
+
<script data-cfasync="false" async src="{{ site.ads_url }}/ads/{{ site.time | date: '%s' }}.js"></script>
|
4
|
+
|
5
|
+
<div id="head-banner" class="head-banner"></div>
|
@@ -16,4 +16,4 @@ Kubes calls docker. Kubes has been tested with docker 18.x-ce+. Generally, it sh
|
|
16
16
|
|
17
17
|
## gcloud
|
18
18
|
|
19
|
-
If you are using the [gcloud builder](% link _docs/config/builder.md %), set up and configure the [gcloud cli](https://cloud.google.com/sdk/install).
|
19
|
+
If you are using the [gcloud builder]({% link _docs/config/builder.md %}), set up and configure the [gcloud cli](https://cloud.google.com/sdk/install).
|
@@ -4,3 +4,14 @@ You've seen how to get started with Kubes. From here, you can check out the Docs
|
|
4
4
|
* [Layering]({% link _docs/layering.md %}): Use the same Kubernetes YAML to build multiple environments like dev and prod with [layering]({% link _docs/layering.md %}).
|
5
5
|
* [CLI Customizations]({% link _docs/config.md %}): You can customize the [cli args]({% link _docs/config/kubectl.md %}). You can also run hooks before and after kubectl commands.
|
6
6
|
* [Extra Env]({% link _docs/extra-env.md %}): Create additional envs with little effort.
|
7
|
+
|
8
|
+
## Learn Videos
|
9
|
+
|
10
|
+
Watch BoltOps Learn Kubes videos:
|
11
|
+
|
12
|
+
* [BoltOps Learn Kubes Videos](https://learn.boltops.com/tagged/kubes)
|
13
|
+
|
14
|
+
|
15
|
+
## Kubes Features
|
16
|
+
|
17
|
+
{% include intro/features.md %}
|
data/docs/_includes/sidebar.html
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
</li>
|
73
73
|
<li><a href="{% link _docs/config/hooks.md %}">Hooks</a>
|
74
74
|
<ul>
|
75
|
-
{% assign docs = site.docs | where: "categories","hooks" %}
|
75
|
+
{% assign docs = site.docs | where: "categories","hooks" | sort: "order" %}
|
76
76
|
{% for doc in docs -%}
|
77
77
|
<li><a href="{{ doc.url }}">{{ doc.nav_text }}</a></li>
|
78
78
|
{% endfor %}
|
data/docs/_layouts/default.html
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
title: kubes new hook
|
3
|
+
reference: true
|
4
|
+
---
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
kubes new hook
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Generates kubes hook file.
|
13
|
+
|
14
|
+
## Examples
|
15
|
+
|
16
|
+
$ kubes new hook docker
|
17
|
+
create .kubes/config/hooks/docker.rb
|
18
|
+
$ kubes new hook kubectl
|
19
|
+
create .kubes/config/hooks/kubectl.rb
|
20
|
+
$ kubes new hook kubes
|
21
|
+
create .kubes/config/hooks/kubes.rb
|
22
|
+
$
|
23
|
+
|
24
|
+
|
25
|
+
## Options
|
26
|
+
|
27
|
+
```
|
28
|
+
y, [--force] # Bypass overwrite are you sure prompt for existing files
|
29
|
+
```
|
30
|
+
|
@@ -14,6 +14,7 @@ Generates new resource.
|
|
14
14
|
## Subcommands
|
15
15
|
|
16
16
|
* [kubes new helper]({% link _reference/kubes-new-helper.md %}) - Generates kubes helper file.
|
17
|
+
* [kubes new hook]({% link _reference/kubes-new-hook.md %}) - Generates kubes hook file.
|
17
18
|
* [kubes new resource]({% link _reference/kubes-new-resource.md %}) - Generates Kubes Kubernetes resource definition.
|
18
19
|
* [kubes new variable]({% link _reference/kubes-new-variable.md %}) - Generates kubes variable file.
|
19
20
|
|
data/docs/bin/web
CHANGED
data/kubes.gemspec
CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency "dsl_evaluator"
|
24
24
|
spec.add_dependency "hash_squeezer"
|
25
25
|
spec.add_dependency "memoist"
|
26
|
+
spec.add_dependency "nokogiri"
|
26
27
|
spec.add_dependency "rainbow"
|
27
28
|
spec.add_dependency "render_me_pretty"
|
28
29
|
spec.add_dependency "thor"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class Kubes::CLI::New
|
2
|
+
class Hook < Kubes::CLI::Sequence
|
3
|
+
argument :type, default: "kubes", description: "IE: docker, kubectl, kubes" # description doesnt really show up
|
4
|
+
|
5
|
+
def self.options
|
6
|
+
[
|
7
|
+
[:force, aliases: ["y"], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
|
8
|
+
]
|
9
|
+
end
|
10
|
+
options.each { |args| class_option(*args) }
|
11
|
+
|
12
|
+
public
|
13
|
+
def create_hook
|
14
|
+
set_source("new/hooks")
|
15
|
+
template "#{type}.rb", ".kubes/config/hooks/#{type}.rb"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/kubes/cli/new.rb
CHANGED
@@ -11,5 +11,9 @@ class Kubes::CLI
|
|
11
11
|
long_desc Help.text("new/variable")
|
12
12
|
Variable.options.each { |args| option(*args) }
|
13
13
|
register(Variable, "variable", "variable", "Generates kubes variable file.")
|
14
|
+
|
15
|
+
long_desc Help.text("new/hook")
|
16
|
+
Hook.options.each { |args| option(*args) }
|
17
|
+
register(Hook, "hook", "hook", "Generates kubes hook file.")
|
14
18
|
end
|
15
19
|
end
|
data/lib/kubes/version.rb
CHANGED
data/lib/kubes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rainbow
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -281,6 +295,7 @@ files:
|
|
281
295
|
- docs/_docs/config/env.md
|
282
296
|
- docs/_docs/config/hooks.md
|
283
297
|
- docs/_docs/config/hooks/docker.md
|
298
|
+
- docs/_docs/config/hooks/generator.md
|
284
299
|
- docs/_docs/config/hooks/kubectl.md
|
285
300
|
- docs/_docs/config/hooks/kubes.md
|
286
301
|
- docs/_docs/config/hooks/ruby.md
|
@@ -386,7 +401,10 @@ files:
|
|
386
401
|
- docs/_docs/yaml.md
|
387
402
|
- docs/_docs/yaml/multiple-files.md
|
388
403
|
- docs/_docs/yaml/multiple-resources.md
|
404
|
+
- docs/_includes/banner/foot.html
|
405
|
+
- docs/_includes/banner/head.html
|
389
406
|
- docs/_includes/commands.html
|
407
|
+
- docs/_includes/config/hooks/generator.md
|
390
408
|
- docs/_includes/config/hooks/options.md
|
391
409
|
- docs/_includes/content.html
|
392
410
|
- docs/_includes/dsl/methods.md
|
@@ -435,6 +453,7 @@ files:
|
|
435
453
|
- docs/_reference/kubes-logs.md
|
436
454
|
- docs/_reference/kubes-new-help.md
|
437
455
|
- docs/_reference/kubes-new-helper.md
|
456
|
+
- docs/_reference/kubes-new-hook.md
|
438
457
|
- docs/_reference/kubes-new-resource.md
|
439
458
|
- docs/_reference/kubes-new-variable.md
|
440
459
|
- docs/_reference/kubes-new.md
|
@@ -578,11 +597,14 @@ files:
|
|
578
597
|
- lib/kubes/cli/help/deploy.md
|
579
598
|
- lib/kubes/cli/help/exec.md
|
580
599
|
- lib/kubes/cli/help/new/helper.md
|
600
|
+
- lib/kubes/cli/help/new/hook.md
|
581
601
|
- lib/kubes/cli/help/new/resource.md
|
602
|
+
- lib/kubes/cli/help/new/variable.md
|
582
603
|
- lib/kubes/cli/init.rb
|
583
604
|
- lib/kubes/cli/logs.rb
|
584
605
|
- lib/kubes/cli/new.rb
|
585
606
|
- lib/kubes/cli/new/helper.rb
|
607
|
+
- lib/kubes/cli/new/hook.rb
|
586
608
|
- lib/kubes/cli/new/resource.rb
|
587
609
|
- lib/kubes/cli/new/variable.rb
|
588
610
|
- lib/kubes/cli/prune.rb
|
@@ -683,6 +705,9 @@ files:
|
|
683
705
|
- lib/templates/dsl/.kubes/resources/web/deployment/prod.rb
|
684
706
|
- lib/templates/dsl/.kubes/resources/web/service.rb
|
685
707
|
- lib/templates/new/helper/file.rb
|
708
|
+
- lib/templates/new/hooks/docker.rb
|
709
|
+
- lib/templates/new/hooks/kubectl.rb
|
710
|
+
- lib/templates/new/hooks/kubes.rb
|
686
711
|
- lib/templates/new/resource/dsl/backend_config.rb
|
687
712
|
- lib/templates/new/resource/dsl/config_map.rb
|
688
713
|
- lib/templates/new/resource/dsl/daemon_set.rb
|
@@ -796,7 +821,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
796
821
|
- !ruby/object:Gem::Version
|
797
822
|
version: '0'
|
798
823
|
requirements: []
|
799
|
-
rubygems_version: 3.
|
824
|
+
rubygems_version: 3.2.32
|
800
825
|
signing_key:
|
801
826
|
specification_version: 4
|
802
827
|
summary: 'Kubernetes Deployment Tool: build docker image, compile Kubernetes YAML
|