Skip to content

Commit 58bb6bc

Browse files
committed
linting, finally turned on pre-commit locally
1 parent 9feee4d commit 58bb6bc

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

tests/templates/kuttl/iceberg/20_minio.yaml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ data:
3333
set -e # Have script exit in the event of a failed command.
3434
MC_CONFIG_DIR="/etc/minio/mc/"
3535
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}"
36-
36+
3737
# connectToMinio
3838
# Use a check-sleep-check loop to wait for MinIO service to be available
3939
connectToMinio() {
@@ -61,15 +61,15 @@ data:
6161
set -e # reset `e` as active
6262
return 0
6363
}
64-
64+
6565
# checkBucketExists ($bucket)
6666
# Check if the bucket exists, by using the exit code of `mc ls`
6767
checkBucketExists() {
6868
BUCKET=$1
6969
CMD=$(${MC} stat myminio/$BUCKET >/dev/null 2>&1)
7070
return $?
7171
}
72-
72+
7373
# createBucket ($bucket, $policy, $purge)
7474
# Ensure bucket exists, purging if asked to
7575
createBucket() {
@@ -78,7 +78,7 @@ data:
7878
PURGE=$3
7979
VERSIONING=$4
8080
OBJECTLOCKING=$5
81-
81+
8282
# Purge the bucket, if set & exists
8383
# Since PURGE is user input, check explicitly for `true`
8484
if [ $PURGE = true ]; then
@@ -91,7 +91,7 @@ data:
9191
echo "Bucket '$BUCKET' does not exist, skipping purge."
9292
fi
9393
fi
94-
94+
9595
# Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created)
9696
if ! checkBucketExists $BUCKET; then
9797
if [ ! -z $OBJECTLOCKING ]; then
@@ -109,7 +109,7 @@ data:
109109
echo "Bucket '$BUCKET' already exists."
110110
fi
111111
fi
112-
112+
113113
# set versioning for bucket if objectlocking is disabled or not set
114114
if [ $OBJECTLOCKING = false ]; then
115115
if [ ! -z $VERSIONING ]; then
@@ -124,30 +124,30 @@ data:
124124
else
125125
echo "Bucket '$BUCKET' versioning unchanged."
126126
fi
127-
127+
128128
# At this point, the bucket should exist, skip checking for existence
129129
# Set policy on the bucket
130130
echo "Setting policy of bucket '$BUCKET' to '$POLICY'."
131131
${MC} anonymous set $POLICY myminio/$BUCKET
132132
}
133-
133+
134134
# Try connecting to MinIO instance
135135
scheme=https
136136
connectToMinio $scheme
137-
137+
138138
# Create the buckets
139139
createBucket demo "public" false false false
140-
140+
141141
add-user: |-
142142
#!/bin/sh
143143
set -e ; # Have script exit in the event of a failed command.
144144
MC_CONFIG_DIR="/etc/minio/mc/"
145145
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}"
146-
146+
147147
# AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters.
148148
# Special characters for example : ',",<,>,{,}
149149
MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_tmp"
150-
150+
151151
# connectToMinio
152152
# Use a check-sleep-check loop to wait for MinIO service to be available
153153
connectToMinio() {
@@ -174,14 +174,14 @@ data:
174174
set -e ; # reset `e` as active
175175
return 0
176176
}
177-
177+
178178
# checkUserExists ()
179179
# Check if the user exists, by using the exit code of `mc admin user info`
180180
checkUserExists() {
181181
CMD=$(${MC} admin user info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1)
182182
return $?
183183
}
184-
184+
185185
# createUser ($policy)
186186
createUser() {
187187
POLICY=$1
@@ -205,7 +205,7 @@ data:
205205
fi
206206
#clean up credentials files.
207207
rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
208-
208+
209209
# set policy for user
210210
if [ ! -z $POLICY -a $POLICY != " " ] ; then
211211
echo "Adding policy '$POLICY' for '$USER'"
@@ -216,22 +216,22 @@ data:
216216
echo "User '$USER' has no policy attached."
217217
fi
218218
}
219-
219+
220220
# Try connecting to MinIO instance
221221
scheme=https
222222
connectToMinio $scheme
223-
223+
224224
# Create the users
225225
echo console > $MINIO_ACCESSKEY_SECRETKEY_TMP
226226
echo console123 >> $MINIO_ACCESSKEY_SECRETKEY_TMP
227227
createUser consoleAdmin
228-
228+
229229
add-policy: |-
230230
#!/bin/sh
231231
set -e ; # Have script exit in the event of a failed command.
232232
MC_CONFIG_DIR="/etc/minio/mc/"
233233
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}"
234-
234+
235235
# connectToMinio
236236
# Use a check-sleep-check loop to wait for MinIO service to be available
237237
connectToMinio() {
@@ -258,20 +258,20 @@ data:
258258
set -e ; # reset `e` as active
259259
return 0
260260
}
261-
261+
262262
# checkPolicyExists ($policy)
263263
# Check if the policy exists, by using the exit code of `mc admin policy info`
264264
checkPolicyExists() {
265265
POLICY=$1
266266
CMD=$(${MC} admin policy info myminio $POLICY > /dev/null 2>&1)
267267
return $?
268268
}
269-
269+
270270
# createPolicy($name, $filename)
271271
createPolicy () {
272272
NAME=$1
273273
FILENAME=$2
274-
274+
275275
# Create the name if it does not exist
276276
echo "Checking policy: $NAME (in /config/$FILENAME.json)"
277277
if ! checkPolicyExists $NAME ; then
@@ -280,23 +280,23 @@ data:
280280
echo "Policy '$NAME' already exists."
281281
fi
282282
${MC} admin policy create myminio $NAME /config/$FILENAME.json
283-
283+
284284
}
285-
285+
286286
# Try connecting to MinIO instance
287287
scheme=https
288288
connectToMinio $scheme
289-
289+
290290
add-svcacct: |-
291291
#!/bin/sh
292292
set -e ; # Have script exit in the event of a failed command.
293293
MC_CONFIG_DIR="/etc/minio/mc/"
294294
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}"
295-
295+
296296
# AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters.
297297
# Special characters for example : ',",<,>,{,}
298298
MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_svcacct_tmp"
299-
299+
300300
# connectToMinio
301301
# Use a check-sleep-check loop to wait for MinIO service to be available
302302
connectToMinio() {
@@ -323,14 +323,14 @@ data:
323323
set -e ; # reset `e` as active
324324
return 0
325325
}
326-
326+
327327
# checkSvcacctExists ()
328328
# Check if the svcacct exists, by using the exit code of `mc admin user svcacct info`
329329
checkSvcacctExists() {
330330
CMD=$(${MC} admin user svcacct info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1)
331331
return $?
332332
}
333-
333+
334334
# createSvcacct ($user)
335335
createSvcacct () {
336336
USER=$1
@@ -361,17 +361,17 @@ data:
361361
#clean up credentials files.
362362
rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
363363
}
364-
364+
365365
# Try connecting to MinIO instance
366366
scheme=https
367367
connectToMinio $scheme
368-
368+
369369
custom-command: |-
370370
#!/bin/sh
371371
set -e ; # Have script exit in the event of a failed command.
372372
MC_CONFIG_DIR="/etc/minio/mc/"
373373
MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}"
374-
374+
375375
# connectToMinio
376376
# Use a check-sleep-check loop to wait for MinIO service to be available
377377
connectToMinio() {
@@ -398,14 +398,14 @@ data:
398398
set -e ; # reset `e` as active
399399
return 0
400400
}
401-
401+
402402
# runCommand ($@)
403403
# Run custom mc command
404404
runCommand() {
405405
${MC} "$@"
406406
return $?
407407
}
408-
408+
409409
# Try connecting to MinIO instance
410410
scheme=https
411411
connectToMinio $scheme
@@ -523,7 +523,7 @@ spec:
523523
mountPath: "/tmp/credentials"
524524
readOnly: true
525525
- name: export
526-
mountPath: /export
526+
mountPath: /export
527527
- mountPath: /etc/minio/original_certs
528528
name: tls
529529
- mountPath: /etc/minio/certs
@@ -550,15 +550,15 @@ spec:
550550
requests:
551551
cpu: 1
552552
memory: 2Gi
553-
securityContext:
554-
readOnlyRootFilesystem: false
553+
securityContext:
554+
readOnlyRootFilesystem: false
555555
volumes:
556556
- name: export
557557
persistentVolumeClaim:
558558
claimName: minio
559559
- name: minio-user
560560
secret:
561-
secretName: minio
561+
secretName: minio
562562
- ephemeral:
563563
volumeClaimTemplate:
564564
metadata:

tests/templates/kuttl/iceberg/21_minio_jobs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
release: minio
2020
stackable.tech/vendor: Stackable
2121
spec:
22-
restartPolicy: OnFailure
22+
restartPolicy: OnFailure
2323
volumes:
2424
- name: etc-path
2525
emptyDir: {}

0 commit comments

Comments
 (0)