kubes 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f84754c7f4ac3bb6b4cf9265e9a1996790e16f1a0d559c84a2b12bfd389a08c8
4
- data.tar.gz: 952b720a88afa528925d0fe4f910b211d7891d930903ae36e8e7e35b69eec003
3
+ metadata.gz: a2acdb3453d1240b7be08aa022731c41ffa227a9a0ca5e5fdf28774f2a9be6c6
4
+ data.tar.gz: 418fcd60375f6379c14e32432c8b202562ae87477dd93480987ef02a43e1d7a8
5
5
  SHA512:
6
- metadata.gz: c706ad8181772d2c7dbcee9de65d96548068de2840641786c58bc7fdfa1bbe6b1173dc8ec787ad42ef60d02bcce5f6ebc3f56d60549087c72d6f17a9a8cdbb34
7
- data.tar.gz: 4282f36a11382932f19f355c1e9c9f286c191f9486f37de9328719f8ae8b3636f2266751f65c896fd31018396ddadc00803b6b064d83836c9023c751539575a3
6
+ metadata.gz: 471c5ef845fc8b904cfb3299ec42a08e68a5fb801639af39e683d379e9de20f5b0c89394d73bae34dc6cc06d0292ec5fd4216f7660c76bea2ba785048c5e86bb
7
+ data.tar.gz: a41933ec8b9f216fffd3022856e36cdf9e0555bdb460562e61525a2829e34546f50cfb01fc8ebe058bf4e6aeba49b22d5b256881c21ae92b6e94891a16e0496b
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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.8.7] - 2022-06-21
7
+ - [#63](https://github.com/boltops-tools/kubes/pull/63) remove kubes meta from yaml
8
+ - adjust app layer. keep old layer also for now though
9
+
6
10
  ## [0.8.6] - 2022-02-16
7
11
  - [#62](https://github.com/boltops-tools/kubes/pull/62) config map files: add Kubes.app txt layer
8
12
 
@@ -6,6 +6,13 @@ categories: hooks
6
6
 
7
7
  {% include config/hooks/generator.md type="docker" %}
8
8
 
9
+ ## Docker Hooks
10
+
11
+ Hook | Description
12
+ ---|---
13
+ build | When kubes builds Docker image.
14
+ push | When kubes pushes the Docker image.
15
+
9
16
  Here are some examples of running custom hooks before and after the docker commands.
10
17
 
11
18
  ## Build Hooks
@@ -17,7 +17,7 @@ apply | When kubes runs all the `kubectl apply` commands.
17
17
  delete | When kubes runs all the `kubectl delete` commands.
18
18
  prune | When kubes prunes. IE: To clean old secrets.
19
19
 
20
- ## Lifecycle At Kubes Level
20
+ ## Kubes Lifecyle Level
21
21
 
22
22
  These lifecycle points occur at a higher-level than the `kubectl` commands. Here's an example to help explain:
23
23
 
@@ -53,7 +53,7 @@ data:
53
53
 
54
54
  ## Layering Details
55
55
 
56
- Layering for Config Map Files and also supports app-scoped layers.
56
+ Config Map Files also supports App-Scoped Layering.
57
57
 
58
58
  Name | Example
59
59
  --- | ---
@@ -16,7 +16,7 @@ Now, use `kubectl` directly and apply them in the proper order:
16
16
  kubectl apply -f .kubes/output/web/service.yaml
17
17
  kubectl apply -f .kubes/output/web/deployment.yaml
18
18
 
19
- The deploy command simpifily does all 3 steps: build, compile, and apply.
19
+ The deploy command simply does all 3 steps: build, compile, and apply.
20
20
 
21
21
  kubes deploy
22
22
 
@@ -9,7 +9,7 @@ If you already a project with an existing Dockerfile, you can use that. If you d
9
9
 
10
10
  {% include learn/repos.md %}
11
11
 
12
- Let's generate a starter project:
12
+ Let's initialize a starter kubes project. This is similar to a `git init`.
13
13
 
14
14
  $ kubes init --app demo --repo $REPO --type dsl
15
15
  create .kubes/config.rb
@@ -9,7 +9,7 @@ If you already a project with an existing Dockerfile, you can use that. If you d
9
9
 
10
10
  {% include learn/repos.md %}
11
11
 
12
- Let's generate a starter project:
12
+ Let's initialize a starter kubes project. This is similar to a `git init`.
13
13
 
14
14
  $ kubes init --app demo --repo $REPO
15
15
  create Dockerfile
@@ -1,11 +1,11 @@
1
- * Automation: [Builds the Docker image]({% link _docs/config/docker.md %}) and updates the compiled YAML files
2
- * Syntactic Sugar: Use an [ERB/YAML]({% link _docs/yaml.md %}) or a [DSL]({% link _docs/dsl.md %}) to write your Kubernetes YAML files. You can use a mix of DSL and YAML definitions in the `.kubes/resources` folder.
3
- * Layering: Use the same Kubernetes YAML to build multiple environments like dev and prod with [layering]({% link _docs/layering.md %}).
4
- * Secrets: Use helpers like [aws_secret]({% link _docs/helpers/aws/secrets.md %}), [aws_ssm]({% link _docs/helpers/aws/ssm.md %}), and [google_secret]({% link _docs/helpers/google/secrets.md %}) to build Kubernetes secrets.yaml from secret providers designed for it.
5
- * Generators: Kubes ships with a few generators to help you get building with Kubernetes quickly. See: [Generator Docs]({% link _docs/generators.md %}).
6
- * CLI Customizations: You can customize the [cli args]({% link _docs/config/args/kubectl.md %}).
7
- * Hooks: You can also run [hooks]({% link _docs/config/hooks.md %}) before and after [kubes]({% link _docs/config/hooks/kubes.md %}) and [kubectl]({% link _docs/config/hooks/kubectl.md %}) commands.
8
- * Automated Suffix Hashes: Automatically appends a suffix hash to ConfigMap and Secret resources. More details in [ConfigMap]({% link _docs/dsl/resources/config_map.md %}) and [Secret]({% link _docs/dsl/resources/secret.md %}) docs.
9
- * Kustomize Support: If you're a kustomization user, you can use it with Kubes. More details in [Kustomize Support Docs]({% link _docs/misc/kustomize.md %}).
10
- * Auto Context Switching: Map dev to a specific kubectl context and prod to another kubectl context and Kubes can switch them automatically so you won't have to remember. More details in [Auto Context Docs]({% link _docs/misc/auto-context.md %}).
11
- * Ordering: Kubes run kubectl apply to create resources in the [correct order]({% link _docs/intro/ordering.md %}). For deleting, it kubes will run `kubectl delete` in the correct reverse order. The order is also [customizable]({% link _docs/intro/ordering/custom.md %}).
1
+ * **Automation**: [Builds the Docker image]({% link _docs/config/docker.md %}) and updates the compiled YAML files
2
+ * **Syntactic Sugar**: Use an [ERB/YAML]({% link _docs/yaml.md %}) or a [DSL]({% link _docs/dsl.md %}) to write your Kubernetes YAML files. You can use a mix of DSL and YAML definitions in the `.kubes/resources` folder.
3
+ * **Layering**: Use the same Kubernetes YAML to build multiple environments like dev and prod with [layering]({% link _docs/layering.md %}).
4
+ * **Secrets**: Use helpers like [aws_secret]({% link _docs/helpers/aws/secrets.md %}), [aws_ssm]({% link _docs/helpers/aws/ssm.md %}), and [google_secret]({% link _docs/helpers/google/secrets.md %}) to build Kubernetes secrets.yaml from secret providers designed for it.
5
+ * **Generators**: Kubes ships with a few generators to help you get building with Kubernetes quickly. See: [Generator Docs]({% link _docs/generators.md %}).
6
+ * **CLI Customizations**: You can customize the [cli args]({% link _docs/config/args/kubectl.md %}).
7
+ * **Hooks**: You can also run [hooks]({% link _docs/config/hooks.md %}) before and after [kubes]({% link _docs/config/hooks/kubes.md %}) and [kubectl]({% link _docs/config/hooks/kubectl.md %}) commands.
8
+ * **Automated Suffix Hashes**: Automatically appends a suffix hash to ConfigMap and Secret resources. More details in [ConfigMap]({% link _docs/dsl/resources/config_map.md %}) and [Secret]({% link _docs/dsl/resources/secret.md %}) docs.
9
+ * **Kustomize Support**: If you're a kustomization user, you can use it with Kubes. More details in [Kustomize Support Docs]({% link _docs/misc/kustomize.md %}).
10
+ * **Auto Context Switching**: Map dev to a specific kubectl context and prod to another kubectl context and Kubes can switch them automatically so you won't have to remember. More details in [Auto Context Docs]({% link _docs/misc/auto-context.md %}).
11
+ * **Ordering**: Kubes run kubectl apply to create resources in the [correct order]({% link _docs/intro/ordering.md %}). For deleting, it kubes will run `kubectl delete` in the correct reverse order. The order is also [customizable]({% link _docs/intro/ordering/custom.md %}).
@@ -2,6 +2,8 @@
2
2
 
3
3
  The `config.rb` is where you can configure Kubes settings.
4
4
 
5
+ .kubes/config.rb
6
+
5
7
  ```ruby
6
8
  Kubes.configure do |config|
7
9
  config.repo = "112233445566.dkr.ecr.us-west-2.amazonaws.com/demo" # may be gcr.io/project-123/demo
@@ -13,7 +15,7 @@ end
13
15
 
14
16
  This is where the `--repo` from `kubes init` got saved. The other options are covered in the [Env Config Docs]({% link _docs/config/env.md %}).
15
17
 
16
- ## Dockerfie
18
+ ## Dockerfile
17
19
 
18
20
  The `Dockerfile` is a simple starter example that just runs nginx
19
21
 
@@ -411,6 +411,7 @@ ul.toc {
411
411
  .learn {
412
412
  img {
413
413
  max-width: 600px;
414
+ max-width: 100%;
414
415
  }
415
416
  .note {
416
417
  font-size: 0.9em;
@@ -22,6 +22,7 @@ class Kubes::Compiler::Strategy
22
22
 
23
23
  def content
24
24
  data = filter_skip(@data)
25
+ data.each { |item| item.delete('kubes') }
25
26
  return if data.empty?
26
27
  result = data.size == 1 ? data.first : data
27
28
  yaml_dump(result)
data/lib/kubes/config.rb CHANGED
@@ -96,8 +96,12 @@ module Kubes
96
96
  evaluate_file(".kubes/config.rb")
97
97
  evaluate_file(".kubes/config/env/#{Kubes.env}.rb")
98
98
  if Kubes.app
99
+ # TODO: deprecate
99
100
  evaluate_file(".kubes/config/env/#{Kubes.app}.rb")
100
101
  evaluate_file(".kubes/config/env/#{Kubes.app}/#{Kubes.env}.rb")
102
+ # newer
103
+ evaluate_file(".kubes/config/app/#{Kubes.app}.rb")
104
+ evaluate_file(".kubes/config/app/#{Kubes.app}/#{Kubes.env}.rb")
101
105
  end
102
106
  Kubes::Plugin.plugins.each do |klass|
103
107
  # klass: IE: KubesAws, KubesGoogle
data/lib/kubes/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kubes
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  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.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -851,7 +851,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
851
851
  - !ruby/object:Gem::Version
852
852
  version: '0'
853
853
  requirements: []
854
- rubygems_version: 3.2.32
854
+ rubygems_version: 3.3.12
855
855
  signing_key:
856
856
  specification_version: 4
857
857
  summary: 'Kubernetes Deployment Tool: build docker image, compile Kubernetes YAML