25
25
26
26
with :
27
27
version : ${{ env.ISTIO_VERSION }}
28
+ - uses : azure/setup-helm@v1
29
+ id : install
28
30
- name : Get Istioctl
29
31
run : |
30
32
istioctl version --remote=false
@@ -36,14 +38,14 @@ jobs:
36
38
id : inject
37
39
run : |
38
40
# hydrate isto manifest into configmap files
39
- istioctl manifest generate \
40
- -f istio/system/profile .yaml > manifests.yaml
41
- echo "first yq"
42
- cat manifests .yaml | yq e '. | select(.kind == "ConfigMap" and .metadata.name =="istio-sidecar-injector") | . data.config ' - > injector.yaml
43
- echo "second yq"
44
- cat manifests .yaml | yq e '. | select(.kind == "ConfigMap" and .metadata.name =="istio-sidecar-injector") | .data.values ' - > values .yaml
45
- echo "third yq"
46
- cat manifests .yaml | yq e '. | select(.kind == "ConfigMap" and .metadata.name =="istio") | .data.mesh ' - > mesh .yaml
41
+
42
+ URI=$(cat istio/system/istio .yaml | yq e '. | select(.kind == "HelmRepository" and .metadata.name =="istio") | .spec.url' -)
43
+ cat istio/system/istio.yaml | yq e '. | select(.kind == "HelmRelease" and .metadata.name =="istiod") | .spec.values' - > values.yaml
44
+ VERSION=$( cat clusters/my-cluster/istio-version .yaml | yq e '.data.version ' -)
45
+ helm repo add istio $URI
46
+ helm template -f values .yaml --version $VERSION istiod istio/istiod | yq e '.| select(.kind == "ConfigMap" and .metadata.name == "istio-sidecar-injector") | .data.config ' - > injector .yaml
47
+ helm template -f values.yaml --version $VERSION istiod istio/istiod | yq e '.| select(.kind == "ConfigMap" and .metadata.name == "istio") | .data.mesh' - > mesh.yaml
48
+ helm template -f values .yaml --version $VERSION istiod istio/istiod | yq e '.| select(.kind == "ConfigMap" and .metadata.name == "istio-sidecar-injector ") | .data.values ' - > inj-values .yaml
47
49
48
50
python -m pip install jsonpatch
49
51
55
57
istioctl kube-inject \
56
58
--injectConfigFile injector.yaml \
57
59
--meshConfigFile mesh.yaml \
58
- --valuesFile values.yaml \
60
+ --valuesFile inj- values.yaml \
59
61
-f $1 -o $NAME.gen.$EXTENSION
60
62
61
63
# injected yaml ends with '---', so remove before converting to json
0 commit comments