kubernetes_helper 1.15.2 → 1.16.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b09fe0251ca84cfc1251acbf3f4079d02b5830abe77d3dc34c49b71ae2813ef
4
- data.tar.gz: fff66310d7051331a334eb1e3a250c92413348f17818dda5426fcaca0581a3b1
3
+ metadata.gz: bd1b1fbd529561166b5e90b3ece98cd5f9abb81d1d652dcd52d62179daddbd14
4
+ data.tar.gz: a6bb05e8553de13d43d7b9bc9c46ea5aa1dc03e1adca3fc286cb7b7ed73609ff
5
5
  SHA512:
6
- metadata.gz: ae4c26493643bc9fd8897ef362a476457e801868d8c3b12202889a1e7276fc8148b6bc247caec5a891985a81855296d142253b46517c7edd0f0e823fc4b2f77e
7
- data.tar.gz: ee94f2b9c13ecae82253900502e3c00c20f0cc72fbf2e9046a31bbc2a56391f4098819b7725f404f220a8a38898398658f0dfc1d2524093350dd47c02ea81435
6
+ metadata.gz: 5fde4038a234dafaa435aa6aca47348a090bb79d53a3ba3357a3d632b1f85a849322b70851da89674412abe5d679a72feeb30ac0b86b2de83f4dd9bc3224fb8d
7
+ data.tar.gz: 89ca63330472ad00a1b06004be34c43b7de2582a509247c75d605c5aa6743b64fd653d51fe3459eb1a9d24071faf18a1632663946d274c2ff7dd425a5dc7f220
data/README.md CHANGED
@@ -63,6 +63,8 @@ Configuration and customization can be done for multiple environments and at any
63
63
  - `service.port_name` (String, default `http-port`): Http port name to connect between k8s ingress and service. Sample: `http-port`. Note: max 15 characters
64
64
  - `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
65
65
  - `service.type`: K8s service type. By default `NodePort`
66
+ - `service.do_certificate_id`: Digital Ocean certificate ID to be used for the loadbalancer to auto redirect http to https.
67
+ Note: This value can be fetched via `doctl compute certificate list`. If there are no certificates available, you can generate a new one using digital ocean dashboard -> networking -> certificates.
66
68
 
67
69
  ### Application ingress.yml (Optional)
68
70
  - `ingress.name`: Name of k8s ingress for the app: Sample: `my-app-ingress`
@@ -71,7 +73,7 @@ Configuration and customization can be done for multiple environments and at any
71
73
  - `ingress.certificate_domain` (Optional): Domain name for the certificate. Sample: `myapp.com`. Note: does not support for willcard domains
72
74
  To register multiple domains (Certificate names will be auto-generated like `mysite-com-lets-encrypt`): `certificate_domain: ['mysite.com', 'mysite.de', 'mysite.uk']`
73
75
 
74
- - `cloud.name` (String, optional): Cloud service name. Default `gcloud`.
76
+ - `cloud.name` (String, optional): Cloud service name: `gcloud | digital_ocean`. Default `gcloud`.
75
77
 
76
78
  ### Application CD (continuous deployment)
77
79
  - `continuous_deployment.image_name` (String): Partial docker image url. Sample: `gcr.io/my-account/my_app_name`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KubernetesHelper
4
- VERSION = '1.15.2'
4
+ VERSION = '1.16.0'
5
5
  end
@@ -15,6 +15,11 @@ apiVersion: v1
15
15
  metadata:
16
16
  name: '<%=service.name%>'
17
17
  annotations:
18
+ <% if cloud.name == 'digital_ocean' && service.do_certificate_id %>
19
+ service.beta.kubernetes.io/do-loadbalancer-protocol: "https"
20
+ service.beta.kubernetes.io/do-loadbalancer-certificate-id: <%= service.do_certificate_id %>
21
+ service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
22
+ <% end %>
18
23
  <% if cloud.name == 'gcloud' %>
19
24
  beta.cloud.google.com/backend-config: '{"ports": {"80":"<%=service.name%>-bconfig"}}'
20
25
  <% end %>
@@ -27,3 +32,10 @@ spec:
27
32
  protocol: TCP
28
33
  name: '<%=service.port_name%>'
29
34
  targetPort: '<%=service.backend_port_name%>'
35
+
36
+ <% if cloud.name == 'digital_ocean' && service.do_certificate_id %>
37
+ - name: https
38
+ protocol: TCP
39
+ port: 443
40
+ targetPort: '<%=service.backend_port_name%>'
41
+ <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.2
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - owen2345
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-21 00:00:00.000000000 Z
11
+ date: 2022-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb