Skip to content

Commit 84587d7

Browse files
committed
helm init
1 parent 57fc839 commit 84587d7

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

deploy/ctl

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,29 @@ parameters:
66
default: .color
77
description: "Config file that keeps track of the current color"
88

9+
- name: namespace
10+
default: "default"
11+
description: "Kubernetes namespace"
12+
913
tasks:
1014

1115
# https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports-when-using-an-external-load-balancer
12-
ingress-host:
16+
istio-ingress:
17+
description: Output the FQHN of the Istio Ingress Gateway
1318
script: |
14-
kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
19+
kubectl --namespace istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
20+
1521
# https://istio.io/docs/setup/kubernetes/quick-start/
1622
istio-injection:
23+
description: Enable Istio Sidecar Injection for a namespce
1724
script: |
18-
kubectl label namespace testing istio-injection=enabled
25+
kubectl label namespace {{ get "namespace" }} istio-injection=enabled
1926

2027
deps:
2128
description: "Install alpine dependencies"
2229
script: |
2330
! which apk >/dev/null || apk add --update curl make bash git kubectl@cloudposse helm@cloudposse helmfile@cloudposse
31+
helm init --client-only
2432

2533
color:
2634
description: "Lookup the current color"
@@ -34,12 +42,7 @@ tasks:
3442

3543
blue-green:
3644
description: "Trigger a blue-green deployment"
37-
3845
parameters:
39-
- name: namespace
40-
default: "default"
41-
description: "Kubernetes namespace"
42-
4346
- name: color
4447
type: string
4548
description: "Selected color to deploy"
@@ -56,6 +59,7 @@ tasks:
5659

5760
steps:
5861
- task: deps
62+
- task: istio-injection
5963
- script: |
6064
config=${CF_VOLUME_PATH:-.}/{{ get "config" }}
6165
cur_color={{ get "color" }}
@@ -64,4 +68,5 @@ tasks:
6468
echo "Updating {{ get "namespace" }}: $cur_color => $new_color"
6569
echo "$new_color" > ${config}
6670
export COLOR=$new_color
71+
# Deploy the app and update istio virtual service
6772
helmfile --namespace {{ get "namespace" }} sync

0 commit comments

Comments
 (0)