@leverege/build-tools 2.28.1 → 2.29.1
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.
package/package.json
CHANGED
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#
|
|
2
|
+
# cluster-issuer.yaml.ovh
|
|
3
|
+
#
|
|
4
|
+
apiVersion: cert-manager.io/v1
|
|
5
|
+
kind: ClusterIssuer
|
|
6
|
+
metadata:
|
|
7
|
+
name: letsencrypt-prd
|
|
8
|
+
spec:
|
|
9
|
+
acme:
|
|
10
|
+
# production
|
|
11
|
+
#server: https://acme-v02.api.letsencrypt.org/directory
|
|
12
|
+
# staging
|
|
13
|
+
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
|
14
|
+
#
|
|
15
|
+
# You must replace this email address with your own.
|
|
16
|
+
# Let's Encrypt will use this to contact you about expiring
|
|
17
|
+
# certificates, and issues related to your account.
|
|
18
|
+
email: devops@leverege.com
|
|
19
|
+
privateKeySecretRef:
|
|
20
|
+
# Secret resource used to store the account's private key.
|
|
21
|
+
name: issuer-account-key
|
|
22
|
+
# Add a single challenge solver, HTTP01 using nginx
|
|
23
|
+
solvers:
|
|
24
|
+
- dns01:
|
|
25
|
+
cloudflare:
|
|
26
|
+
email: devops@leverege.com
|
|
27
|
+
apiTokenSecretRef:
|
|
28
|
+
name: cloudflare
|
|
29
|
+
key: dns-token
|
|
30
|
+
selector:
|
|
31
|
+
dnsZones:
|
|
32
|
+
- 'OVH:<HOST>.com'
|
|
33
|
+
---
|
|
34
|
+
#
|
|
35
|
+
# this-service.yaml.ovh
|
|
36
|
+
#
|
|
37
|
+
apiVersion: cert-manager.io/v1
|
|
38
|
+
kind: Certificate
|
|
39
|
+
metadata:
|
|
40
|
+
name: OVH:<PROJECT_ID>
|
|
41
|
+
spec:
|
|
42
|
+
secretName: OVH:<PROJECT_ID>-cert
|
|
43
|
+
dnsNames:
|
|
44
|
+
- '*.OVH:<HOST>.com'
|
|
45
|
+
issuerRef:
|
|
46
|
+
name: letsencrypt-prd
|
|
47
|
+
kind: ClusterIssuer
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cert-manager-local.yaml
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
addHelmRepo jetstack https://charts.jetstack.io
|
|
4
|
+
[ -z "$CERT_MANAGER_CHART_VERSION" ] && CERT_MANAGER_CHART_VERSION="v1.10"
|
|
5
|
+
helm upgrade --install cert-manager jetstack/cert-manager \
|
|
6
|
+
--namespace cert-manager --set installCRDs=true \
|
|
7
|
+
--version $CERT_MANAGER_CHART_VERSION $HELM_WHAT
|
|
8
|
+
|
|
9
|
+
[ ! -z "$HELM_WHAT" ] && exit 0
|
|
10
|
+
|
|
11
|
+
cat<<DELAY
|
|
12
|
+
|
|
13
|
+
`color y "20 second delay to allow cert-manager to stabilize before proceeding...\n"`
|
|
14
|
+
|
|
15
|
+
DELAY
|
|
16
|
+
|
|
17
|
+
sleep 20
|
|
18
|
+
kubectl -n cert-manager apply -f cert-manager
|
|
19
|
+
|
|
20
|
+
if [[ $? -eq 1 ]];
|
|
21
|
+
then
|
|
22
|
+
|
|
23
|
+
`color y "***WARNING: cert-manager components still coming up"`
|
|
24
|
+
|
|
25
|
+
Try rerunning this apply again in 30 seconds:
|
|
26
|
+
`color g "kubectl -n cert-manager apply -f cert-manager"`
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
cat<<HINTS
|
|
30
|
+
|
|
31
|
+
fetch certs: `color g "kubectl -n cert-manager get certificate"`
|
|
32
|
+
check certs: `color g "kubectl -n cert-manager describe certificate"`
|
|
33
|
+
|
|
34
|
+
HINTS
|
|
35
|
+
removeHelmRepo jetstack
|
package/src/helmup
CHANGED
|
@@ -391,6 +391,33 @@ OLDER_GKE
|
|
|
391
391
|
fi
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
+
function installCertManagerSecret() {
|
|
395
|
+
showInstalling "Cert Managment"
|
|
396
|
+
createNamespaceIfNeeded cert-manager
|
|
397
|
+
|
|
398
|
+
kubectl get secret cloudflare --namespace cert-manager &>/dev/null
|
|
399
|
+
if [[ $? -eq 1 ]];
|
|
400
|
+
then
|
|
401
|
+
cat<<NEED_MANAGED_SECRET
|
|
402
|
+
$RED_ERROR missing secret: `color y cloudflare` namespace: `color y cert-manager`
|
|
403
|
+
|
|
404
|
+
This secret will be fetched from the leverege-docker-images cluster and
|
|
405
|
+
injected into this cluster.
|
|
406
|
+
NEED_MANAGED_SECRET
|
|
407
|
+
#yesToContinue "to copy and inject the cloudflare secret"
|
|
408
|
+
TOKEN=$(getManagedSecret "CLOUDFLARE_API_TOKEN")
|
|
409
|
+
if [ $? -ne 0 ];
|
|
410
|
+
then
|
|
411
|
+
printf "$RED_ERROR getManagedSecret reponse=>[$TOKEN]"
|
|
412
|
+
exitOnError 1 "Failed to fetch the secret from leverege-docker-images"
|
|
413
|
+
fi
|
|
414
|
+
printf "\nInjecting=[$TOKEN] into cloudflare secret\n"
|
|
415
|
+
kubectl create secret generic cloudflare \
|
|
416
|
+
--namespace cert-manager \
|
|
417
|
+
--from-literal=dns-token=$TOKEN
|
|
418
|
+
fi
|
|
419
|
+
}
|
|
420
|
+
|
|
394
421
|
function installTraefikEnvironment() {
|
|
395
422
|
showInstalling "Traefik Namespace and Cloudflare Secret"
|
|
396
423
|
createNamespaceIfNeeded traefik
|
|
@@ -615,6 +642,11 @@ function doInstall() {
|
|
|
615
642
|
doInstall "${SYSTEM[@]}"
|
|
616
643
|
;;
|
|
617
644
|
|
|
645
|
+
"cert-manager")
|
|
646
|
+
installCertManagerSecret
|
|
647
|
+
bootstrapLocalSetup $SERVICE
|
|
648
|
+
;;
|
|
649
|
+
|
|
618
650
|
"cronZombieKiller"|"zombie-killer")
|
|
619
651
|
installCronZombieKiller # eradicate the gke 1.20+ zombies
|
|
620
652
|
;;
|