kubernetes_helper 1.23.4 → 1.24.0
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/templates/_cd_digital.sh +15 -8
- data/lib/templates/ingress.yml +8 -0
- data/lib/templates/service.yml +6 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8e916c28cfa10adcc84326f3252adfdc7e9fb86254d4a43282dbe637f01f190
|
4
|
+
data.tar.gz: ce6bde27c91768cd0f0e7f1d63354396cdb8a8073f9f236baeb12281d1e7661b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d023e5e701b4b77fa73cda8e4d1dfffabb0723ce97315ca67bd44f119362bb85c3f92994a73930e39b4d6a39f3f4c4d7aaa773c86b4214fc66904fb33624aae3
|
7
|
+
data.tar.gz: e1e33e00936e9b49ca2b07f2b2a9eec468e2a98cb63fa4b4194914d44fc42f1a06e323f2579d112ca308e61e6ae1e235b67af7c3571b22214461f2e46cf69c82
|
@@ -1,18 +1,25 @@
|
|
1
|
-
# Download and install doctl
|
2
1
|
if [ -z "$(which doctl)" ]; then
|
3
|
-
|
2
|
+
wget https://github.com/digitalocean/doctl/releases/download/v1.72.0/doctl-1.72.0-linux-amd64.tar.gz
|
3
|
+
tar xf ./doctl-1.72.0-linux-amd64.tar.gz
|
4
|
+
mv ./doctl /usr/local/bin
|
4
5
|
fi
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
fi
|
7
|
+
## login doctl
|
8
|
+
doctl auth init --access-token $KB_AUTH_TOKEN
|
9
|
+
doctl registry login --access-token $KB_AUTH_TOKEN --expiry-seconds 1200
|
10
10
|
|
11
11
|
## Build and push containers
|
12
|
-
echo "****** building image
|
12
|
+
echo "****** building image...$DOCKER_BUILD_CMD"
|
13
13
|
eval $DOCKER_BUILD_CMD
|
14
|
+
|
15
|
+
echo "****** pushing image...$DEPLOY_NAME"
|
14
16
|
docker push $DEPLOY_NAME
|
15
17
|
|
16
|
-
echo "****** tagging image $DEPLOY_NAME as $LATEST_NAME"
|
18
|
+
echo "****** tagging image... $DEPLOY_NAME as $LATEST_NAME"
|
17
19
|
docker tag $DEPLOY_NAME $LATEST_NAME
|
18
20
|
docker push $LATEST_NAME
|
21
|
+
|
22
|
+
## enable registry to update deployment
|
23
|
+
<% if continuous_deployment.cluster_name %>
|
24
|
+
doctl kubernetes cluster kubeconfig save --expiry-seconds 600 <%= continuous_deployment.cluster_name %>
|
25
|
+
<% end %>
|
data/lib/templates/ingress.yml
CHANGED
@@ -32,6 +32,10 @@ metadata:
|
|
32
32
|
<% if ingress.ip_name %>
|
33
33
|
kubernetes.io/ingress.global-static-ip-name: "<%=ingress.ip_name%>"
|
34
34
|
<% end %>
|
35
|
+
|
36
|
+
<% if ingress.ingress_class.to_s == 'nginx' %>
|
37
|
+
nginx.ingress.kubernetes.io/proxy-body-size: <%= ingress.max_body_size || '50m' %>
|
38
|
+
<% end %>
|
35
39
|
|
36
40
|
<% if ingress.certificate_domain %>
|
37
41
|
networking.gke.io/managed-certificates: '<%= domains.values.join(", ") %>'
|
@@ -39,6 +43,10 @@ metadata:
|
|
39
43
|
<% end %>
|
40
44
|
|
41
45
|
spec:
|
46
|
+
|
47
|
+
<% if ingress.ingress_class %>
|
48
|
+
ingressClassName: <%= ingress.ingress_class %>
|
49
|
+
<% end %>
|
42
50
|
defaultBackend:
|
43
51
|
service:
|
44
52
|
name: '<%=service.name%>'
|
data/lib/templates/service.yml
CHANGED
@@ -24,6 +24,11 @@ metadata:
|
|
24
24
|
service.beta.kubernetes.io/do-loadbalancer-certificate-id: <%= service.do_certificate_id %>
|
25
25
|
service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
|
26
26
|
<% end %>
|
27
|
+
<% if cloud.name == 'digital_ocean' && service.load_balancer_id %>
|
28
|
+
kubernetes.digitalocean.com/load-balancer-id: <%= service.load_balancer_id %>
|
29
|
+
service.beta.kubernetes.io/do-loadbalancer-size-unit: "3"
|
30
|
+
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: "false"
|
31
|
+
<% end %>
|
27
32
|
<% if cloud.name == 'gcloud' %>
|
28
33
|
beta.cloud.google.com/backend-config: '{"ports": {"80":"<%=service.name%>-bconfig"}}'
|
29
34
|
<% end %>
|
@@ -37,7 +42,7 @@ spec:
|
|
37
42
|
name: '<%=service.port_name%>'
|
38
43
|
targetPort: '<%=service.backend_port_name%>'
|
39
44
|
|
40
|
-
<% if cloud.name == 'digital_ocean' && service.do_certificate_id %>
|
45
|
+
<% if cloud.name == 'digital_ocean' && (service.do_certificate_id || service.load_balancer_id) %>
|
41
46
|
- name: https
|
42
47
|
protocol: TCP
|
43
48
|
port: 443
|
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.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- owen2345
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb
|
@@ -67,7 +67,7 @@ metadata:
|
|
67
67
|
homepage_uri: https://github.com/owen2345/kubernetes_helper
|
68
68
|
source_code_uri: https://github.com/owen2345/kubernetes_helper
|
69
69
|
changelog_uri: https://github.com/owen2345/kubernetes_helper
|
70
|
-
post_install_message:
|
70
|
+
post_install_message:
|
71
71
|
rdoc_options: []
|
72
72
|
require_paths:
|
73
73
|
- lib
|
@@ -82,8 +82,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
rubygems_version: 3.1
|
86
|
-
signing_key:
|
85
|
+
rubygems_version: 3.0.3.1
|
86
|
+
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Kubernetes helper to manage deployment files
|
89
89
|
test_files: []
|