kubernetes_helper 1.15.2 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/kubernetes_helper/version.rb +1 -1
- data/lib/templates/service.yml +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd1b1fbd529561166b5e90b3ece98cd5f9abb81d1d652dcd52d62179daddbd14
|
4
|
+
data.tar.gz: a6bb05e8553de13d43d7b9bc9c46ea5aa1dc03e1adca3fc286cb7b7ed73609ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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`
|
data/lib/templates/service.yml
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2022-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb
|