@@ -53,6 +53,10 @@ echo "CLUSTER_AUTOSCALER_ROLE_ARN=${CLUSTER_AUTOSCALER_ROLE_ARN}"
53
53
54
54
version=" $( uuidgen) "
55
55
56
+ aws eks update-kubeconfig --region $AWS_REGION --name $CLUSTERNAME --kubeconfig ~ /.kube/wrongsecrets
57
+
58
+ export KUBECONFIG=~ /.kube/wrongsecrets
59
+
56
60
echo " If the below output is different than expected: please hard stop this script (running aws sts get-caller-identity first)"
57
61
58
62
aws sts get-caller-identity
@@ -61,24 +65,6 @@ echo "Giving you 4 seconds before we add autoscaling"
61
65
62
66
sleep 4
63
67
64
- # echo "Installing policies and service accounts"
65
-
66
- # aws iam create-policy \
67
- # --policy-name AmazonEKSClusterAutoscalerPolicy \
68
- # --policy-document file://cluster-autoscaler-policy.json
69
-
70
- # echo "Installing iamserviceaccount"
71
-
72
- # eksctl create iamserviceaccount \
73
- # --cluster=$CLUSTERNAME \
74
- # --region=$AWS_REGION \
75
- # --namespace=kube-system \
76
- # --name=cluster-autoscaler \
77
- # --role-name=AmazonEKSClusterAutoscalerRole \
78
- # --attach-policy-arn=arn:aws:iam::${ACCOUNT_ID}:policy/AmazonEKSClusterAutoscalerPolicy \
79
- # --override-existing-serviceaccounts \
80
- # --approve
81
-
82
68
echo " Deploying the k8s autoscaler for eks through kubectl"
83
69
84
70
curl -o cluster-autoscaler-autodiscover.yaml https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml
@@ -156,33 +142,16 @@ helm upgrade --install mj ../helm/wrongsecrets-ctf-party \
156
142
--set=" balancer.env.REACT_APP_CREATE_TEAM_HMAC_KEY=${CREATE_TEAM_HMAC} " \
157
143
--set=" balancer.cookie.cookieParserSecret=${COOKIE_PARSER_SECRET} "
158
144
159
- # echo "Installing EBS CSI driver"
160
- # eksctl create iamserviceaccount \
161
- # --name ebs-csi-controller-sa \
162
- # --namespace kube-system \
163
- # --cluster $CLUSTERNAME \
164
- # --attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
165
- # --approve \
166
- # --role-only \
167
- # --role-name AmazonEKS_EBS_CSI_DriverRole
168
- # --region $AWS_REGION
169
-
170
- # echo "managing EBS CSI Driver as a separate eks addon"
171
- # eksctl create addon --name aws-ebs-csi-driver \
172
- # --cluster $CLUSTERNAME \
173
- # --service-account-role-arn arn:aws:iam::${ACCOUNT_ID}:role/AmazonEKS_EBS_CSI_DriverRole \
174
- # --force \
175
- # --region $AWS_REGION
176
-
177
145
# Install CTFd
178
-
179
146
echo " Installing CTFd"
180
147
181
148
export HELM_EXPERIMENTAL_OCI=1
182
149
kubectl create namespace ctfd
150
+
151
+ # Double base64 encoding to prevent weird character errors in ctfd
183
152
helm upgrade --install ctfd -n ctfd oci://ghcr.io/bman46/ctfd/ctfd \
184
- --set=" redis.auth.password=$( openssl rand -base64 24) " \
185
- --set=" mariadb.auth.rootPassword=$( openssl rand -base64 24) " \
186
- --set=" mariadb.auth.password=$( openssl rand -base64 24) " \
187
- --set=" mariadb.auth.replicationPassword=$( openssl rand -base64 24) " \
153
+ --set=" redis.auth.password=$( openssl rand -base64 24 | base64 ) " \
154
+ --set=" mariadb.auth.rootPassword=$( openssl rand -base64 24 | base64 ) " \
155
+ --set=" mariadb.auth.password=$( openssl rand -base64 24 | base64 ) " \
156
+ --set=" mariadb.auth.replicationPassword=$( openssl rand -base64 24 | base64 ) " \
188
157
--set=" env.open.SECRET_KEY=test" # this key isn't actually necessary in a setup with CTFd
0 commit comments