File tree 2 files changed +41
-1
lines changed
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,33 @@ The following inputs are available as `step.with` keys:
192
192
... (put your other arguments here)
193
193
```
194
194
195
+ ## Example 8 - Use a different role in the Action than the role the cluster was built with
196
+
197
+ ** action.yaml**
198
+ ``` yaml
199
+ - name : Install Karpenter
200
+ uses : bitovi/github-actions-deploy-eks-helm
201
+ with :
202
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
203
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
204
+ aws-region : ${{ vars.AWS_REGION }}
205
+ cluster-name : ${{ vars.CLUSTER_NAME }}
206
+ cluster-role-arn : ${{ secrets.AWS_ROLE_ARN }}
207
+ chart-repository : oci://public.ecr.aws
208
+ chart-path : karpenter/karpenter
209
+ helm-wait : true
210
+ namespace : karpenter
211
+ name : karpenter
212
+ values : |
213
+ settings.clusterName=${{ vars.CLUSTER_NAME }},
214
+ settings.interruptionQueue=${{ vars.CLUSTER_NAME }}-karpenter,
215
+ controller.resources.requests.cpu=1,
216
+ controller.resources.requests.memory=1Gi,
217
+ controller.resources.limits.cpu=1,
218
+ controller.resources.limits.memory=1Gi
219
+ version : 1.0.6
220
+ ` ` `
221
+
195
222
**terraform.tf**
196
223
` ` ` yaml
197
224
... (surrounding code)
Original file line number Diff line number Diff line change @@ -148,7 +148,20 @@ if [ "${HELM_ACTION}" == "install" ]; then
148
148
done
149
149
150
150
if [ -n " $DEPLOY_VALUES " ]; then
151
- HELM_COMMAND=" ${HELM_COMMAND} --set ${DEPLOY_VALUES} "
151
+ for value in ${DEPLOY_VALUES// ,/ }
152
+ do
153
+ if [[ -z " $value " ]]; then
154
+ echo " Warning: Empty value detected, skipping."
155
+ continue
156
+ elif [[ " $value " != * " =" * ]]; then
157
+ echo " Warning: Value '$value ' does not contain an '=' sign, skipping."
158
+ continue
159
+ elif [[ " $value " =~ [[:space:]] ]]; then
160
+ echo " Warning: Value '$value ' contains whitespace, skipping."
161
+ continue
162
+ fi
163
+ HELM_COMMAND=" ${HELM_COMMAND} --set ${value} "
164
+ done
152
165
fi
153
166
154
167
if [ -n " $VERSION " ]; then
You can’t perform that action at this time.
0 commit comments