kubernetes_helper 1.12.4 → 1.12.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: ac69b9f6972032067714455719b0c5563e5f2c0fed0a82a21665fdbae3b7cf41
4
- data.tar.gz: a5b8d1b32f9fe5d9d8cdc6e96e45e0d96090db42f61bbfb11c896bd6ec92c5dd
3
+ metadata.gz: 386faaa431a2175aef58d35449263616ceaa27eb50c7eed09e4b2f2273321e62
4
+ data.tar.gz: 9a34b266ab98773d7453c28aec664f37dbf49d21d87e6b6f8d919ef9079bded5
5
5
  SHA512:
6
- metadata.gz: 1d0189b8f37392fcaeba4e8982936f3ddc8fd6bfd4866cd47f04b5f8989e12f95863de50fb6a9201f7a58ca07ca00c4a1ceb1445fe4857eed07ad79a83c1ca6c
7
- data.tar.gz: d39a3d77f973eb1e05c8dc5357b22102f6cf7bb0baa24ccbeb96d88a9c134b4f1ded05c40588e6e4baff74adf0d46d709897e3123798c172f60c142a775bbbb8
6
+ metadata.gz: 8e328d4a95e718f3815abd517cd8e1bb0ade62b80fbd25770eb6fb2e3730a7993098940e61bc65c56aa5538f94d707517a4ad5867be2189825734a812162c641
7
+ data.tar.gz: e807a576fae8a3402dba6fd6f3dd964dc75cfe55b3afde6df16ae2c8584f319194c8da2c637c97576b07ef17e766d4440866d296eb8f1f9e353401c4bf7f7fab
data/README.md CHANGED
@@ -62,6 +62,7 @@ Below settings are used when running Continuous Deployment
62
62
  - `continuous_deployment.docker_build_cmd`: Docker command to build the corresponding image. Sample: `build --target production -f Dockerfile `
63
63
  - `continuous_deployment.update_deployment` (Boolean, default: false): If true permits to re-generate and update the k8s deployment(s) before applying the new version (new docker image)
64
64
  - `continuous_deployment.before_building_image` (String, default: empty): Add the ability to enter commands before building docker image
65
+ - `continuous_deployment.after_building_image` (String, default: empty): Add the ability to enter commands after building docker image
65
66
 
66
67
  Below settings are used when configuring the application in the k8s environment
67
68
  - `deployment.name` (String): Web deployment name (Note: Underscores are not accepted). Sample: `my-app`
@@ -87,8 +88,8 @@ Below settings are used when configuring the application in the k8s environment
87
88
  - `secrets.name` (String): K8s secrets name where env vars will be saved and fetched from. Sample: `my-app-secrets`
88
89
 
89
90
  - `service.name`: K8s service name. Sample: `my-app-service`
90
- - `service.port_name`: Http port name to connect between k8s ingress and service. Sample: `http-port`. Note: max 15 characters
91
- - `service.backend_port_name` (String): Web backend port name to be connected between k8s service and web deployments. Sample: `b-port`. Note: max 15 characters
91
+ - `service.port_name` (String, default `http-port`): Http port name to connect between k8s ingress and service. Sample: `http-port`. Note: max 15 characters
92
+ - `service.backend_port_name` (String, default `b-port`): Web backend port name to be connected between k8s service and web deployments. Sample: `b-port`. Note: max 15 characters
92
93
 
93
94
  - `ingress.name`: Name of k8s ingress for the app: Sample: `my-app-ingress`
94
95
  - `ingress.ip_name` (Optional): Static ip address is not created nor assigned if empty value. Sample: `my-app-static-ip`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KubernetesHelper
4
- VERSION = '1.12.4'
4
+ VERSION = '1.12.7'
5
5
  end
@@ -24,7 +24,14 @@ module KubernetesHelper
24
24
  },
25
25
  deployment: {
26
26
  log_container: true
27
- }
27
+ },
28
+ service: {
29
+ port_name: 'http-port',
30
+ backend_port_name: 'b-port'
31
+ },
32
+ secrets: {},
33
+ continuous_deployment: {},
34
+ ingress: {}
28
35
  }
29
36
  deep_merge(def_settings, settings || {})
30
37
  end
data/lib/templates/cd.sh CHANGED
@@ -37,13 +37,14 @@ then
37
37
  fi
38
38
 
39
39
 
40
- <%=continuous_deployment.before_building_image || ''%>
41
40
  ALREADY_DEPLOYED="$(gcloud container images list-tags --format='get(tags)' $IMAGE_NAME | grep $CI_COMMIT_SHA || :;)"
42
41
  if [ -z $ALREADY_DEPLOYED ]
43
42
  then
44
43
  ## Build and push containers
45
44
  echo "****** image not created yet, building image..."
45
+ <%=continuous_deployment.before_building_image || ''%>
46
46
  docker $DOCKER_BUILD_CMD -t $DEPLOY_NAME .
47
+ <%=continuous_deployment.after_building_image || ''%>
47
48
  docker push $DEPLOY_NAME
48
49
  else
49
50
  echo "****** image was already created: $ALREADY_DEPLOYED"
@@ -37,8 +37,6 @@ settings = {
37
37
  },
38
38
  service: {
39
39
  name: app_name,
40
- port_name: 'http-port', # max 15 characters
41
- backend_port_name: 'b-port' # max 15 characters
42
40
  }
43
41
  }
44
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.4
4
+ version: 1.12.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - owen2345