Skip to content

Commit 00a6d0c

Browse files
authored
Fix: Refactor entrypoint scripts to remove unnecessary './' before kubectl commands (#209)
1 parent e364f25 commit 00a6d0c

File tree

3 files changed

+9
-9
lines changed
  • attestation-verifier/utils/tools/containers/nats
  • helm
    • attestation-verifier/charts/factory/templates
    • trustagent/charts/factory/templates

3 files changed

+9
-9
lines changed

attestation-verifier/utils/tools/containers/nats/entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ if [ $? != 0 ]; then
99
exit 1
1010
fi
1111

12-
aas_pod=$(./kubectl get pod -n $NAMESPACE -l app.kubernetes.io/name=aas -o jsonpath="{.items[0].metadata.name}")
12+
aas_pod=$(kubectl get pod -n $NAMESPACE -l app.kubernetes.io/name=aas -o jsonpath="{.items[0].metadata.name}")
1313
if [ $? != 0 ]; then
1414
echo "Error while retrieving AAS pod name"
1515
exit 1
1616
fi
17-
credentials=$(./kubectl exec -n $NAMESPACE --stdin $aas_pod -- authservice setup create-credentials --force)
17+
credentials=$(kubectl exec -n $NAMESPACE --stdin $aas_pod -- authservice setup create-credentials --force)
1818
if [ $? != 0 ]; then
1919
echo "Error while executing create-credentials setup task"
2020
exit 1
@@ -37,7 +37,7 @@ fi
3737
#sed -i "s#operator:.*#operator: $nats_operator#g" nats.conf || exit 1
3838
#sed -i "s#resolver_preload:.*#resolver_preload: { $resolver_jwt }#g" nats.conf || exit 1
3939

40-
./kubectl create secret generic nats-certs --from-file=secrets --namespace=$NAMESPACE
40+
kubectl create secret generic nats-certs --from-file=secrets --namespace=$NAMESPACE
4141
if [ $? != 0 ]; then
4242
echo "Failed to create NATS certificates"
4343
exit 1

helm/attestation-verifier/charts/factory/templates/_job.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ spec:
8787
if [ -z "$BEARER_TOKEN" ]; then exit 1; fi &&
8888
INSTALLATION_TOKEN=`echo $BEARER_TOKEN | cut -d " " -f1` &&
8989
if [ -z "$INSTALLATION_TOKEN" ]; then exit 1; fi &&
90-
./kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
91-
./kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
90+
kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
91+
kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
9292
exit 0
9393
volumeMounts:
9494
- name: {{ include "factory.name" . }}-aas-json
@@ -184,8 +184,8 @@ spec:
184184
if [ -z "$BEARER_TOKEN" ]; then exit 1; fi &&
185185
INSTALLATION_TOKEN=`echo $BEARER_TOKEN | cut -d " " -f1` &&
186186
if [ -z "$INSTALLATION_TOKEN" ]; then exit 1; fi &&
187-
./kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
188-
./kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
187+
kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
188+
kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
189189
exit 0
190190
volumeMounts:
191191
- name: {{ include "factory.name" . }}-aas-json

helm/trustagent/charts/factory/templates/_job.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ spec:
5555
if [ -z "$BEARER_TOKEN" ]; then exit 1; fi &&
5656
INSTALLATION_TOKEN=`echo $BEARER_TOKEN | cut -d " " -f1` &&
5757
if [ -z "$INSTALLATION_TOKEN" ]; then exit 1; fi &&
58-
./kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
59-
./kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
58+
kubectl delete secret {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --ignore-not-found &&
59+
kubectl create secret generic {{ include "factory.name" . }}-bearer-token -n {{ .Release.Namespace }} --from-literal=BEARER_TOKEN=$INSTALLATION_TOKEN &&
6060
exit 0
6161
volumeMounts:
6262
- name: {{ include "factory.name" . }}-aas-json

0 commit comments

Comments
 (0)