kubernetes_helper 1.12 → 1.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kubernetes_helper/version.rb +1 -1
- data/lib/kubernetes_helper.rb +2 -2
- data/lib/templates/cd.sh +3 -2
- data/lib/templates/deployment.yml +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7707e54b5816b249a071c784b724c18c75917322f8ade8a8311dd369ff387ba
|
4
|
+
data.tar.gz: ae5a6eedf86732e72084d810a39100ad8be121a9f28e42a7ed1b1e26c756a9eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a363b7f947690f2355ee5629184ad230725956f3d5f0ce0829f00b070c28312da0584b2f9059945cdf05097d210187baeb355e5e3a2254b1e519e95c5a543d7d
|
7
|
+
data.tar.gz: 6ca97a213ece9cc99af0141d26d582d4f342fe583b68f5c9e2f55d69becf67d144942f898ec173dbcbb7ea27966c3817a6f154537b6faf9215f78146b8b8fd87
|
data/lib/kubernetes_helper.rb
CHANGED
@@ -14,7 +14,7 @@ module KubernetesHelper
|
|
14
14
|
|
15
15
|
# @param env_name (String)
|
16
16
|
# @return [Hash]
|
17
|
-
def self.load_settings
|
17
|
+
def self.load_settings # rubocop:disable Metrics/MethodLength:
|
18
18
|
config_file = File.join(settings_path, 'settings.rb')
|
19
19
|
load config_file
|
20
20
|
|
@@ -30,7 +30,7 @@ module KubernetesHelper
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.deep_merge(hash1, hash2)
|
33
|
-
merger = proc { |_key, v1, v2| v1.
|
33
|
+
merger = proc { |_key, v1, v2| v1.is_a?(Hash) && v2.is_a?(Hash) ? v1.merge(v2, &merger) : v2 }
|
34
34
|
hash1.merge(hash2, &merger)
|
35
35
|
end
|
36
36
|
|
data/lib/templates/cd.sh
CHANGED
@@ -44,11 +44,12 @@ then
|
|
44
44
|
echo "****** image not created yet, building image..."
|
45
45
|
docker $DOCKER_BUILD_CMD -t $DEPLOY_NAME .
|
46
46
|
docker push $DEPLOY_NAME
|
47
|
+
else
|
48
|
+
echo "****** image was already created: $ALREADY_DEPLOYED"
|
47
49
|
fi
|
48
50
|
|
49
51
|
echo "****** tagging image $DEPLOY_NAME as $LATEST_NAME"
|
50
|
-
|
51
|
-
docker push $LATEST_NAME
|
52
|
+
gcloud container images add-tag --quiet $DEPLOY_NAME $LATEST_NAME
|
52
53
|
|
53
54
|
## Update new secrets defined in secrets.yml as ENV vars for deployments
|
54
55
|
<% if continuous_deployment.update_deployment %>
|
@@ -29,7 +29,7 @@ documents:
|
|
29
29
|
static_env: true
|
30
30
|
import_secrets: ['secrets.yml', '<%=secrets.name%>']
|
31
31
|
ports:
|
32
|
-
- containerPort: &port
|
32
|
+
- containerPort: &port <%= deployment.app_port || 3000 %>
|
33
33
|
name: '<%=service.backend_port_name%>'
|
34
34
|
|
35
35
|
<% if deployment.liveness_path %>
|