kcu 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/kcu.rb +2 -0
- data/lib/kcu/actions/set_secret_action.rb +1 -0
- data/lib/kcu/services/secrets/create_entry_value.rb +34 -0
- data/lib/kcu/services/secrets/set_entry_value.rb +1 -1
- data/lib/kcu/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cd2bdb8867688bc5c28227259ec87b9ef6791e3
|
4
|
+
data.tar.gz: b038c1b68f71d4111ef5b5d923158c5c45c3cd8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829bb99cdb6a71a1606f204c6dfcea3d1c2bf0ace45c49c3e6b632e17f89b2435e320ca06a552882d9988b9dc0f2dac0f8724f4dd7f7488a1fbbe0aa38c930cd
|
7
|
+
data.tar.gz: cb061087f64fd6e930a400fde8ae26955ac3746d9400e82aa852aeb642f250cac5c7f9edbe554f1ac494b6c3d0ca23bf6abcf02939a54b490d1fc6a0f90917fb
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.6.0] - 2018-02-01
|
8
|
+
### Added
|
9
|
+
- Secret is created if it cannot be patched/updated
|
10
|
+
|
7
11
|
## [0.5.0] - 2017-12-19
|
8
12
|
### Fixed
|
9
13
|
- Fix wrong commit when deploying something other than master
|
data/lib/kcu.rb
CHANGED
@@ -8,6 +8,7 @@ require "json"
|
|
8
8
|
require "light-service"
|
9
9
|
require "open3"
|
10
10
|
require "to_regexp"
|
11
|
+
require "shellwords"
|
11
12
|
|
12
13
|
module Kcu
|
13
14
|
end
|
@@ -22,6 +23,7 @@ require "kcu/services/secrets/decode_data"
|
|
22
23
|
require "kcu/services/secrets/get_entry_value"
|
23
24
|
require "kcu/services/secrets/encode_entry_value"
|
24
25
|
require "kcu/services/secrets/set_entry_value"
|
26
|
+
require "kcu/services/secrets/create_entry_value"
|
25
27
|
require "kcu/services/deployments/restart_deployment"
|
26
28
|
require "kcu/services/deploys/get_config"
|
27
29
|
require "kcu/services/deploys/set_target_namespace"
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Kcu
|
2
|
+
module Secrets
|
3
|
+
class CreateEntryValue
|
4
|
+
|
5
|
+
extend LightService::Action
|
6
|
+
expects(
|
7
|
+
:resource_namespace,
|
8
|
+
:resource_name,
|
9
|
+
:entry_name,
|
10
|
+
:entry_value,
|
11
|
+
)
|
12
|
+
|
13
|
+
executed do |c|
|
14
|
+
literal = [
|
15
|
+
c.entry_name,
|
16
|
+
Shellwords.escape(c.entry_value)
|
17
|
+
].join("=")
|
18
|
+
|
19
|
+
stdout_str, stderr_str, status = ExecShell.(
|
20
|
+
"kubectl",
|
21
|
+
"create",
|
22
|
+
"secret",
|
23
|
+
"generic",
|
24
|
+
c.resource_name,
|
25
|
+
"--namespace" => c.resource_namespace,
|
26
|
+
"--from-literal" => literal,
|
27
|
+
)
|
28
|
+
|
29
|
+
puts stdout_str || stderr_str
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/kcu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kcu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- lib/kcu/services/deploys/set_target_namespace.rb
|
206
206
|
- lib/kcu/services/exec_shell.rb
|
207
207
|
- lib/kcu/services/get_resource_namespace_and_name.rb
|
208
|
+
- lib/kcu/services/secrets/create_entry_value.rb
|
208
209
|
- lib/kcu/services/secrets/decode_data.rb
|
209
210
|
- lib/kcu/services/secrets/encode_entry_value.rb
|
210
211
|
- lib/kcu/services/secrets/get_entry_value.rb
|