forked from tetratelabs/tsb-helm-install-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprep_controlplane_values.sh
More file actions
executable file
·67 lines (60 loc) · 1.63 KB
/
Copy pathprep_controlplane_values.sh
File metadata and controls
executable file
·67 lines (60 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
tctl config clusters set helm --tls-insecure --bridge-address $TSB_FQDN:8443
tctl config users set helm --username admin --password "Tetrate123" --org "tetrate"
tctl config profiles set helm --cluster helm --username helm
tctl config profiles set-current helm
cat > "${FOLDER}/$CLUSTER_NAME.yaml" <<EOF
---
apiVersion: api.tsb.tetrate.io/v2
kind: Cluster
metadata:
name: $CLUSTER_NAME
organization: $ORG
spec:
tokenTtl: "87600h"
tier1Cluster: false
EOF
tctl apply -f "${FOLDER}/$CLUSTER_NAME.yaml"
tctl install cluster-service-account --cluster $CLUSTER_NAME > $CLUSTER_NAME-service-account.jwk
export CA_CRT=$(cat ca.crt)
export TSB_CRT=$(cat tsb_certs.crt)
export TSB_KEY=$(cat tsb_certs.key)
export XCP_CENTRAL_CERT=$(cat xcp-central-cert.crt)
export XCP_CENTRAL_KEY=$(cat xcp-central-cert.key)
cat >"${FOLDER}/controlplane_values.yaml" <<EOF
image:
registry: $REGISTRY
tag: 1.5.0
secrets:
clusterServiceAccount:
JWK: '`cat $CLUSTER_NAME-service-account.jwk`'
clusterFQN: organizations/$ORG/clusters/$CLUSTER_NAME
elasticsearch:
cacert: |
tsb:
cacert: |
xcp:
rootca: |
spec:
hub: $REGISTRY
managementPlane:
clusterName: $CLUSTER_NAME
host: $TSB_FQDN
port: 8443
selfSigned: true
meshExpansion: {}
telemetryStore:
elastic:
host: $TSB_FQDN
port: 8443
protocol: https
selfSigned: true
version: 7
EOF
yq -i '.secrets.elasticsearch.cacert = strenv(CA_CRT) |
.secrets.tsb.cacert = strenv(CA_CRT) |
.secrets.xcp.rootca = strenv(CA_CRT)' controlplane_values.yaml
cat >"${FOLDER}/dataplane_values.yaml" <<EOF
image:
registry: $REGISTRY
tag: 1.5.0
EOF