kubes 0.7.6 → 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 +18 -0
- data/README.md +4 -4
- 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/config/reference.md +1 -0
- data/docs/_docs/dsl/resources.md +1 -1
- data/docs/_docs/dsl.md +3 -3
- data/docs/_docs/helpers/aws/iam-role.md +1 -0
- data/docs/_docs/helpers/google/gke.md +1 -1
- data/docs/_docs/intro/structure.md +2 -2
- data/docs/_docs/layering/{merge.md → merge-dsl.md} +0 -0
- data/docs/_docs/layering/merge-options.md +76 -0
- data/docs/_docs/layering.md +1 -1
- 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/layering/layers.md +12 -10
- data/docs/_includes/learn/next-steps.md +11 -0
- data/docs/_includes/sidebar.html +3 -2
- 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/compiler/decorator/hashable/field.rb +41 -21
- data/lib/kubes/compiler/decorator/hashable.rb +1 -1
- data/lib/kubes/compiler/decorator/post.rb +12 -12
- data/lib/kubes/compiler/layering.rb +17 -15
- data/lib/kubes/compiler/shared/runtime_helpers.rb +1 -1
- data/lib/kubes/config.rb +3 -0
- data/lib/kubes/core.rb +1 -1
- data/lib/kubes/util/consider.rb +2 -2
- 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
- data/spec/fixtures/decorators/deployment/configMap/volumes-name-first.yaml +14 -0
- data/spec/fixtures/decorators/deployment/configMap/volumes-name-second.yaml +14 -0
- data/spec/fixtures/decorators/ingress/tls.yaml +12 -0
- data/spec/kubes/compiler/decorator/post/deployment_spec.rb +25 -0
- data/spec/kubes/compiler/decorator/post/ingress_spec.rb +22 -0
- metadata +38 -4
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,24 @@
|
|
|
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
|
+
|
|
13
|
+
## [0.7.9] - 2021-11-07
|
|
14
|
+
- [#55](https://github.com/boltops-tools/kubes/pull/55) make helper methods available in variables files
|
|
15
|
+
|
|
16
|
+
## [0.7.8] - 2021-10-29
|
|
17
|
+
- [#54](https://github.com/boltops-tools/kubes/pull/54) fix configMap and secret hash when not first element in Array
|
|
18
|
+
|
|
19
|
+
## [0.7.7] - 2021-10-21
|
|
20
|
+
- [#51](https://github.com/boltops-tools/kubes/pull/51) add hash checksum for tls secretName
|
|
21
|
+
- [#52](https://github.com/boltops-tools/kubes/pull/52) add role all layer to pre_layers
|
|
22
|
+
- [#53](https://github.com/boltops-tools/kubes/pull/53) Merger options
|
|
23
|
+
|
|
6
24
|
## [0.7.6] - 2021-10-12
|
|
7
25
|
- remove init yaml templates, removed duplication
|
|
8
26
|
- write full.yaml to .kubes/tmp instead
|
data/README.md
CHANGED
|
@@ -17,8 +17,8 @@ Official Docs Site: [kubes.guru](https://kubes.guru)
|
|
|
17
17
|
Kubes will:
|
|
18
18
|
|
|
19
19
|
1. Build the docker image and push it to repo
|
|
20
|
-
2. Compile Kubernetes YAML files from YAML/ERB or a DSL
|
|
21
|
-
3. Deploy via kubectl apply on the compiled Kubernetes YAML files
|
|
20
|
+
2. Compile Kubernetes YAML files from YAML/ERB or a DSL with built Docker image
|
|
21
|
+
3. Deploy via `kubectl apply` on the compiled Kubernetes YAML files
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@ Now, use `kubectl` directly in the proper order:
|
|
|
42
42
|
kubectl apply -f .kubes/output/web/service.yaml
|
|
43
43
|
kubectl apply -f .kubes/output/web/deployment.yaml
|
|
44
44
|
|
|
45
|
-
You can also apply with kubes. This will compile the
|
|
45
|
+
You can also apply with kubes. This will automatically compile the files also.
|
|
46
46
|
|
|
47
47
|
kubes apply
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ The deploy command, does all 3 steps: builds the docker image, compiles the `.ku
|
|
|
50
50
|
|
|
51
51
|
kubes deploy
|
|
52
52
|
|
|
53
|
-
## Multiple
|
|
53
|
+
## Multiple Environments
|
|
54
54
|
|
|
55
55
|
You can easily create multiple environments with the same YAML configs. Example:
|
|
56
56
|
|
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
|
|
@@ -20,3 +20,4 @@ repo_auto_auth | Whether or not to try to auth authorize docker repo registry if
|
|
|
20
20
|
skip | List of resources to skip. Can also be set with the `KUBES_SKIP` env var. `KUBES_SKIP` should be a list of strings separated by spaces. It adds onto the `config.skip` option. | []
|
|
21
21
|
state.path | Where to store the state file with the last build Docker image. | .kubes/state/KUBES_ENV/data.json
|
|
22
22
|
suffix_hash | Whether or not to append suffix hash to ConfigMap and Secret | true
|
|
23
|
+
merger.options | Merger options that control how Hashes are merged. More info: [Merger Options]({% link _docs/layering/merge-options.md %}) | `{overwrite_arrays: true}`
|
data/docs/_docs/dsl/resources.md
CHANGED
|
@@ -6,7 +6,7 @@ Here's a list of the resources supported by the Kubes DSL.
|
|
|
6
6
|
|
|
7
7
|
{% assign docs = site.docs | where: "categories","dsl" %}
|
|
8
8
|
{% for doc in docs -%}
|
|
9
|
-
* [{{ doc.
|
|
9
|
+
* [{{ doc.title }}]({{ doc.url }})
|
|
10
10
|
{% endfor %}
|
|
11
11
|
|
|
12
12
|
For resources, that are not supported, you can use the [Generic resource]({% link _docs/dsl/resources/generic.md %}) or use [YAML]({% link _docs/yaml.md %}) instead. You can use a mix of DSL and YAML definitions in the `.kubes/resources` folder.
|
data/docs/_docs/dsl.md
CHANGED
|
@@ -58,9 +58,9 @@ Notice how `port` and `targetPort` correspond to `spec.ports.port` and `spec.por
|
|
|
58
58
|
|
|
59
59
|
In general:
|
|
60
60
|
|
|
61
|
-
* The DSL methods behave as reader methods when no arguments are passed to it. IE: `name
|
|
62
|
-
* The DSL methods behave as writer methods when arguments are passed to it. IE: `name`
|
|
61
|
+
* The DSL methods behave as reader methods when no arguments are passed to it. IE: `name` returns the value.
|
|
62
|
+
* The DSL methods behave as writer methods when arguments are passed to it. IE: `name "demo-web"` sets the value.
|
|
63
63
|
|
|
64
64
|
## Merge Behavior
|
|
65
65
|
|
|
66
|
-
Generally, the merge should behave as expected. For example, map or Hash fields are merged together from multiple layers. Strings are simply replaced. See more details at [Layering Merge Behavior]({% link _docs/layering/merge.md %})
|
|
66
|
+
Generally, the merge should behave as expected. For example, map or Hash fields are merged together from multiple layers. Strings are simply replaced. See more details at [Layering Merge Behavior]({% link _docs/layering/merge-dsl.md %})
|
|
@@ -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",
|
|
@@ -34,10 +34,10 @@ Here's what a .kubes folder structure can look like this:
|
|
|
34
34
|
|
|
35
35
|
Name | Description
|
|
36
36
|
--- | ---
|
|
37
|
-
base | The base folder is processed first and can be used to define common fields and resources. Learn more on the [Layering Docs]({% link _docs/layering.md %}).
|
|
38
37
|
config | The config folder can be used to configure behavior of Kubes. The [docker]({% link _docs/config/docker.md %}) config is used to customize the docker command. The [env]({% link _docs/config/env.md %}) config is used to override `config.rb` settings on a `KUBES_ENV` basis. The [kubectl]({% link _docs/config/kubectl.md %}) config is used to customize the kubectl command.
|
|
39
38
|
config.rb | The main thing to configure here is the repo to push the docker image to.
|
|
40
39
|
output | Where kubes builds and writes the Kubernetes YAML to.
|
|
41
40
|
resources | Where you define your Kubernetes resources.
|
|
42
|
-
|
|
41
|
+
resources/base | The base folder is processed first and can be used to define common fields and resources. Learn more on the [Layering Docs]({% link _docs/layering.md %}).
|
|
42
|
+
resources/shared | The shared folder is where you can put shared resources. This folder gets applied first. More info: [Ordering]({% link _docs/intro/ordering.md %}).
|
|
43
43
|
state | Temporary state info that stores the built Docker image name.
|
|
File without changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Merge Options
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Underneath the hood, Kubes uses the [danielsdeleo/deep_merge](https://github.com/danielsdeleo/deep_merge) library to merge layers together. You can control the merge behavior options with [config.merger.options]({% link _docs/config/reference.md %}).
|
|
6
|
+
|
|
7
|
+
The default merge options is:
|
|
8
|
+
|
|
9
|
+
{overwrite_arrays: true}
|
|
10
|
+
|
|
11
|
+
You can control the merge behavior by setting:
|
|
12
|
+
|
|
13
|
+
.kubes/config.rb
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
Kubes.configure do |config|
|
|
17
|
+
# ...
|
|
18
|
+
config.merger.options = {overwrite_arrays: false}
|
|
19
|
+
end
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
See the [danielsdeleo/deep_merge](https://github.com/danielsdeleo/deep_merge) docs for the different options.
|
|
23
|
+
|
|
24
|
+
## Example of overwrite_arrays false
|
|
25
|
+
|
|
26
|
+
An example of where you might want to use `{overwrite_arrays: false}` is if you are using YAML and want a base sidecar container in all of your deployments.
|
|
27
|
+
|
|
28
|
+
.kubes/resources/base/deployment.yaml
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
spec:
|
|
32
|
+
template:
|
|
33
|
+
spec:
|
|
34
|
+
containers:
|
|
35
|
+
- name: sidecar
|
|
36
|
+
image: sidecar-image
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
.kubes/resources/web/deployment.yaml
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
spec:
|
|
43
|
+
template:
|
|
44
|
+
metadata:
|
|
45
|
+
labels:
|
|
46
|
+
role: web
|
|
47
|
+
spec:
|
|
48
|
+
containers:
|
|
49
|
+
- name: web
|
|
50
|
+
image: <%= docker_image %>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Produces:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
# ...
|
|
57
|
+
spec:
|
|
58
|
+
template:
|
|
59
|
+
metadata:
|
|
60
|
+
labels:
|
|
61
|
+
role: web
|
|
62
|
+
spec:
|
|
63
|
+
containers:
|
|
64
|
+
- name: sidecar
|
|
65
|
+
image: sidecar-image
|
|
66
|
+
- name: web
|
|
67
|
+
image: gcr.io/boltops-learn/demo:kubes-2021-10-21T18-06-48
|
|
68
|
+
# ...
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
However, using this merge behavior will also add additional ports if you are assigning a `targetPort` in the DSL. See:
|
|
72
|
+
|
|
73
|
+
* [DSL in service creates always default port 80 #45](https://github.com/boltops-tools/kubes/issues/45)
|
|
74
|
+
* [use deep_merge overwrite_arrays option #48](https://github.com/boltops-tools/kubes/pull/48)
|
|
75
|
+
|
|
76
|
+
Will welcome PRs for improvements.
|
data/docs/_docs/layering.md
CHANGED
|
@@ -7,4 +7,4 @@ Kubes supports layering files together so you can use the same Kubernetes files
|
|
|
7
7
|
* [YAML Layering]({% link _docs/layering/yaml.md %})
|
|
8
8
|
* [DSL Layering]({% link _docs/layering/dsl.md %})
|
|
9
9
|
* [Mix Layering]({% link _docs/layering/mix.md %})
|
|
10
|
-
* [Merge Behavior]({% link _docs/layering/merge.md %})
|
|
10
|
+
* [Merge Behavior]({% link _docs/layering/merge-dsl.md %})
|
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).
|
|
@@ -11,6 +11,7 @@ Here's an example structure, so we can understand how layering works.
|
|
|
11
11
|
├── clock
|
|
12
12
|
│ └── deployment.{{ include.ext }}
|
|
13
13
|
└── web
|
|
14
|
+
├── all.{{ include.ext }}
|
|
14
15
|
├── deployment
|
|
15
16
|
│ ├── dev.{{ include.ext }}
|
|
16
17
|
│ └── prod.{{ include.ext }}
|
|
@@ -34,16 +35,17 @@ Notes
|
|
|
34
35
|
|
|
35
36
|
Here's a table showing the the full layering.
|
|
36
37
|
|
|
37
|
-
Folder/Pattern
|
|
38
|
-
|
|
39
|
-
base/all.{{ include.ext }}
|
|
40
|
-
base/all/ENV.{{ include.ext }}
|
|
41
|
-
base/KIND.{{ include.ext }}
|
|
42
|
-
base/KIND/base.{{ include.ext }}
|
|
43
|
-
base/KIND/ENV.{{ include.ext }}
|
|
44
|
-
ROLE/
|
|
45
|
-
ROLE/KIND
|
|
46
|
-
ROLE/KIND/
|
|
38
|
+
Type | Folder/Pattern | Example
|
|
39
|
+
---|---|---
|
|
40
|
+
pre | base/all.{{ include.ext }} | base/all.{{ include.ext }}
|
|
41
|
+
pre | base/all/ENV.{{ include.ext }} | base/all/dev.{{ include.ext }}
|
|
42
|
+
pre | base/KIND.{{ include.ext }} | base/deployment.{{ include.ext }}
|
|
43
|
+
pre | base/KIND/base.{{ include.ext }} | base/deployment/base.{{ include.ext }}
|
|
44
|
+
pre | base/KIND/ENV.{{ include.ext }} | base/deployment/dev.{{ include.ext }}
|
|
45
|
+
pre | ROLE/all.{{ include.ext }} | web/all.{{ include.ext }}
|
|
46
|
+
main | ROLE/KIND.{{ include.ext }} | web/deployment.{{ include.ext }}
|
|
47
|
+
post | ROLE/KIND/base.{{ include.ext }} | web/deployment/base.{{ include.ext }}
|
|
48
|
+
post | ROLE/KIND/ENV.{{ include.ext }} | web/deployment/dev.{{ include.ext }}
|
|
47
49
|
|
|
48
50
|
## Real-World Uses
|
|
49
51
|
|
|
@@ -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 %}
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
<li><a href="{% link _docs/layering/yaml.md %}">YAML</a></li>
|
|
98
98
|
<li><a href="{% link _docs/layering/dsl.md %}">DSL</a></li>
|
|
99
99
|
<li><a href="{% link _docs/layering/mix.md %}">Mix</a></li>
|
|
100
|
-
<li><a href="{% link _docs/layering/merge.md %}">Merge
|
|
100
|
+
<li><a href="{% link _docs/layering/merge-dsl.md %}">Merge DSL</a></li>
|
|
101
|
+
<li><a href="{% link _docs/layering/merge-options.md %}">Merge Options</a></li>
|
|
101
102
|
</ul>
|
|
102
103
|
</li>
|
|
103
104
|
<li><a href="{% link _docs/dsl.md %}">DSL</a>
|
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
|
|
@@ -1,52 +1,72 @@
|
|
|
1
1
|
class Kubes::Compiler::Decorator::Hashable
|
|
2
2
|
class Field
|
|
3
|
-
# item is full
|
|
3
|
+
# item is full structure
|
|
4
4
|
#
|
|
5
|
-
# secretRef:
|
|
6
|
-
# name: demo-secret
|
|
5
|
+
# secretRef: <--- wrapper_key
|
|
6
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
7
7
|
#
|
|
8
|
+
attr_reader :item # for debugging
|
|
8
9
|
def initialize(item)
|
|
9
10
|
@item = item
|
|
10
11
|
end
|
|
11
12
|
|
|
12
13
|
def hashable?
|
|
13
|
-
x = @item.keys &
|
|
14
|
+
x = @item.keys & wrapper_map.keys
|
|
14
15
|
!x.empty?
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
def kind
|
|
18
|
-
|
|
19
|
+
wrapper_key =~ /configMap/ ? "ConfigMap" : "Secret"
|
|
19
20
|
end
|
|
20
21
|
|
|
21
|
-
# The key of the hashable value
|
|
22
|
+
# The target key of the hashable value is that key used for find value to add hash
|
|
22
23
|
#
|
|
23
24
|
# envFrom:
|
|
24
|
-
# - secretRef:
|
|
25
|
-
# name: demo-secret <---
|
|
25
|
+
# - secretRef: <--- wrapper_key
|
|
26
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
26
27
|
#
|
|
27
|
-
def
|
|
28
|
-
|
|
28
|
+
def target_key
|
|
29
|
+
wrapper_map[wrapper_key]
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# The wrapper field is nested right above the item with the hashable value.
|
|
33
|
+
# Simple example:
|
|
32
34
|
#
|
|
33
35
|
# envFrom:
|
|
34
|
-
# - secretRef:
|
|
35
|
-
# name: demo-secret
|
|
36
|
+
# - secretRef: <--- wrapper_key
|
|
37
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
36
38
|
#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
# More complex example where there's a configMap.name key also on the same level.
|
|
40
|
+
#
|
|
41
|
+
# volumes:
|
|
42
|
+
# - name: config-map-volume
|
|
43
|
+
# configMap:
|
|
44
|
+
# name: demo-config-map
|
|
45
|
+
#
|
|
46
|
+
# Note: Wont work for case when there's are 2 matching wrapper_map keys,
|
|
47
|
+
# but don't think Kubernetes allows 2 matching wrapper_map keys.
|
|
48
|
+
# Example: This is invalid Kubernetes YAML.
|
|
49
|
+
#
|
|
50
|
+
# volumes:
|
|
51
|
+
# - name: config-map-volume
|
|
52
|
+
# configMap:
|
|
53
|
+
# name: demo-config-map
|
|
54
|
+
# secretRef:
|
|
55
|
+
# name: demo-seret
|
|
56
|
+
def wrapper_key
|
|
57
|
+
@item.keys.find { |k| wrapper_map.keys.include?(k) } # this key used for map[wrapper_key]
|
|
39
58
|
end
|
|
40
59
|
|
|
41
60
|
# wrapper element to key that stores the hashable value
|
|
42
|
-
def
|
|
61
|
+
def wrapper_map
|
|
43
62
|
{
|
|
44
|
-
'configMapRef' => 'name',
|
|
45
|
-
'configMapKeyRef' => 'name',
|
|
46
|
-
'configMap' => 'name',
|
|
47
|
-
'secretRef' => 'name',
|
|
48
|
-
'secretKeyRef' => 'name',
|
|
49
|
-
'secret' => 'secretName',
|
|
63
|
+
'configMapRef' => 'name', # containers.env.envFrom.configMapRef.name
|
|
64
|
+
'configMapKeyRef' => 'name', # containers.env.valueFrom.configMapKeyRef.name
|
|
65
|
+
'configMap' => 'name', # containers.env.envFrom.configMapRef.name
|
|
66
|
+
'secretRef' => 'name', # containers.env.envFrom.secretRef.name
|
|
67
|
+
'secretKeyRef' => 'name', # containers.env.valueFrom.secretKeyRef.name
|
|
68
|
+
'secret' => 'secretName', # volumes.secret.secretName
|
|
69
|
+
'tls' => 'secretName', # tls.secretName
|
|
50
70
|
}
|
|
51
71
|
end
|
|
52
72
|
end
|
|
@@ -9,7 +9,7 @@ module Kubes::Compiler::Decorator
|
|
|
9
9
|
name = @data.dig('metadata','name')
|
|
10
10
|
return @data unless name
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# scope Kind so Secret and ConfigMap can have same name
|
|
13
13
|
md5 = md5(@data)
|
|
14
14
|
@data['metadata']['name'] = "#{name}-#{md5}"
|
|
15
15
|
Storage.store(@data['kind'], name, md5)
|
|
@@ -16,12 +16,12 @@ module Kubes::Compiler::Decorator
|
|
|
16
16
|
# hashable set from previous stack call
|
|
17
17
|
if options[:hashable_field] && item.is_a?(Hash)
|
|
18
18
|
field = options[:hashable_field]
|
|
19
|
-
value_without_md5 = item[field.
|
|
19
|
+
value_without_md5 = item[field.target_key]
|
|
20
20
|
@reset_hashable_field = true unless value_without_md5
|
|
21
21
|
if field.hashable? && value_without_md5
|
|
22
22
|
md5 = Hashable::Storage.fetch(field.kind, value_without_md5)
|
|
23
23
|
v = [value_without_md5, md5].compact.join('-')
|
|
24
|
-
item[field.
|
|
24
|
+
item[field.target_key] = v
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -29,10 +29,10 @@ module Kubes::Compiler::Decorator
|
|
|
29
29
|
# Pretty tricky case. Given:
|
|
30
30
|
#
|
|
31
31
|
# envFrom:
|
|
32
|
-
# - secretRef:
|
|
33
|
-
# name: demo-secret
|
|
34
|
-
# - configMapRef:
|
|
35
|
-
# name: demo-config-map
|
|
32
|
+
# - secretRef: <--- wrapper_key
|
|
33
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
34
|
+
# - configMapRef: <--- wrapper_key
|
|
35
|
+
# name: demo-config-map <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
36
36
|
#
|
|
37
37
|
# Need to reset the stored hashable_field in the call stack.
|
|
38
38
|
# Else the field.kind is cached and the md5 look is incorrect
|
|
@@ -52,19 +52,19 @@ module Kubes::Compiler::Decorator
|
|
|
52
52
|
#
|
|
53
53
|
# 1. envFrom example
|
|
54
54
|
# envFrom:
|
|
55
|
-
# - secretRef:
|
|
56
|
-
# name: demo-secret
|
|
55
|
+
# - secretRef: <--- wrapper_key
|
|
56
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
57
57
|
#
|
|
58
58
|
# 2. valueFrom example
|
|
59
59
|
# valueFrom:
|
|
60
|
-
# secretKeyRef:
|
|
61
|
-
# name: demo-secret
|
|
60
|
+
# secretKeyRef: <--- wrapper_key
|
|
61
|
+
# name: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
62
62
|
# key: password
|
|
63
63
|
#
|
|
64
64
|
# 3. volumes example
|
|
65
65
|
# volumes:
|
|
66
|
-
# - secret:
|
|
67
|
-
# secretName: demo-secret
|
|
66
|
+
# - secret: <--- wrapper_key
|
|
67
|
+
# secretName: demo-secret <--- target_key is 'name' from wrapper_map[wrapper_key]
|
|
68
68
|
#
|
|
69
69
|
# This is useful to capture for the next level of the stack call
|
|
70
70
|
#
|
|
@@ -6,29 +6,21 @@ class Kubes::Compiler
|
|
|
6
6
|
ext = File.extname(@path)
|
|
7
7
|
kind = File.basename(@path).sub(ext,'') # IE: deployment
|
|
8
8
|
kind = kind.pluralize if @block_form
|
|
9
|
+
role = @path.split('/')[-2] # .kubes/resources/web/deployment.yaml
|
|
9
10
|
layers = [
|
|
10
|
-
"all",
|
|
11
|
-
"all/#{Kubes.env}",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"base/all",
|
|
12
|
+
"base/all/#{Kubes.env}",
|
|
13
|
+
"base/#{kind}",
|
|
14
|
+
"base/#{kind}/#{Kubes.env}",
|
|
15
|
+
"#{role}/all",
|
|
14
16
|
]
|
|
15
17
|
layers = add_exts(layers)
|
|
16
18
|
layers.map! do |layer|
|
|
17
|
-
"#{Kubes.root}/.kubes/resources
|
|
19
|
+
"#{Kubes.root}/.kubes/resources/#{layer}"
|
|
18
20
|
end
|
|
19
21
|
layers.select { |layer| File.exist?(layer) }
|
|
20
22
|
end
|
|
21
23
|
|
|
22
|
-
def add_exts(layers)
|
|
23
|
-
layers.map do |layer|
|
|
24
|
-
[
|
|
25
|
-
"#{layer}.rb",
|
|
26
|
-
"#{layer}.yaml",
|
|
27
|
-
"#{layer}.yml",
|
|
28
|
-
]
|
|
29
|
-
end.flatten
|
|
30
|
-
end
|
|
31
|
-
|
|
32
24
|
def post_layers
|
|
33
25
|
return [] if Kubes.kustomize?
|
|
34
26
|
|
|
@@ -45,5 +37,15 @@ class Kubes::Compiler
|
|
|
45
37
|
end
|
|
46
38
|
layers.select { |layer| File.exist?(layer) }
|
|
47
39
|
end
|
|
40
|
+
|
|
41
|
+
def add_exts(*layers)
|
|
42
|
+
layers.flatten.map do |layer|
|
|
43
|
+
[
|
|
44
|
+
"#{layer}.rb",
|
|
45
|
+
"#{layer}.yaml",
|
|
46
|
+
"#{layer}.yml",
|
|
47
|
+
]
|
|
48
|
+
end.flatten
|
|
49
|
+
end
|
|
48
50
|
end
|
|
49
51
|
end
|
|
@@ -3,9 +3,9 @@ module Kubes::Compiler::Shared
|
|
|
3
3
|
include Kubes::Compiler::Shared::Helpers
|
|
4
4
|
|
|
5
5
|
def load_runtime_helpers
|
|
6
|
-
load_custom_variables # also load custom variables
|
|
7
6
|
load_plugin_helpers
|
|
8
7
|
load_custom_helpers
|
|
8
|
+
load_custom_variables # also load custom variables
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
@@custom_helpers_loaded = false
|
data/lib/kubes/config.rb
CHANGED
data/lib/kubes/core.rb
CHANGED
data/lib/kubes/util/consider.rb
CHANGED
data/lib/kubes/version.rb
CHANGED
data/lib/kubes.rb
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
# apiVersion: apps/v1
|
|
3
|
+
# kind: Deployment
|
|
4
|
+
# spec:
|
|
5
|
+
# template:
|
|
6
|
+
# spec:
|
|
7
|
+
# only including structure needed for spec
|
|
8
|
+
volumes:
|
|
9
|
+
- name: config-map-volume
|
|
10
|
+
configMap:
|
|
11
|
+
name: demo-config-map
|
|
12
|
+
items:
|
|
13
|
+
- key: k1
|
|
14
|
+
path: config-map.conf
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
# apiVersion: apps/v1
|
|
3
|
+
# kind: Deployment
|
|
4
|
+
# spec:
|
|
5
|
+
# template:
|
|
6
|
+
# spec:
|
|
7
|
+
# only including structure needed for spec
|
|
8
|
+
volumes:
|
|
9
|
+
- configMap:
|
|
10
|
+
name: demo-config-map
|
|
11
|
+
items:
|
|
12
|
+
- key: k1
|
|
13
|
+
path: config-map.conf
|
|
14
|
+
name: config-map-volume
|
|
@@ -135,4 +135,29 @@ describe Kubes::Compiler::Decorator::Post do
|
|
|
135
135
|
end
|
|
136
136
|
end
|
|
137
137
|
end
|
|
138
|
+
|
|
139
|
+
context "order" do
|
|
140
|
+
# spec to fix issue https://github.com/boltops-tools/kubes/issues/49
|
|
141
|
+
describe "name first" do
|
|
142
|
+
let(:data) { fixture("configMap/volumes-name-first") }
|
|
143
|
+
it "run" do
|
|
144
|
+
decorator.run
|
|
145
|
+
data = decorator.data
|
|
146
|
+
volumes = data['volumes']
|
|
147
|
+
name = volumes[0]['configMap']['name']
|
|
148
|
+
expect(name).to eq("demo-config-map-fakehash-config")
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
describe "name second" do
|
|
153
|
+
let(:data) { fixture("configMap/volumes-name-second") }
|
|
154
|
+
it "run" do
|
|
155
|
+
decorator.run
|
|
156
|
+
data = decorator.data
|
|
157
|
+
volumes = data['volumes']
|
|
158
|
+
name = volumes[0]['configMap']['name']
|
|
159
|
+
expect(name).to eq("demo-config-map-fakehash-config")
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
138
163
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
describe Kubes::Compiler::Decorator::Post do
|
|
2
|
+
let(:decorator) { described_class.new(data) }
|
|
3
|
+
|
|
4
|
+
def fixture(name)
|
|
5
|
+
YAML.load_file("spec/fixtures/decorators/ingress/#{name}.yaml")
|
|
6
|
+
end
|
|
7
|
+
before(:each) do
|
|
8
|
+
allow(Kubes::Compiler::Decorator::Hashable::Storage).to receive(:fetch).and_return("fakehash")
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
context "ingress" do
|
|
12
|
+
describe "tls" do
|
|
13
|
+
let(:data) { fixture("tls") }
|
|
14
|
+
it "run" do
|
|
15
|
+
decorator.run
|
|
16
|
+
data = decorator.data
|
|
17
|
+
name = data['spec']['tls'][0]['secretName']
|
|
18
|
+
expect(name).to eq("tls-secret-fakehash")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
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
|
|
@@ -336,7 +351,8 @@ files:
|
|
|
336
351
|
- docs/_docs/intro/structure.md
|
|
337
352
|
- docs/_docs/layering.md
|
|
338
353
|
- docs/_docs/layering/dsl.md
|
|
339
|
-
- docs/_docs/layering/merge.md
|
|
354
|
+
- docs/_docs/layering/merge-dsl.md
|
|
355
|
+
- docs/_docs/layering/merge-options.md
|
|
340
356
|
- docs/_docs/layering/mix.md
|
|
341
357
|
- docs/_docs/layering/yaml.md
|
|
342
358
|
- docs/_docs/learn/dsl.md
|
|
@@ -385,7 +401,10 @@ files:
|
|
|
385
401
|
- docs/_docs/yaml.md
|
|
386
402
|
- docs/_docs/yaml/multiple-files.md
|
|
387
403
|
- docs/_docs/yaml/multiple-resources.md
|
|
404
|
+
- docs/_includes/banner/foot.html
|
|
405
|
+
- docs/_includes/banner/head.html
|
|
388
406
|
- docs/_includes/commands.html
|
|
407
|
+
- docs/_includes/config/hooks/generator.md
|
|
389
408
|
- docs/_includes/config/hooks/options.md
|
|
390
409
|
- docs/_includes/content.html
|
|
391
410
|
- docs/_includes/dsl/methods.md
|
|
@@ -434,6 +453,7 @@ files:
|
|
|
434
453
|
- docs/_reference/kubes-logs.md
|
|
435
454
|
- docs/_reference/kubes-new-help.md
|
|
436
455
|
- docs/_reference/kubes-new-helper.md
|
|
456
|
+
- docs/_reference/kubes-new-hook.md
|
|
437
457
|
- docs/_reference/kubes-new-resource.md
|
|
438
458
|
- docs/_reference/kubes-new-variable.md
|
|
439
459
|
- docs/_reference/kubes-new.md
|
|
@@ -577,11 +597,14 @@ files:
|
|
|
577
597
|
- lib/kubes/cli/help/deploy.md
|
|
578
598
|
- lib/kubes/cli/help/exec.md
|
|
579
599
|
- lib/kubes/cli/help/new/helper.md
|
|
600
|
+
- lib/kubes/cli/help/new/hook.md
|
|
580
601
|
- lib/kubes/cli/help/new/resource.md
|
|
602
|
+
- lib/kubes/cli/help/new/variable.md
|
|
581
603
|
- lib/kubes/cli/init.rb
|
|
582
604
|
- lib/kubes/cli/logs.rb
|
|
583
605
|
- lib/kubes/cli/new.rb
|
|
584
606
|
- lib/kubes/cli/new/helper.rb
|
|
607
|
+
- lib/kubes/cli/new/hook.rb
|
|
585
608
|
- lib/kubes/cli/new/resource.rb
|
|
586
609
|
- lib/kubes/cli/new/variable.rb
|
|
587
610
|
- lib/kubes/cli/prune.rb
|
|
@@ -682,6 +705,9 @@ files:
|
|
|
682
705
|
- lib/templates/dsl/.kubes/resources/web/deployment/prod.rb
|
|
683
706
|
- lib/templates/dsl/.kubes/resources/web/service.rb
|
|
684
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
|
|
685
711
|
- lib/templates/new/resource/dsl/backend_config.rb
|
|
686
712
|
- lib/templates/new/resource/dsl/config_map.rb
|
|
687
713
|
- lib/templates/new/resource/dsl/daemon_set.rb
|
|
@@ -731,10 +757,13 @@ files:
|
|
|
731
757
|
- spec/fixtures/decorators/deployment/both/volumes.yaml
|
|
732
758
|
- spec/fixtures/decorators/deployment/configMap/envFrom.yaml
|
|
733
759
|
- spec/fixtures/decorators/deployment/configMap/valueFrom.yaml
|
|
760
|
+
- spec/fixtures/decorators/deployment/configMap/volumes-name-first.yaml
|
|
761
|
+
- spec/fixtures/decorators/deployment/configMap/volumes-name-second.yaml
|
|
734
762
|
- spec/fixtures/decorators/deployment/configMap/volumes.yaml
|
|
735
763
|
- spec/fixtures/decorators/deployment/secret/envFrom.yaml
|
|
736
764
|
- spec/fixtures/decorators/deployment/secret/valueFrom.yaml
|
|
737
765
|
- spec/fixtures/decorators/deployment/secret/volumes.yaml
|
|
766
|
+
- spec/fixtures/decorators/ingress/tls.yaml
|
|
738
767
|
- spec/fixtures/decorators/pod/configMap/envFrom.yaml
|
|
739
768
|
- spec/fixtures/decorators/pod/configMap/valueFrom.yaml
|
|
740
769
|
- spec/fixtures/decorators/pod/configMap/volumes.yaml
|
|
@@ -761,6 +790,7 @@ files:
|
|
|
761
790
|
- spec/fixtures/syntax/.kubes/resources/web/pod.rb
|
|
762
791
|
- spec/kubes/cli/prune_spec.rb
|
|
763
792
|
- spec/kubes/compiler/decorator/post/deployment_spec.rb
|
|
793
|
+
- spec/kubes/compiler/decorator/post/ingress_spec.rb
|
|
764
794
|
- spec/kubes/compiler/decorator/post/pod_spec.rb
|
|
765
795
|
- spec/kubes/compiler/strategy/dispatcher_spec.rb
|
|
766
796
|
- spec/kubes/compiler_spec.rb
|
|
@@ -791,7 +821,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
791
821
|
- !ruby/object:Gem::Version
|
|
792
822
|
version: '0'
|
|
793
823
|
requirements: []
|
|
794
|
-
rubygems_version: 3.
|
|
824
|
+
rubygems_version: 3.2.32
|
|
795
825
|
signing_key:
|
|
796
826
|
specification_version: 4
|
|
797
827
|
summary: 'Kubernetes Deployment Tool: build docker image, compile Kubernetes YAML
|
|
@@ -806,10 +836,13 @@ test_files:
|
|
|
806
836
|
- spec/fixtures/decorators/deployment/both/volumes.yaml
|
|
807
837
|
- spec/fixtures/decorators/deployment/configMap/envFrom.yaml
|
|
808
838
|
- spec/fixtures/decorators/deployment/configMap/valueFrom.yaml
|
|
839
|
+
- spec/fixtures/decorators/deployment/configMap/volumes-name-first.yaml
|
|
840
|
+
- spec/fixtures/decorators/deployment/configMap/volumes-name-second.yaml
|
|
809
841
|
- spec/fixtures/decorators/deployment/configMap/volumes.yaml
|
|
810
842
|
- spec/fixtures/decorators/deployment/secret/envFrom.yaml
|
|
811
843
|
- spec/fixtures/decorators/deployment/secret/valueFrom.yaml
|
|
812
844
|
- spec/fixtures/decorators/deployment/secret/volumes.yaml
|
|
845
|
+
- spec/fixtures/decorators/ingress/tls.yaml
|
|
813
846
|
- spec/fixtures/decorators/pod/configMap/envFrom.yaml
|
|
814
847
|
- spec/fixtures/decorators/pod/configMap/valueFrom.yaml
|
|
815
848
|
- spec/fixtures/decorators/pod/configMap/volumes.yaml
|
|
@@ -836,6 +869,7 @@ test_files:
|
|
|
836
869
|
- spec/fixtures/syntax/.kubes/resources/web/pod.rb
|
|
837
870
|
- spec/kubes/cli/prune_spec.rb
|
|
838
871
|
- spec/kubes/compiler/decorator/post/deployment_spec.rb
|
|
872
|
+
- spec/kubes/compiler/decorator/post/ingress_spec.rb
|
|
839
873
|
- spec/kubes/compiler/decorator/post/pod_spec.rb
|
|
840
874
|
- spec/kubes/compiler/strategy/dispatcher_spec.rb
|
|
841
875
|
- spec/kubes/compiler_spec.rb
|